Skip to content

ci: force bash shell #190

ci: force bash shell

ci: force bash shell #190

Workflow file for this run

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.txz",
os: windows-latest,
shell: bash,
cc: "cl", cxx: "cl"
}
- {
name: "Ubuntu Latest GCC ",
artifact: "ubuntu.txz",
os: ubuntu-latest,
shell: bash,
cc: "gcc", cxx: "g++"
}
- {
name: "Windows Latest MINGW ",
artifact: "windows-mingw.txz",
os: windows-latest,
shell: bash,
cc: "gcc", cxx: "g++"
}
#- {
# name: "macOS Latest Clang",
# artifact: "macos.txz",
# os: macos-latest,
# cc: "clang", cxx: "clang++"
# }
defaults:
run:
shell: ${{ matrix.config.shell }}
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
steps:
- uses: actions/checkout@v4
- name: Configure CMake / Build
working-directory: ${{github.workspace}}
run: |
CXX=${{ matrix.config.cxx }} cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -B build/ src/
cmake --build build/ --config ${{matrix.build_type}}
- name: Test
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.build_type}}${{matrix.config.artifact}} .
#- name: Upload
# uses: actions/upload-artifact@v4
# with:
# path: ./${{matrix.build_type}}${{matrix.config.artifact}}
# name: ${{matrix.build_type}}${{matrix.config.artifact}}