Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
bialger committed Aug 14, 2024
2 parents 42ee653 + 1ab8dcc commit e65c1ae
Showing 1 changed file with 39 additions and 21 deletions.
60 changes: 39 additions & 21 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,40 @@ name: "CI tests"
on: [ push, workflow_dispatch ]

jobs:
build:
build-mingw:
name: Tests and 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"
cmake -S . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles"
- name: Build main target
shell: bash
run: |
cmake --build cmake-build-release --target cpp_tests || echo Built with errors
- name: Build tests target
shell: bash
run: |
cmake --build cmake-build-debug --target cpp_tests_tests || echo Built with errors
- name: Run program
working-directory: .\cmake-build-release
run: |
.\cpp_tests.exe --help
- name: Run tests
working-directory: .\cmake-build-debug
run: |
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"
% .\cpp_tests_tests.exe
build-matrix:
name: Tests and application run on ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
Expand All @@ -16,11 +49,6 @@ jobs:
build_type: "Release", cc: "cl", cxx: "cl",
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
}
- {
name: "Windows Latest MinGW", artifact: "Windows-MinGW.tar.xz",
os: windows-latest,
build_type: "Release", cc: "gcc", cxx: "g++"
}
- {
name: "Ubuntu Latest GCC", artifact: "Linux.tar.xz",
os: ubuntu-latest,
Expand All @@ -33,18 +61,13 @@ jobs:
}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create CMake cache
shell: bash
run: |
if [ "${{ matrix.config.cxx }}" == "g++" ]; then
cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles"
cmake -S . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles"
else
cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release
cmake -S . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug
fi
cmake -S . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release
cmake -S . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug
- name: Build main target
shell: bash
Expand Down Expand Up @@ -72,12 +95,7 @@ jobs:
working-directory: ./cmake-build-debug
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
if [ "${{ matrix.config.cxx }}" == "g++" ]; then
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"
# ./cpp_tests_tests.exe
else
./cpp_tests_tests.exe
fi
./cpp_tests_tests.exe
else
cd tests
./cpp_tests_tests
Expand All @@ -87,7 +105,7 @@ jobs:
name: Find memory leaks in tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install valgrind
run: |
Expand Down

0 comments on commit e65c1ae

Please sign in to comment.