Skip to content

Fixed workflow for MSVC #9

Fixed workflow for MSVC

Fixed workflow for MSVC #9

Workflow file for this run

name: "CI tests"
on: [ push, workflow_dispatch ]
jobs:
build-mingw:
name: Application run on Windows Latest MinGW
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Create CMake cache
run: |
cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles"
- name: Build main target
shell: bash
run: |
cmake --build cmake-build-release --target SandPile || echo Built with errors
- name: Run program
working-directory: .\cmake-build-release
run: |
.\SandPile.exe --help
build-matrix:
name: Application run on ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows Latest MSVC", artifact: "Windows-MSVC.tar.xz",
os: windows-latest,
build_type: "Release", cc: "cl", cxx: "cl",
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
}
- {
name: "Ubuntu Latest GCC", artifact: "Linux.tar.xz",
os: ubuntu-latest,
build_type: "Release", cc: "gcc", cxx: "g++"
}
- {
name: "macOS Latest Clang", artifact: "macOS.tar.xz",
os: macos-latest,
build_type: "Release", cc: "clang", cxx: "clang++"
}
steps:
- uses: actions/checkout@v4
- name: Create CMake cache
shell: bash
run: |
cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release
- name: Build main target
shell: bash
run: |
cmake --build cmake-build-release --target SandPile || echo "Built with errors"
- name: Run program
shell: bash
working-directory: ./cmake-build-release
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
cd Debug
./SandPile.exe --help
else
./SandPile --help
fi