Fix violation of One Definition Rule #67
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: [pull_request, push] | |
permissions: | |
actions: write | |
security-events: write | |
jobs: | |
CI: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, ubuntu-latest] | |
cpp_std: [c++14, c++20] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: Chocobo1/setup-ccache-action@v1 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: install tools | |
run: pip install meson ninja | |
- name: run tests | |
run: | | |
cd "tests" | |
meson setup "_build" -Dcpp_std="${{ matrix.cpp_std }}" | |
meson test -C "_build" -v --test-args "-d yes" | |
- name: initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
if: startsWith(matrix.os, 'ubuntu') && (matrix.cpp_std == 'c++20') | |
with: | |
languages: cpp | |
config-file: ./.github/workflows/codeql/cpp.yaml | |
- name: build sample program | |
run: | | |
cd "src/program" | |
meson setup "_build" -Dcpp_std="${{ matrix.cpp_std }}" | |
meson compile -C "_build" | |
- name: perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 | |
if: startsWith(matrix.os, 'ubuntu') && (matrix.cpp_std == 'c++20') | |
CI_Windows: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
cpp_std: [c++14, c++latest] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: install tools | |
run: pip install meson ninja | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: run tests | |
run: | | |
cd "tests" | |
meson setup "_build" -Dcpp_std="${{ matrix.cpp_std }}" -Db_sanitize=none | |
meson test -C "_build" -v --test-args "-d yes" | |
- name: build sample program | |
run: | | |
cd "src/program" | |
meson setup "_build" -Dcpp_std="${{ matrix.cpp_std }}" | |
meson compile -C "_build" |