Skip to content

Commit

Permalink
ci: insert build_type directly into matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
morinim committed Jun 19, 2024
1 parent 6c2d2aa commit 3288f8e
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,45 +12,41 @@ on:

jobs:
build-test:
name: ${{matrix.config.name}}
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 Debug",
artifact: "windows-msvc-debug.txz",
os: windows-latest,
build_type: "Debug",
cc: "cl", cxx: "cl"
}
- {
name: "Windows Latest MSVC Release",
artifact: "windows-msvc-release.txz",
os: windows-latest,
build_type: "Release",
cc: "cl", cxx: "cl"
}
- {
name: "Ubuntu Latest GCC Debug",
artifact: "linux-debug.txz",
os: ubuntu-latest,
build_type: "Debug",
cc: "gcc", cxx: "g++"
}
- {
name: "Ubuntu Latest GCC Releas",
artifact: "linux-release.txz",
os: ubuntu-latest,
build_type: "Release",
cc: "gcc", cxx: "g++"
}
#- {
# name: "macOS Latest Clang",
# artifact: "macos.txz",
# os: macos-latest,
# build_type: "Release",
# cc: "clang", cxx: "clang++"
# }

Expand All @@ -65,12 +61,12 @@ jobs:
shell: bash
working-directory: ${{github.workspace}}
run: |
cmake -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} -B build/ src/
cmake --build build/ --config ${{matrix.config.build_type}}
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.config.build_type}}
run: ctest --output-on-failure -C ${{matrix.build_type}}

#- name: Pack
# working-directory: ${{github.workspace}}/build
Expand Down

0 comments on commit 3288f8e

Please sign in to comment.