Skip to content

Commit ec6bfff

Browse files
committed
Simplify cmake-cpp CI workflow
1 parent 593705a commit ec6bfff

File tree

5 files changed

+35
-303
lines changed

5 files changed

+35
-303
lines changed

.github/workflows/cmake-cpp.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CMake
2+
on:
3+
push:
4+
branches:
5+
- latest
6+
- master
7+
pull_request:
8+
types: [opened, synchronize, reopened]
9+
jobs:
10+
test:
11+
name: ${{ matrix.os }} CMAKE_BUILD_TYPE=${{ matrix.build_type }} ALL_TESTS=${{ matrix.all_tests }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
17+
build_type: ['Release', 'Debug']
18+
all_tests: ['OFF', 'ON']
19+
steps:
20+
- uses: actions/checkout@v4
21+
- shell: bash
22+
run: |
23+
cmake -E make_directory ${{runner.workspace}}/build
24+
cd ${{runner.workspace}}/build
25+
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
26+
cmake $GITHUB_WORKSPACE -DALL_TESTS=${{ matrix.all_tests }}
27+
cmake --build . --parallel --config ${{ matrix.build_type }}
28+
ctest --timeout 300 --output-on-failure -C ${{ matrix.build_type }}
29+
else
30+
cmake $GITHUB_WORKSPACE -DALL_TESTS=${{ matrix.all_tests }} \
31+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
32+
cmake --build . --parallel
33+
ctest --timeout 300 --output-on-failure --parallel
34+
fi

.github/workflows/cmake-linux-cpp.yml

Lines changed: 0 additions & 101 deletions
This file was deleted.

.github/workflows/cmake-macos-cpp.yml

Lines changed: 0 additions & 101 deletions
This file was deleted.

.github/workflows/cmake-windows-cpp.yml

Lines changed: 0 additions & 100 deletions
This file was deleted.

.github/workflows/test-fortran.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
version: ${{ matrix.version }}
3232
- run: |
3333
cmake -E make_directory ${{runner.workspace}}/build
34-
cd build
34+
cd ${{runner.workspace}}
3535
cmake $GITHUB_WORKSPACE -DFORTRAN=ON
3636
cmake --build . --parallel
3737
./bin/fortrantest

0 commit comments

Comments
 (0)