Skip to content

Commit bc555f2

Browse files
committed
update actions
1 parent 5d70b04 commit bc555f2

File tree

3 files changed

+51
-51
lines changed

3 files changed

+51
-51
lines changed

.github/workflows/CD.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,42 @@ on:
55
tags: 'v*'
66

77
jobs:
8-
release-ubuntu:
8+
release-linux:
99
runs-on: ubuntu-18.04
10+
container: ${{ matrix.config.container }}
11+
strategy:
12+
matrix:
13+
config:
14+
- {container: "geodesolutions/ubuntu", system: "ubuntu", doc: true}
15+
- {container: "geodesolutions/centos", system: "rhel", doc: false}
16+
1017

1118
steps:
1219
- uses: actions/checkout@v1
1320
- uses: Geode-solutions/actions/get-release@master
1421
id: opengeode
1522
with:
1623
repository: OpenGeode
17-
file: '-Linux.tar.gz'
24+
file: '-${{ matrix.config.system }}.tar.gz'
1825
token: ${{ secrets.TOKEN }}
1926
- name: Generate package
2027
id: package
2128
run: |
22-
sudo apt install doxygen
2329
mkdir -p build
2430
cd build
2531
version="${GITHUB_REF##*/*/}"
2632
echo ::set-output name=version::$version
27-
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH:PATH=${{ steps.opengeode.outputs.path }} -DMYMODULE_WITH_TESTS:BOOL=OFF -DCPACK_PACKAGE_VERSION:STRING=$version ..
33+
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH:PATH=${{ steps.opengeode.outputs.path }} -DMYMODULE_WITH_TESTS:BOOL=OFF -DCPACK_PACKAGE_VERSION:STRING=$version -DCPACK_SYSTEM_NAME:STRING=${{ matrix.config.system }} ..
2834
cmake --build . -- -j2
2935
cmake --build . --target package
3036
- name: Upload
3137
uses: softprops/action-gh-release@v1
3238
with:
33-
files: "build/MyModule-${{ steps.package.outputs.version }}-Linux.tar.gz"
39+
files: "build/MyModule-${{ steps.package.outputs.version }}-${{ matrix.config.system }}.tar.gz"
3440
env:
3541
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3642
- name: Doc
43+
if: matrix.config.doc
3744
run: curl -s https://raw.githubusercontent.com/Geode-solutions/actions/master/doc/doc.sh | bash -s -- ${GITHUB_WORKSPACE}/build
3845
env:
3946
GITHUB_TOKEN: ${{ secrets.TOKEN }}
@@ -47,7 +54,7 @@ jobs:
4754
id: opengeode
4855
with:
4956
repository: OpenGeode
50-
file: '-Darwin.tar.gz'
57+
file: '-darwin.tar.gz'
5158
token: ${{ secrets.TOKEN }}
5259
- name: Generate package
5360
id: package
@@ -56,13 +63,13 @@ jobs:
5663
cd build
5764
version="${GITHUB_REF##*/*/}"
5865
echo ::set-output name=version::$version
59-
cmake -G "Xcode" -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH:PATH=${{ steps.opengeode.outputs.path }} -DMYMODULE_WITH_TESTS:BOOL=OFF -DCPACK_PACKAGE_VERSION:STRING=$version ..
66+
cmake -G "Xcode" -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH:PATH=${{ steps.opengeode.outputs.path }} -DMYMODULE_WITH_TESTS:BOOL=OFF -DCPACK_PACKAGE_VERSION:STRING=$version -DCPACK_SYSTEM_NAME:STRING=darwin ..
6067
cmake --build . --config Release
6168
cmake --build . --target package --config Release
6269
- name: Upload
6370
uses: softprops/action-gh-release@v1
6471
with:
65-
files: "build/MyModule-${{ steps.package.outputs.version }}-Darwin.tar.gz"
72+
files: "build/MyModule-${{ steps.package.outputs.version }}-darwin.tar.gz"
6673
env:
6774
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6875

@@ -84,7 +91,7 @@ jobs:
8491
cd build
8592
version="${GITHUB_REF##*/*/}"
8693
echo ::set-output name=version::$version
87-
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_PREFIX_PATH:PATH=${{ steps.opengeode.outputs.path }} -DMYMODULE_WITH_TESTS:BOOL=OFF -DCPACK_PACKAGE_VERSION:STRING=$version ..
94+
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_PREFIX_PATH:PATH=${{ steps.opengeode.outputs.path }} -DMYMODULE_WITH_TESTS:BOOL=OFF -DCPACK_PACKAGE_VERSION:STRING=$version -DCPACK_SYSTEM_NAME:STRING=win64 ..
8895
cmake --build . --config Release
8996
cmake --build . --target PACKAGE --config Release
9097
shell: bash

.github/workflows/CI.yml

Lines changed: 29 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
- uses: codecov/codecov-action@v1.0.2
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+
- uses: codecov/codecov-action@v1.0.2
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

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@
1919
<img src="https://img.shields.io/badge/C%2B%2B-11-blue.svg" alt="Language">
2020
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License">
2121
<img src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg" alt="Semantic-release">
22-
<a href="https://slackin-opengeode.herokuapp.com"><img src="https://slackin-opengeode.herokuapp.com/badge.svg" alt="Slack invite"></a>
23-
</p>
22+
<a href="https://slackin-opengeode.herokuapp.com">
23+
<img src="https://slackin-opengeode.herokuapp.com/badge.svg" alt="Slack invite">
24+
</a>
25+
<a href="https://doi.org/10.5281/zenodo.3610370">
26+
<img src="https://zenodo.org/badge/DOI/10.5281/zenodo.3610370.svg" alt="DOI">
27+
</a>
2428

2529
---
2630

0 commit comments

Comments
 (0)