Skip to content

Fix names of command line arguments passed to Config #229

Fix names of command line arguments passed to Config

Fix names of command line arguments passed to Config #229

Workflow file for this run

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-20.04
steps:
- name: Cache Linux Kernels
id: kernel-cache
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/kernel
key: kernels-${{ env.KERNELS }}
lookup-only: true
- name: Install Dependencies
if: steps.kernel-cache.outputs.cache-hit != 'true'
run: sudo apt-get install gcc-7 libelf-dev
- name: Set GCC Version for Kernel Builds
if: steps.kernel-cache.outputs.cache-hit != 'true'
run: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 100
- name: Obtain Linux Kernels
if: steps.kernel-cache.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}
run: |
mkdir -p ${{ github.workspace }}/kernel
git clone https://github.com/viktormalik/rhel-kernel-get.git
pip3 install -r rhel-kernel-get/requirements.txt
for k in $KERNELS; do
rhel-kernel-get/rhel-kernel-get.py $k --output-dir kernel
done
build-and-test:
needs: cache-kernels
runs-on: ubuntu-20.04
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
- name: Delete unused software
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: 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 bc cscope libelf-dev ninja-build
pip install -r requirements.txt
- name: Install LLVM
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-${{ matrix.llvm }} main"
sudo apt-get update
sudo apt-get install llvm-${{ matrix.llvm }} llvm-${{ matrix.llvm }}-dev clang-${{ matrix.llvm }}
sudo ln -s /usr/lib/llvm-${{ matrix.llvm }} /usr/local/lib/llvm
echo "/usr/lib/llvm-${{ matrix.llvm }}/bin" >> $GITHUB_PATH
- 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: CMake
env: ${{ matrix.env }}
working-directory: ${{ github.workspace }}/build
shell: bash
run: cmake $GITHUB_WORKSPACE -GNinja -DSANITIZE_ADDRESS=${{ matrix.asan }}
- name: Build
env: ${{ matrix.env }}
working-directory: ${{ github.workspace }}/build
run: ninja
- name: Install
env: ${{ matrix.env }}
working-directory: ${{ github.workspace }}
run: pip3 install -e .
- name: Run Unit Tests
working-directory: ${{ github.workspace }}
run: |
tests/unit_tests/simpll/runTests
- name: Run Regression Tests
if: matrix.regression-tests
working-directory: ${{ github.workspace }}
run: |
pytest tests
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