-
Notifications
You must be signed in to change notification settings - Fork 8
44 lines (38 loc) · 1.14 KB
/
build-examples.yml
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
name: Build Examples
on:
push:
branches: [ "main" ]
pull_request:
# all PRs on all branches
concurrency:
# For PRs, later CI runs preempt previous ones. e.g. a force push on a PR
# cancels running CI jobs and starts all new ones.
#
# For non-PR pushes, concurrency.group needs to be unique for every distinct
# CI run we want to have happen. Use run_id, which in practice means all
# non-PR CI runs will be allowed to run without preempting each other.
group: ${{ github.workflow }}-$${{ github.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
goarch: [ "386", "amd64", "arm64" ]
runs-on: linux-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Set up build directory
run: |
mkdir -p ./examples/bin
- name: Build Binaries
run: |
go build -v -ldflags="-H windowsgui" -o ./examples/bin ./examples/...
env:
GOARCH: ${{ matrix.goarch }}
GOOS: windows