Repository navigation
87 lines (76 loc) · 2.9 KB
/
Copy pathci.yml
File metadata and controls
87 lines (76 loc) · 2.9 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: CI Test Suite
on:
push:
branches: [ main, master, 'feature/**', 'feat/**' ]
pull_request:
branches: [ main, master ]
workflow_dispatch:
jobs:
test:
name: Test (${{ matrix.target }} - Go ${{ matrix.go-version }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
# Linux
- target: Linux
runner: ubuntu-latest
is_android: false
go-version: '1.27.3'
- target: Linux
runner: ubuntu-latest
is_android: false
go-version: '1.27'
# Windows
- target: Windows
runner: windows-latest
is_android: false
go-version: '1.27.3'
- target: Windows
runner: windows-latest
is_android: false
go-version: '1.27'
# Android (Termux ARM64)
- target: Android
runner: ubuntu-latest
is_android: true
go-version: '1.27.3'
- target: Android
runner: ubuntu-latest
is_android: true
go-version: '1.27'
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: false
- name: Run Unit Tests (Native)
if: ${{ !matrix.is_android }}
run: go test ./... -v
- name: Build Standalone Binary (Native)
if: ${{ !matrix.is_android }}
run: go build -o bramand-test main.go
- name: Execute End-to-End Language Tests (Linux)
if: ${{ matrix.target == 'Linux' }}
run: ./bramand-test test
- name: Compile Test Suites (Android Termux ARM64)
if: ${{ matrix.is_android }}
run: |
GOOS=android GOARCH=arm64 CGO_ENABLED=0 go test -c ./ast -o /dev/null
GOOS=android GOARCH=arm64 CGO_ENABLED=0 go test -c ./code -o /dev/null
GOOS=android GOARCH=arm64 CGO_ENABLED=0 go test -c ./lexer -o /dev/null
GOOS=android GOARCH=arm64 CGO_ENABLED=0 go test -c ./parser -o /dev/null
GOOS=android GOARCH=arm64 CGO_ENABLED=0 go test -c ./compiler -o /dev/null
GOOS=android GOARCH=arm64 CGO_ENABLED=0 go test -c ./vm -o /dev/null
GOOS=android GOARCH=arm64 CGO_ENABLED=0 go test -c ./formatter -o /dev/null
GOOS=android GOARCH=arm64 CGO_ENABLED=0 go test -c ./diagnostics -o /dev/null
GOOS=android GOARCH=arm64 CGO_ENABLED=0 go test -c ./stdlib -o /dev/null
GOOS=android GOARCH=arm64 CGO_ENABLED=0 go test -c ./pkg -o /dev/null
GOOS=android GOARCH=arm64 CGO_ENABLED=0 go test -c ./repl -o /dev/null
- name: Build Standalone Binary (Android Termux ARM64)
if: ${{ matrix.is_android }}
run: GOOS=android GOARCH=arm64 CGO_ENABLED=0 go build -v -o bramand-android-arm64 main.go