-
Notifications
You must be signed in to change notification settings - Fork 12
92 lines (79 loc) · 2.97 KB
/
Copy pathbuild-linux.yml
File metadata and controls
92 lines (79 loc) · 2.97 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
88
89
90
91
92
name: Build Linux
on:
push:
branches: [ master, development ]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
ninja-build libtbb-dev zlib1g-dev libpython3-dev \
libgl1-mesa-dev xorg-dev \
libwayland-dev libxkbcommon-dev wayland-protocols extra-cmake-modules
# A complete, self-consistent LLVM + Clang dev toolchain (static libs and
# cmake config), which the distribution packages do not provide.
- name: Setup LLVM/Clang toolchain
uses: mamba-org/setup-micromamba@v2
with:
environment-name: llvm
create-args: >-
llvmdev=20.1
clangdev=20.1
lld=20.1
zlib
zstd
libxml2-devel
init-shell: bash
cache-environment: true
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ github.job }}-${{ runner.os }}
max-size: 2G
- name: Cache AnyDSL toolchain (thorin/artic/runtime)
uses: actions/cache@v4
with:
path: deps
key: anydsl-deps-${{ runner.os }}-${{ hashFiles('scripts/setup/config.json', 'scripts/setup/*.ps1') }}
restore-keys: |
anydsl-deps-${{ runner.os }}-
- name: Cache CPM sources
uses: actions/cache@v4
with:
path: .cpm-cache
key: cpm-${{ runner.os }}-${{ hashFiles('cmake/Dependencies.cmake') }}
restore-keys: |
cpm-${{ runner.os }}-
- name: Generate CI setup config
shell: bash -el {0}
run: |
pwsh -NoProfile -Command '
$cfg = Get-Content scripts/setup/config.json -Raw | ConvertFrom-Json
$cfg.LOCATION = "$env:GITHUB_WORKSPACE/deps"
$cfg.LLVM.SYSTEM_DIR = "$env:CONDA_PREFIX"
$cfg.CMAKE.EXTRA_ARGS += "-DCMAKE_C_COMPILER_LAUNCHER=ccache"
$cfg.CMAKE.EXTRA_ARGS += "-DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
$cfg | ConvertTo-Json -Depth 16 | Set-Content scripts/setup/config.ci.json
'
- name: Setup dependencies and build Ignis
shell: bash -el {0}
run: |
export CMAKE_PREFIX_PATH="$CONDA_PREFIX:$CMAKE_PREFIX_PATH"
export CPM_SOURCE_CACHE="$GITHUB_WORKSPACE/.cpm-cache"
pwsh ./scripts/setup/setup.ps1 -config_file scripts/setup/config.ci.json
- name: Run tests
shell: bash -el {0}
run: |
export LD_LIBRARY_PATH="$CONDA_PREFIX/lib:$LD_LIBRARY_PATH"
ctest --test-dir build/Release --output-on-failure -E "(ignis_test_integrator)|(ignis_test_multiple_runtimes)"