mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-09-20 03:29:05 +01:00
eabe36315a
Add LLVM-16 to the Nix builds and CI matrix. Also add the option to explicitly select an LLVM version so the CircleCI build can still work as before. We should support at least LLVM-17 currently, but there appears to be a significant performance regression in compiling the generated code for large variants that I'm going to debug separately. The long term goal is to support and test all versions 15 and up. Test plan: - CI
55 lines
1.9 KiB
YAML
55 lines
1.9 KiB
YAML
name: CI
|
|
on:
|
|
pull_request:
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4.1.7
|
|
- uses: cachix/install-nix-action@v27
|
|
with:
|
|
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: nix fmt
|
|
run: |-
|
|
nix --experimental-features 'nix-command flakes' fmt
|
|
git diff --exit-code
|
|
|
|
build-test:
|
|
runs-on: 16-core-ubuntu
|
|
strategy:
|
|
matrix:
|
|
llvm_version: [15, 16]
|
|
steps:
|
|
- uses: actions/checkout@v4.1.7
|
|
- uses: cachix/install-nix-action@v27
|
|
with:
|
|
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: build (LLVM ${{ matrix.llvm_version }})
|
|
# Run the build manually in `nix develop` to keep non-outputs around
|
|
run: |
|
|
nix develop .#oid-llvm${{ matrix.llvm_version }} --command cmake -B build -G Ninja -DWITH_FLAKY_TESTS=Off -DFORCE_BOOST_STATIC=Off
|
|
nix develop .#oid-llvm${{ matrix.llvm_version }} --command ninja -C build
|
|
- name: test (LLVM ${{ matrix.llvm_version }})
|
|
env:
|
|
# disable drgn multithreading as tests are already run in parallel
|
|
OMP_NUM_THREADS: 1
|
|
run: |
|
|
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
|
|
nix develop .#oid-llvm${{ matrix.llvm_version }} --command ./tools/config_gen.py -c clang++ build/testing.oid.toml
|
|
nix develop .#oid-llvm${{ matrix.llvm_version }} --command ctest \
|
|
--test-dir build/test/ \
|
|
--test-action Test \
|
|
--parallel \
|
|
--no-compress-output \
|
|
--schedule-random \
|
|
--timeout 90 \
|
|
--repeat until-pass:3 \
|
|
--exclude-from-file ../../.github/workflows/tests_failing_under_nix.txt \
|
|
--output-junit results.xml
|
|
- name: upload results
|
|
uses: actions/upload-artifact@v4
|
|
if: success() || failure()
|
|
with:
|
|
name: test-results-${{ matrix.llvm_version }}
|
|
path: build/test/results.xml
|