ci: remove redundant code #182
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: Build and test all platforms | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**.md' | |
- .gitignore | |
workflow_dispatch: | |
jobs: | |
build-test: | |
name: ${{matrix.config.name}} ${{matrix.build_type}} | |
runs-on: ${{matrix.config.os}} | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: ["Debug", "Release"] | |
config: | |
- { | |
name: "Windows Latest MSVC ", | |
artifact: "windows-msvc-debug.txz", | |
os: windows-latest, | |
cc: "cl", cxx: "cl" | |
} | |
- { | |
name: "Ubuntu Latest GCC ", | |
artifact: "linux-debug.txz", | |
os: ubuntu-latest, | |
cc: "gcc", cxx: "g++" | |
} | |
#- { | |
# name: "macOS Latest Clang", | |
# artifact: "macos.txz", | |
# os: macos-latest, | |
# cc: "clang", cxx: "clang++" | |
# } | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure CMake / Build | |
env: | |
CXX: ${{matrix.config.cxx}} | |
# Use bash so we can use the same syntax for environment variable | |
# access regardless of the host operating system | |
shell: bash | |
working-directory: ${{github.workspace}} | |
run: | | |
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -B build/ src/ | |
cmake --build build/ --config ${{matrix.build_type}} | |
- name: Test | |
shell: bash | |
working-directory: ${{github.workspace}}/build/test | |
run: ctest --output-on-failure -C ${{matrix.build_type}} | |
#- name: Pack | |
# working-directory: ${{github.workspace}}/build | |
# run: cmake -E tar -Jcfv ../${{matrix.config.artifact}} . | |
#- name: Upload | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# path: ./${{matrix.config.artifact}} | |
# name: ${{matrix.config.artifact}} |