-
Notifications
You must be signed in to change notification settings - Fork 15
58 lines (48 loc) · 1.78 KB
/
Copy pathc-cpp.yml
File metadata and controls
58 lines (48 loc) · 1.78 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
name: asan-build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
env:
BUILD_TYPE: Debug
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
# install dependencies
- name: Install GoogleTest
run: sudo apt-get update && sudo apt-get install -y libgtest-dev cmake
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -yq \
build-essential cmake ninja-build clang pkg-config \
libboost-dev libfl-dev libtbb-dev capnproto libcapnp-dev \
libgtest-dev libspdlog-dev libfmt-dev libboost-iostreams-dev zlib1g-dev
- name: Configure CMake
working-directory: ${{github.workspace}}/
run: |
rm -rf build
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -GNinja -DCMAKE_C_COMPILER=clang -DENABLE_SANITIZERS=ON -DPYTHON_INTERFACE=OFF -DCMAKE_CXX_STANDARD=20
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Generate Naja IF test inputs with the local Naja checkout
working-directory: ${{github.workspace}}/examples/tinyrocket
run: |
python3 -m pip install --upgrade "scikit-build-core>=0.11.3,<0.12"
CMAKE_ARGS="-DPREGENERATED_PARSER_SOURCES=OFF" \
python3 -m pip install --no-build-isolation "${{github.workspace}}/thirdparty/naja"
python3 to_naja_if.py
python3 edit.py
- name: Test
working-directory: ${{github.workspace}}/build
env:
PYTHONMALLOC: malloc
run: ctest -VV -E ".*[p|P]ython.*" -C ${{ env.BUILD_TYPE }}