Skip to content

linux

linux #20

Workflow file for this run

name: linux
on:
pull_request:
types: [opened, synchronize]
branches:
- "*"
# Allow manual trigger for this workflow.
workflow_dispatch:
# Run every Monday
schedule:
- cron: "0 0 * * 1"
jobs:
build:
runs-on: ubuntu-latest
name: linux
defaults:
run:
shell: "bash -el {0}"
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Add repositories for GCC
run: sudo apt-add-repository ppa:ubuntu-toolchain-r/test
- name: Install GCC
run: |
sudo apt update
sudo apt install g++-13 cmake ninja-build
- name: Create build directory
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure
env:
CC: gcc-13
CXX: g++-13
working-directory: ${{runner.workspace}}/build
run: |
cmake ${{github.workspace}} -DCMAKE_BUILD_TYPE=RelWithDebInfo -Wno-deprecated -G Ninja -DMINI_OPT_SERIALIZATION=ON -DMINI_OPT_TRACING=ON
- name: Build
working-directory: ${{runner.workspace}}/build
run: |
threads=`nproc`
cmake --build . --config RelWithDebInfo --parallel $threads
- name: Run CTest
working-directory: ${{runner.workspace}}/build
run: ctest --output-on-failure
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install pre-commit
run: python -m pip install pre-commit
- name: Pre-commit checks
working-directory: ${{github.workspace}}
run: pre-commit run --all-files