|
name: Cpp |
|
on: |
|
workflow_call: |
|
pull_request: |
|
push: |
|
branches: |
|
- master |
|
|
|
jobs: |
|
build_clang: |
|
runs-on: ubuntu-latest |
|
steps: |
|
- uses: actions/checkout@v4 |
|
- name: Cache apt packages |
|
uses: actions/cache@v4 |
|
with: |
|
path: /var/cache/apt/archives |
|
key: ${{ runner.os }}-apt-${{ hashFiles('debian_deps.txt') }} |
|
restore-keys: | |
|
${{ runner.os }}-apt- |
|
- name: Install dependencies |
|
run: sudo apt install $(cat debian_deps.txt) |
|
- name: Set up Python 3.11 |
|
id: setup-python |
|
uses: actions/setup-python@v5 |
|
with: |
|
python-version: "3.11" |
|
cache: "pip" |
|
- name: upgrade pip |
|
run: pip install --upgrade pip |
|
- name: Install Python dependencies |
|
run: pip install --group dev --group build_deps |
|
- name: Check clang format |
|
run: make cppcheckformat |
|
# - name: Clang Tidy |
|
# run: make cpplint |
|
- name: Clang build |
|
run: make clangcompile PYTHON_EXECUTABLE=${{ steps.setup-python.outputs.python-path }} |
|
|
|
build_gcc: |
|
runs-on: ubuntu-latest |
|
steps: |
|
- uses: actions/checkout@v4 |
|
- name: Cache apt packages |
|
uses: actions/cache@v4 |
|
with: |
|
path: /var/cache/apt/archives |
|
key: ${{ runner.os }}-apt-${{ hashFiles('debian_deps.txt') }} |
|
restore-keys: | |
|
${{ runner.os }}-apt- |
|
- name: Install dependencies |
|
run: sudo apt install $(cat debian_deps.txt) |
|
- name: Set up Python 3.11 |
|
id: setup-python |
|
uses: actions/setup-python@v5 |
|
with: |
|
python-version: "3.11" |
|
cache: "pip" |
|
- name: upgrade pip |
|
run: pip install --upgrade pip |
|
- name: Install Python dependencies |
|
run: pip install --group dev --group build_deps |
|
- name: GCC build |
|
run: make gcccompile PYTHON_EXECUTABLE=${{ steps.setup-python.outputs.python-path }} |