-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(workflows): Generic workflow to build all arch/plat combos (#1643)
Reviewed-by: Cezar Craciunoiu <[email protected]> Approved-by: Cezar Craciunoiu <[email protected]>
- Loading branch information
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: build | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
branches: [staging] | ||
paths: | ||
- '**' | ||
- '!.github/**' | ||
- '.github/workflows/build.yaml' | ||
- '!buildenvs/**' | ||
- '!tools/**' | ||
|
||
# Automatically cancel in-progress actions on the same branch | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
kraft: | ||
container: kraftkit.sh/myself-full:latest | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- GOOS: darwin | ||
GOARCH: amd64 | ||
- GOOS: darwin | ||
GOARCH: arm64 | ||
- GOOS: freebsd | ||
GOARCH: amd64 | ||
- GOOS: freebsd | ||
GOARCH: arm64 | ||
- GOOS: linux | ||
GOARCH: amd64 | ||
- GOOS: linux | ||
GOARCH: arm64 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
|
||
- name: Fetch all tags | ||
run: | | ||
git config --global --add safe.directory /__w/kraftkit/kraftkit | ||
git fetch --force --tags | ||
- name: Build | ||
run: | | ||
UNAME_OS=${{ matrix.GOOS }} UNAME_ARCH=${{ matrix.GOARCH }} make kraft |