Skip to content

Commit cbbb8c0

Browse files
committed
Add GitHub Actions CI workflow
Tests run on Linux and macOS (both need a C compiler for the integration tests which compile and run generated C). Windows only builds the Go binary since the generated C uses POSIX APIs. All platforms produce a ccforth build artifact.
1 parent a1aa24b commit cbbb8c0

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
jobs:
10+
test:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: [ubuntu-latest, macos-latest]
15+
runs-on: ${{ matrix.os }}
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: actions/setup-go@v5
20+
with:
21+
go-version: "1.25"
22+
23+
- name: Run tests
24+
run: go test ./...
25+
26+
- name: Build binary
27+
run: go build -o ccforth ./cmd/ccforth
28+
29+
- name: Upload artifact
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: ccforth-${{ matrix.os }}
33+
path: ccforth
34+
35+
build-windows:
36+
runs-on: windows-latest
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- uses: actions/setup-go@v5
41+
with:
42+
go-version: "1.25"
43+
44+
- name: Build binary
45+
run: go build -o ccforth.exe ./cmd/ccforth
46+
47+
- name: Upload artifact
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: ccforth-windows-latest
51+
path: ccforth.exe

0 commit comments

Comments
 (0)