-
Notifications
You must be signed in to change notification settings - Fork 4
81 lines (79 loc) · 3.3 KB
/
compile.yml
File metadata and controls
81 lines (79 loc) · 3.3 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
name: Compile
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: install tools
run: sudo apt update && sudo apt install clang-format
- name: set clang-format
run: sudo unlink /usr/bin/clang-format && sudo ln -s /usr/bin/clang-format-18 /usr/bin/clang-format
- name: run clang-format
run: ./etc/clang-format-diff.sh
ci:
if: (github.event_name == 'push') || (github.event_name == 'pull_request' && (github.event.pull_request.head.repo.full_name != github.repository))
runs-on: ubuntu-latest
container:
image: ghcr.io/fix-project/wasm_toolchain_docker:latest
options: '--privileged'
strategy:
matrix:
sanitizer: [normal, asan, ubsan, tsan]
type: [debug, release]
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: limit ASLR for sanitizers
run: sudo sysctl -w vm.mmap_rnd_bits=28 # https://github.com/actions/runner/issues/3207 / https://github.com/google/sanitizers/issues/1614
- name: install deps
run: sudo apt update && sudo apt-get install libboost-all-dev libgoogle-glog-dev software-properties-common -y
- name: install g++ 13
run: sudo add-apt-repository 'ppa:ubuntu-toolchain-r/test' && sudo apt update && sudo apt-get install gcc-13 g++-13 -y
- name: install gh
run: sudo apt install gh -y
- shell: bash
run: 'echo HOME=/home | sudo tee -a $GITHUB_ENV'
- if: matrix.sanitizer == 'asan'
name: enable address sanitizer
run: echo "sanitize_flags=-DUSE_ASAN=ON" >> "$GITHUB_ENV"
- if: matrix.sanitizer == 'ubsan'
name: enable undefined-behavior sanitizer
run: echo "sanitize_flags=-DUSE_UBSAN=ON" >> "$GITHUB_ENV"
- if: matrix.sanitizer == 'tsan'
name: enable thread sanitizer
run: echo "sanitize_flags=-DUSE_TSAN=ON" >> "$GITHUB_ENV"
- if: matrix.type == 'debug'
name: configure debug build
run: echo "configure_flags=-DCMAKE_BUILD_TYPE=Debug" >> "$GITHUB_ENV"
- if: matrix.type == 'release'
name: configure release build
run: echo "configure_flags=-DCMAKE_BUILD_TYPE=Release" >> "$GITHUB_ENV"
- name: cmake
run: cmake -S . -B out ${configure_flags} ${sanitize_flags} -DCMAKE_C_COMPILER=gcc-13 -DCMAKE_CXX_COMPILER=g++-13
- name: compile
run: cmake --build out --parallel 8
- name: download bootstrap seed
run: gh release download v0.94 --pattern 'bootstrap.tar.gz' --repo 'fix-project/bootstrap'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: untar bootstrap seed
run: tar -xvzf bootstrap.tar.gz
- name: print directory structure
run: ls -R -a
- name: unit test
run: cmake --build out --target unit-test
- name: fixpoint test
run: cmake --build out --target fixpoint-check
- name: fixpoint local scheduler test
run: cmake --build out --target local-fixpoint-check
- name: flatware test
run: cmake --build out --target flatware-check
typecheck-spec:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
- name: Compile
run: ghc docs/fix.hs