@@ -16,55 +16,40 @@ jobs:
1616 env :
1717 GITHUB_TOKEN : ${{ secrets.TOKEN }}
1818
19- build-ubuntu :
19+ build-linux :
2020 runs-on : ubuntu-18.04
21+ container : ${{ matrix.config.container }}
2122 needs : format
2223 strategy :
2324 matrix :
24- cc : [gcc, clang]
25- cxx : [g++, clang++]
26- config : [Debug, Release]
27- exclude :
28- - cc : gcc
29- cxx : clang++
30- - cc : clang
31- cxx : g++
25+ config :
26+ - {container: "geodesolutions/ubuntu", cmake_args: "-DCMAKE_BUILD_TYPE=Debug", system: ubuntu}
27+ - {container: "geodesolutions/ubuntu", cmake_args: "-DCMAKE_BUILD_TYPE=Release -DUSE_BENCHMARK=ON", system: ubuntu}
28+ - {container: "geodesolutions/centos", cmake_args: "-DCMAKE_BUILD_TYPE=Debug", system: rhel}
29+ - {container: "geodesolutions/centos", cmake_args: "-DCMAKE_BUILD_TYPE=Release", system: rhel}
30+
3231
3332 steps :
3433 - uses : actions/checkout@v1
3534 - uses : Geode-solutions/actions/get-release@master
3635 id : opengeode
3736 with :
3837 repository : OpenGeode
39- file : ' -Linux .tar.gz'
38+ file : ' -${{ matrix.config.system }} .tar.gz'
4039 token : ${{ secrets.TOKEN }}
4140 - name : Compile
4241 run : |
4342 mkdir -p build
4443 cd build
45- cmake -DCMAKE_BUILD_TYPE= ${{ matrix.config }} -DCMAKE_PREFIX_PATH:PATH=${{ steps.opengeode.outputs.path }} ..
44+ cmake ${{ matrix.config.cmake_args }} -DCMAKE_PREFIX_PATH:PATH=${{ steps.opengeode.outputs.path }} ..
4645 cmake --build . -- -j2
47- env :
48- CC : ${{ matrix.cc }}
49- CXX : ${{ matrix.cxx }}
5046 - name : Test
5147 run : |
5248 mkdir -p test
5349 cd test
5450 cmake -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_PREFIX_PATH:PATH="$GITHUB_WORKSPACE/build;$GITHUB_WORKSPACE/${{ steps.opengeode.outputs.path }}" ../tests
5551 cmake --build . -- -j2
5652 ctest --output-on-failure
57- env :
58- CC : ${{ matrix.cc }}
59- CXX : ${{ matrix.cxx }}
60- - name : Kcov
61- run : curl -s https://raw.githubusercontent.com/Geode-solutions/actions/master/kcov.sh | bash -s -- ${GITHUB_WORKSPACE}/build/bin
62- if : matrix.cc == 'gcc' && (github.event_name == 'pull_request' || github.ref == 'refs/heads/master') && matrix.config == 'Debug'
63- 64- if : matrix.cc == 'gcc' && (github.event_name == 'pull_request' || github.ref == 'refs/heads/master') && matrix.config == 'Debug'
65- with :
66- token : ${{ secrets.CODECOV_TOKEN }}
67- file : kcov/kcov-merged/cobertura.xml
6853 - name : Notify slack
6954 if : failure() && github.ref == 'refs/heads/master'
7055 uses : 8398a7/action-slack@v2
@@ -73,38 +58,42 @@ jobs:
7358 env :
7459 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7560 SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
76-
77- build-mac :
78- runs-on : macOS-10.14
61+
62+ coverage :
63+ runs-on : ubuntu-18.04
7964 needs : format
80- strategy :
81- matrix :
82- config : [Debug, Release]
65+ if : (github.event_name == 'pull_request' || github.ref == 'refs/heads/master')
66+
8367
8468 steps :
8569 - uses : actions/checkout@v1
8670 - uses : Geode-solutions/actions/get-release@master
8771 id : opengeode
8872 with :
8973 repository : OpenGeode
90- file : ' -Darwin .tar.gz'
74+ file : ' -ubuntu .tar.gz'
9175 token : ${{ secrets.TOKEN }}
92- - name : Compile & Test
76+ - name : Compile
9377 run : |
9478 mkdir -p build
9579 cd build
96- cmake -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_PREFIX_PATH:PATH=${{ steps.opengeode.outputs.path }} ..
97- cmake --build .
98- ctest --output-on-failure
80+ cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH:PATH=${{ steps.opengeode.outputs.path }} ..
81+ cmake --build . -- -j2
82+ - name : Kcov
83+ run : curl -s https://raw.githubusercontent.com/Geode-solutions/actions/master/kcov.sh | bash -s -- ${GITHUB_WORKSPACE}/build/bin
84+ 85+ with :
86+ token : ${{ secrets.CODECOV_TOKEN }}
87+ file : kcov/kcov-merged/cobertura.xml
9988 - name : Notify slack
10089 if : failure() && github.ref == 'refs/heads/master'
10190 uses : 8398a7/action-slack@v2
10291 with :
10392 status : failure
10493 env :
10594 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
106- SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
107-
95+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
96+
10897 build-mac-xcode :
10998 runs-on : macOS-10.14
11099 needs : format
@@ -118,7 +107,7 @@ jobs:
118107 id : opengeode
119108 with :
120109 repository : OpenGeode
121- file : ' -Darwin .tar.gz'
110+ file : ' -darwin .tar.gz'
122111 token : ${{ secrets.TOKEN }}
123112 - name : Compile & Test
124113 run : |
@@ -169,7 +158,7 @@ jobs:
169158
170159 semantic-release :
171160 runs-on : ubuntu-18.04
172- needs : [build-ubuntu, build-mac , build-mac-xcode, build-windows]
161+ needs : [build-linux, coverage , build-mac-xcode, build-windows]
173162 steps :
174163 - uses : actions/checkout@v1
175164 - run : npx semantic-release
0 commit comments