Skip to content

Commit

Permalink
added Ctest and Debug and Release
Browse files Browse the repository at this point in the history
  • Loading branch information
RohanKrMahato committed Dec 4, 2024
1 parent 3795b25 commit 7992e57
Showing 1 changed file with 38 additions and 17 deletions.
55 changes: 38 additions & 17 deletions .github/workflows/windows-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,40 +72,61 @@ jobs:
fail-fast: false
matrix:
include:
- { sys: mingw32 }
- { sys: mingw64 }
- { sys: ucrt64 }
- { sys: clang64 }

defaults:
run:
shell: msys2 {0} #default shell
- { sys: mingw32, build_type: Debug }
- { sys: mingw32, build_type: Release }
- { sys: mingw64, build_type: Debug }
- { sys: mingw64, build_type: Release }
- { sys: ucrt64, build_type: Debug }
- { sys: ucrt64, build_type: Release }
- { sys: clang64, build_type: Debug }
- { sys: clang64, build_type: Release }

steps:
- name: 'Checkout'
- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: '${{ matrix.sys }} Setup MSYS2'
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
install: >-
base-devel
git
mingw-w64-x86_64-toolchain
cmake
make
pacboy: >-
toolchain:p
cmake:p
- name: 'Configure'
- name: Add MSYS2 to PATH
run: |
cmake -G "MinGW Makefiles" -B build -DCMAKE_BUILD_TYPE=Release -DOPTION_FORK_SAFE=OFF -DOPTION_BUILD_PLUGINS_BACKTRACE=OFF
- name: 'Build'
echo "C:\\msys64\\${{ matrix.sys }}\\bin" >> $Env:GITHUB_PATH
echo "C:\\msys64\\usr\\bin" >> $Env:GITHUB_PATH
- name: Create build directory
run: mkdir build

- name: Configure with CMake
working-directory: ./build
shell: cmd
run: |
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DOPTION_FORK_SAFE=OFF -DOPTION_BUILD_PLUGINS_BACKTRACE=OFF ..
- name: Build with CMake
working-directory: ./build
shell: cmd
run: |
cmake --build .
- name: Run CTest
working-directory: ./build
run: |
cmake --build build -- -j$(nproc)
ctest -j$(getconf _NPROCESSORS_ONLN) --timeout 5400 --output-on-failure -C ${{ matrix.build_type }}
shell: bash

windows-distributable:
name: Windows Distributable Dispatch
Expand Down

0 comments on commit 7992e57

Please sign in to comment.