-
Notifications
You must be signed in to change notification settings - Fork 64
65 lines (58 loc) · 1.74 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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
# FIXME(craciunoiuc): Enable FreeBSD builds when the build environment
# contains the freebsd toolchain.
# - 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: |
VERSION=pr-${{ github.event.number }} GOOS=${{ matrix.GOOS }} GOARCH=${{ matrix.GOARCH }} make kraft
- name: Upload build artifacts to GitHub
uses: actions/upload-artifact@v4
with:
name: kraft-${{ matrix.GOOS }}-${{ matrix.GOARCH }}-${{ github.event.pull_request.number}}
path: ./dist/kraft
if-no-files-found: error
retention-days: 7
overwrite: true