-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.23 KB
/
Copy pathci.yml
File metadata and controls
51 lines (43 loc) · 1.23 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
env:
C3_BASE_URL: https://github.com/c3lang/c3c/releases/download/v0.8.1
jobs:
test:
name: test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
asset: c3-linux.tar.gz
- os: macos-latest
asset: c3-macos.zip
steps:
- uses: actions/checkout@v4
- name: Install C3 compiler
run: |
curl -fsSL -o c3-archive "$C3_BASE_URL/${{ matrix.asset }}"
case "${{ matrix.asset }}" in
*.zip) unzip -q c3-archive ;;
*) tar -xzf c3-archive ;;
esac
echo "$PWD/c3" >> "$GITHUB_PATH"
- run: c3c --version
- name: Type-check every platform backend
run: |
for target in linux-x64 linux-aarch64 macos-x64 macos-aarch64; do
echo "== $target =="
c3c compile-only --target "$target" $(find src -name '*.c3')
done
- name: Test
run: c3c test -vv --test-show-output
- name: Build examples
working-directory: examples
run: c3c build all --trust=full