Enable linking missing source modules for wrapper-built snapshots #332
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
env: | |
KERNELS: > | |
3.10.0-514.el7 | |
3.10.0-693.el7 | |
3.10.0-862.el7 | |
3.10.0-957.el7 | |
4.18.0-80.el8 | |
4.18.0-147.el8 | |
4.18.0-193.el8 | |
4.18.0-240.el8 | |
3.10 | |
4.11 | |
jobs: | |
cache-kernels: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: DeterminateSystems/nix-installer-action@v4 | |
- uses: DeterminateSystems/magic-nix-cache-action@v2 | |
- name: Cache Linux Kernels | |
id: kernel-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ github.workspace }}/kernel | |
key: kernels-${{ env.KERNELS }} | |
lookup-only: true | |
- name: Delete unused software | |
if: steps.kernel-cache.outputs.cache-hit != 'true' | |
# This is necessary for running CScope database build as it takes | |
# a lot of disk space and the runners die silently when out of space. | |
run: | | |
sudo rm -rf /usr/local/lib/android | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /opt/ghc | |
sudo rm -rf /opt/hostedtoolcache/CodeQL | |
- name: Get Linux Kernels | |
if: steps.kernel-cache.outputs.cache-hit != 'true' | |
working-directory: ${{ github.workspace }} | |
run: | | |
mkdir kernel | |
for k in $KERNELS; do | |
nix develop .#test-kernel-buildenv --command bash -c \ | |
"rhel-kernel-get $k --output-dir kernel && \ | |
make -C kernel/linux-$k cscope" | |
done | |
build-and-test: | |
needs: cache-kernels | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
llvm: [9, 10, 11, 12, 13, 14, 15, 16] | |
env: | |
- CC: gcc-9 | |
CXX: g++-9 | |
asan: [OFF] | |
regression-tests: [true] | |
include: | |
- llvm: 16 | |
env: | |
CC: clang | |
CXX: clang++ | |
asan: OFF | |
regression-tests: true | |
- llvm: 14 | |
env: | |
CC: gcc-9 | |
CXX: g++-9 | |
asan: ON | |
regression-tests: false | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: DeterminateSystems/nix-installer-action@v4 | |
- uses: DeterminateSystems/magic-nix-cache-action@v2 | |
- name: Delete unused software | |
# This is necessary for running CScope database build as it takes | |
# a lot of disk space and the runners die silently when out of space. | |
run: | | |
sudo rm -rf /usr/local/lib/android | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /opt/ghc | |
sudo rm -rf /opt/hostedtoolcache/CodeQL | |
- name: Restore Kernels | |
uses: actions/cache/restore@v3 | |
if: matrix.regression-tests | |
with: | |
path: ${{ github.workspace }}/kernel | |
key: kernels-${{ env.KERNELS }} | |
fail-on-cache-miss: true | |
- name: Prepare Build Environment | |
run: | | |
mkdir -p ${{ github.workspace }}/build | |
- name: Configure and Build | |
env: ${{ matrix.env }} | |
run: > | |
nix develop .#diffkemp-llvm${{ matrix.llvm }} --command bash -c | |
"cmake -B build ${{ github.workspace }} -GNinja -DSANITIZE_ADDRESS=${{ matrix.asan }} && | |
ninja -C build" | |
- name: Run SimpLL Unit Tests | |
run: > | |
nix develop .#diffkemp-llvm${{ matrix.llvm }} --command | |
ninja test -C build | |
- name: Run Tests | |
if: matrix.regression-tests | |
shell: bash | |
run: > | |
nix develop .#diffkemp-llvm${{ matrix.llvm }} --command bash -c | |
"setuptoolsShellHook && | |
pytest tests -v" | |
code-style: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install Dependencies | |
working-directory: ${{ github.workspace }} | |
shell: bash | |
run: | | |
sudo apt-get install clang-format | |
pip install flake8 | |
- name: Check Coding Style | |
working-directory: ${{ github.workspace }} | |
shell: bash | |
run: | | |
flake8 diffkemp --exclude=llreve --ignore=F403,F405,W504 | |
flake8 tests | |
tools/check-clang-format.sh -d | |
result-viewer: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [14.x, 16.x, 18.x, 20.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node ${{ matrix.node }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Install dependencies and cache them | |
uses: cypress-io/github-action@v5 | |
with: | |
runTests: false | |
working-directory: view | |
- name: Run RTL tests | |
run: npm test --prefix view | |
- name: Run Cypress tests | |
uses: cypress-io/github-action@v5 | |
with: | |
install: false | |
component: true | |
browser: firefox | |
working-directory: view | |
config: video=false,screenshotOnRunFailure=false | |
- name: Check coding style with ESLint | |
run: npm run lint --prefix view | |
- name: Create build | |
run: CI=false npm run build --prefix view |