-
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.28 KB
/
Copy pathci.yml
File metadata and controls
41 lines (38 loc) · 1.28 KB
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
# Runs the test suite on macOS, Linux and Windows for every push and pull request,
# plus a Windows smoke test of the setup wizard / --reset against HKCU\Environment.
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
test:
name: test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: go vet ./...
- name: Test
shell: bash
# The race detector needs cgo; keep Windows on the plain test run.
run: |
if [ "$RUNNER_OS" = Windows ]; then go test ./...; else go test -race ./...; fi
- name: Windows smoke test (wizard + --reset)
if: runner.os == 'Windows'
shell: pwsh
run: |
go build -o agentiloop.exe ./cmd/agentiloop
pwsh scripts/windows-smoke.ps1 -Binary .\agentiloop.exe
- name: Cross-compile every release target
shell: bash
run: |
for t in darwin/arm64 darwin/amd64 linux/amd64 linux/arm64 windows/amd64; do
CGO_ENABLED=0 GOOS=${t%/*} GOARCH=${t#*/} go build -o /dev/null ./cmd/agentiloop
done