Skip to content

Commit e65c1ae

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 42ee653 + 1ab8dcc commit e65c1ae

File tree

1 file changed

+39
-21
lines changed

1 file changed

+39
-21
lines changed

.github/workflows/ci_tests.yml

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,40 @@ name: "CI tests"
33
on: [ push, workflow_dispatch ]
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
30+
run: |
31+
.\cpp_tests.exe --help
32+
33+
- name: Run tests
34+
working-directory: .\cmake-build-debug
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,
@@ -33,18 +61,13 @@ jobs:
3361
}
3462

3563
steps:
36-
- uses: actions/checkout@v3
64+
- uses: actions/checkout@v4
3765

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
@@ -72,12 +95,7 @@ jobs:
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
82100
cd tests
83101
./cpp_tests_tests
@@ -87,7 +105,7 @@ jobs:
87105
name: Find memory leaks in tests
88106
runs-on: ubuntu-latest
89107
steps:
90-
- uses: actions/checkout@v3
108+
- uses: actions/checkout@v4
91109

92110
- name: Install valgrind
93111
run: |

0 commit comments

Comments
 (0)