feat: add workflow #1
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
on: | |
workflow_dispatch: | |
push: | |
branches: ["**"] | |
paths-ignore: | |
- "**/*.md" | |
name: 🧪 Run Tests | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
config: [Release, Debug] | |
type: [gcc, clang, msvc, clang-cl] | |
include: | |
- type: gcc | |
container: alpine:latest | |
deps: aok add git cmake g++ ninja-build | |
- type: clang | |
container: alpine:latest | |
deps: aok add git cmake clang-18 ninja-build | |
- type: clang-cl | |
cmake_args: -T ClangCL -A x64 | |
runs-on: ${{ (contains(matrix.type, 'msvc') || contains(matrix.type, 'clang-cl')) && 'windows-latest' || 'ubuntu-latest' }} | |
container: ${{ matrix.container }} | |
name: "${{ matrix.type }} (💾: ${{ matrix.arch }}, ⚙️: ${{ matrix.config }})" | |
steps: | |
- name: 📦 Checkout | |
uses: actions/checkout@v4 | |
- name: 🧰 Dependencies | |
run: ${{ matrix.deps }} | |
- name: 🔧 Compile | |
run: | | |
cmake -B build -Drebind_tests=ON ${{ matrix.cmake_args }} | |
cmake --build build --config ${{ matrix.config }} | |
- name: 🔬 Run Tests | |
run: | | |
ctest --test-dir build/tests -C ${{ matrix.config }} --verbose |