Skip to content

Commit bbe7907

Browse files
committed
Separated MinGW from matrix
1 parent 59d7258 commit bbe7907

File tree

1 file changed

+42
-24
lines changed

1 file changed

+42
-24
lines changed

.github/workflows/ci_tests.yml

Lines changed: 42 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,40 @@ name: "CI tests"
33
on: [ push ]
44

55
jobs:
6-
build:
6+
build-mingw:
7+
name: Tests and application run on Windows Latest MinGW
8+
runs-on: windows-latest
9+
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Create CMake cache
14+
run: |
15+
cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles"
16+
cmake -S . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles"
17+
18+
- name: Build main target
19+
shell: bash
20+
run: |
21+
cmake --build cmake-build-release --target cpp_tests || echo Built with errors
22+
23+
- name: Build tests target
24+
shell: bash
25+
run: |
26+
cmake --build cmake-build-debug --target cpp_tests_tests || echo Built with errors
27+
28+
- name: Run program
29+
working-directory: .\cmake-build-release\bin
30+
run: |
31+
.\cpp_tests.exe --help
32+
33+
- name: Run tests
34+
working-directory: .\cmake-build-debug\tests
35+
run: |
36+
echo "Currently unable to run tests on Windows Latest MinGW. See https://gitmemories.com/cristianadam/HelloWorld/issues/12 and https://github.com/microsoft/vscode-cmake-tools/issues/2451"
37+
% .\cpp_tests_tests.exe
38+
39+
build-matrix:
740
name: Tests and application run on ${{ matrix.config.name }}
841
runs-on: ${{ matrix.config.os }}
942
strategy:
@@ -16,11 +49,6 @@ jobs:
1649
build_type: "Release", cc: "cl", cxx: "cl",
1750
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
1851
}
19-
- {
20-
name: "Windows Latest MinGW", artifact: "Windows-MinGW.tar.xz",
21-
os: windows-latest,
22-
build_type: "Release", cc: "gcc", cxx: "g++"
23-
}
2452
- {
2553
name: "Ubuntu Latest GCC", artifact: "Linux.tar.xz",
2654
os: ubuntu-latest,
@@ -38,13 +66,8 @@ jobs:
3866
- name: Create CMake cache
3967
shell: bash
4068
run: |
41-
if [ "${{ matrix.config.cxx }}" == "g++" ]; then
42-
cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles"
43-
cmake -S . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles"
44-
else
45-
cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release
46-
cmake -S . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug
47-
fi
69+
cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release
70+
cmake -S . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug
4871
4972
- name: Build main target
5073
shell: bash
@@ -61,26 +84,21 @@ jobs:
6184
working-directory: ./cmake-build-release
6285
run: |
6386
if [ "$RUNNER_OS" == "Windows" ]; then
64-
./cpp_tests.exe --help
87+
./cpp_tests.exe --help
6588
else
66-
cd bin
67-
./cpp_tests --help
89+
cd bin
90+
./cpp_tests --help
6891
fi
6992
7093
- name: Run tests
7194
shell: bash
7295
working-directory: ./cmake-build-debug
7396
run: |
7497
if [ "$RUNNER_OS" == "Windows" ]; then
75-
if [ "${{ matrix.config.cxx }}" == "g++" ]; then
76-
echo "Currently unable to run tests on ${{ matrix.config.name }}. See https://gitmemories.com/cristianadam/HelloWorld/issues/12 and https://github.com/microsoft/vscode-cmake-tools/issues/2451"
77-
# ./cpp_tests_tests.exe
78-
else
79-
./cpp_tests_tests.exe
80-
fi
98+
./cpp_tests_tests.exe
8199
else
82-
cd tests
83-
./cpp_tests_tests
100+
cd tests
101+
./cpp_tests_tests
84102
fi
85103
86104
memory-leaks:

0 commit comments

Comments
 (0)