-
Notifications
You must be signed in to change notification settings - Fork 7
44 lines (41 loc) · 1.12 KB
/
build.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
name: "Build Checks"
on:
push:
pull_request:
branches:
- main
jobs:
build-pivit:
name: "Build Pivit"
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.19.x]
os: [ubuntu-latest, macos-latest]
steps:
- name: "Install golang"
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: "Install dependencies"
run: |
sudo apt update
sudo apt install -y libpcsclite-dev
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Build and test"
run: |
set -euxo pipefail
cd ${{ github.workspace }}
make test
if ${{ matrix.os == 'macos-latest' }}; then
# Cross compile for darwin-arm64
# Because arm64 binary does not run on an x86_64 runner, we don't
# test it
make pivit GOARCH=arm64
fi
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}