Repository navigation
64 lines (60 loc) · 2.22 KB
/
Copy pathci.yml
File metadata and controls
64 lines (60 loc) · 2.22 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# 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
# Builds this repo and its Rust twin (AgentiLoopCLI, main) and runs the twin's
# scripts/parity.py: flags, /help, provider requests, --json/--stream-json output and
# session files must match, and each binary must resume the other's sessions.
parity:
name: parity (Go ↔ Rust)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: AgentiLoop/AgentiLoopCLI
path: AgentiLoopCLI
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: AgentiLoopCLI
- run: go build -o agentiloop ./cmd/agentiloop
- run: cd AgentiLoopCLI && cargo build -p agentiloop
- run: python3 AgentiLoopCLI/scripts/parity.py --rust AgentiLoopCLI/target/debug/agentiloop --go agentiloop --rust-src AgentiLoopCLI --go-src .