Skip to content

Commit 83a547a

Browse files
committed
New CI pipeline.
Config for Travis CI removed. Config for GitHub Actions for 5.7-dev branch added.
1 parent 9b131f5 commit 83a547a

File tree

3 files changed

+89
-179
lines changed

3 files changed

+89
-179
lines changed
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: GitHub Actions CI for 5.7-dev
2+
3+
on:
4+
push:
5+
branches: [5.7-dev]
6+
7+
jobs:
8+
build_and_check:
9+
name: ${{ matrix.config.name }}
10+
runs-on: ${{ matrix.config.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
config:
15+
- {
16+
name: "Windows Latest MSVC",
17+
os: windows-latest,
18+
cc: "cl",
19+
cxx: "cl",
20+
generator: "NMake Makefiles"
21+
}
22+
- {
23+
name: "Ubuntu Latest GCC",
24+
os: ubuntu-latest,
25+
cc: "gcc",
26+
cxx: "g++",
27+
generator: "Unix Makefiles"
28+
}
29+
- {
30+
name: "macOS Latest clang",
31+
os: macos-latest,
32+
cc: "clang",
33+
cxx: "clang++",
34+
generator: "Unix Makefiles"
35+
}
36+
37+
steps:
38+
- uses: actions/checkout@v2
39+
40+
- uses: ilammy/[email protected]
41+
if: startsWith(matrix.config.os, 'windows')
42+
43+
- name: Configure
44+
shell: bash
45+
run: |
46+
mkdir cmake_build
47+
cd cmake_build
48+
cmake \
49+
-DBUILD_TESTS=ON \
50+
-DBUILD_EXAMPLES=OFF \
51+
-DCMAKE_INSTALL_PREFIX=target \
52+
-DCMAKE_BUILD_TYPE=Release \
53+
-G "${{ matrix.config.generator }}" \
54+
../dev/
55+
56+
- name: Build
57+
shell: bash
58+
run: |
59+
cd cmake_build
60+
cmake --build . --config Release
61+
62+
- name: Install
63+
shell: bash
64+
run: |
65+
cd cmake_build
66+
cmake --build . --config Release --target install
67+
68+
- name: Test-On-Windows
69+
if: startsWith(matrix.config.os, 'windows')
70+
shell: bash
71+
run: |
72+
cd cmake_build
73+
./run_tests.bat target Release
74+
75+
- name: Test-On-Unixes
76+
if: ${{ !startsWith(matrix.config.os, 'windows') }}
77+
shell: bash
78+
run: |
79+
cd cmake_build
80+
ctest -C Release --output-on-failure
81+

.travis.yml

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

dev/cmake/run_tests.bat

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
@echo off
12
setlocal
2-
set PATH=%PATH%;${CMAKE_INSTALL_PREFIX}\bin
3-
cmd /c ctest --force-new-ctest-process
3+
4+
if --%1 == -- (set SO5_TARGET_PATH=target) else (set SO5_TARGET_PATH=%1)
5+
if --%2 == -- (set SO5_BUILD_MODE=Release) else (set SO5_BUILD_MODE=%2)
6+
7+
set PATH=%PATH%;%~dp0\%SO5_TARGET_PATH%\bin
8+
cmd /c ctest -C %SO5_BUILD_MODE% --force-new-ctest-process
49
if %errorlevel% neq 0 exit /b 1
10+
511
endlocal

0 commit comments

Comments
 (0)