Repository navigation
68 lines (63 loc) · 1.83 KB
/
Copy pathci.yml
File metadata and controls
68 lines (63 loc) · 1.83 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
name: CI
on:
push:
branches: ["**"]
pull_request:
jobs:
tests:
name: tests (${{ matrix.cc }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cc: [gcc, clang]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install clang
if: matrix.cc == 'clang'
run: sudo apt-get update && sudo apt-get install -y clang
- name: Run test suite
run: CC=${{ matrix.cc }} python3 tests/run_tests.py
- name: Run examples
run: |
for f in examples/*.pyke; do
case "$f" in *chat_net*) continue;; esac
echo "== $f"
CC=${{ matrix.cc }} timeout 600 ./scripts/pyke run "$f" < /dev/null > /dev/null
done
sanitizers:
name: ASan + UBSan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Test suite under sanitizers
run: python3 tests/run_tests.py --sanitize
llvm-backend:
name: LLVM backend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: sudo apt-get update && sudo apt-get install -y clang
- name: Build and run through LLVM IR
run: |
./scripts/pyke run examples/hello.pyke --backend=llvm
./scripts/pyke ll examples/fib.pyke
warnings:
name: Runtime warnings
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Compile runtime with -Wall -Wextra -Werror
run: |
for f in runtime/*.c; do
gcc -std=c99 -O2 -Wall -Wextra -Wshadow -Werror -Iruntime -c "$f" -o /dev/null
done