|
8 | 8 |
|
9 | 9 | jobs: |
10 | 10 | format: |
11 | | - runs-on: ubuntu-18.04 |
12 | | - |
13 | | - steps: |
14 | | - - uses: actions/checkout@v1 |
15 | | - - uses: Geode-solutions/actions/clang-format@master |
16 | | - env: |
17 | | - GITHUB_TOKEN: ${{ secrets.TOKEN }} |
| 11 | + uses: Geode-solutions/actions/.github/workflows/format.yml@master |
| 12 | + secrets: |
| 13 | + TOKEN: ${{ secrets.TOKEN }} |
18 | 14 |
|
19 | 15 | build-linux: |
20 | | - runs-on: ubuntu-18.04 |
21 | | - container: ${{ matrix.config.container }} |
22 | 16 | needs: format |
23 | | - strategy: |
24 | | - matrix: |
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 | | - |
31 | | - |
32 | | - steps: |
33 | | - - uses: actions/checkout@v1 |
34 | | - - uses: Geode-solutions/actions/get-release@master |
35 | | - id: opengeode |
36 | | - with: |
37 | | - repository: OpenGeode |
38 | | - file: '-${{ matrix.config.system }}.tar.gz' |
39 | | - token: ${{ secrets.TOKEN }} |
40 | | - - name: Compile |
41 | | - run: | |
42 | | - mkdir -p build |
43 | | - cd build |
44 | | - cmake ${{ matrix.config.cmake_args }} -DCMAKE_PREFIX_PATH:PATH=${{ steps.opengeode.outputs.path }} .. |
45 | | - cmake --build . -- -j2 |
46 | | - - name: Test |
47 | | - run: | |
48 | | - mkdir -p test |
49 | | - cd test |
50 | | - cmake -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_PREFIX_PATH:PATH="$GITHUB_WORKSPACE/build;$GITHUB_WORKSPACE/${{ steps.opengeode.outputs.path }}" ../tests |
51 | | - cmake --build . -- -j2 |
52 | | - ctest --output-on-failure |
53 | | - - name: Notify slack |
54 | | - if: failure() && github.ref == 'refs/heads/master' |
55 | | - uses: 8398a7/action-slack@v2 |
56 | | - with: |
57 | | - status: failure |
58 | | - env: |
59 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
60 | | - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
61 | | - |
62 | | - coverage: |
63 | | - runs-on: ubuntu-18.04 |
| 17 | + uses: Geode-solutions/actions/.github/workflows/ci-linux.yml@master |
| 18 | + with: |
| 19 | + repos: OpenGeode |
| 20 | + secrets: |
| 21 | + TOKEN: ${{ secrets.TOKEN }} |
| 22 | + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
| 23 | + |
| 24 | + build-linux-python: |
64 | 25 | needs: format |
65 | | - if: (github.event_name == 'pull_request' || github.ref == 'refs/heads/master') |
66 | | - |
| 26 | + uses: Geode-solutions/actions/.github/workflows/ci-linux-python.yml@master |
| 27 | + with: |
| 28 | + name: OPENGEODE_MYMODULE |
| 29 | + repos: OpenGeode |
| 30 | + secrets: |
| 31 | + TOKEN: ${{ secrets.TOKEN }} |
| 32 | + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
67 | 33 |
|
68 | | - steps: |
69 | | - - uses: actions/checkout@v1 |
70 | | - - uses: Geode-solutions/actions/get-release@master |
71 | | - id: opengeode |
72 | | - with: |
73 | | - repository: OpenGeode |
74 | | - file: '-ubuntu.tar.gz' |
75 | | - token: ${{ secrets.TOKEN }} |
76 | | - - name: Compile |
77 | | - run: | |
78 | | - mkdir -p build |
79 | | - cd build |
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 |
88 | | - - name: Notify slack |
89 | | - if: failure() && github.ref == 'refs/heads/master' |
90 | | - uses: 8398a7/action-slack@v2 |
91 | | - with: |
92 | | - status: failure |
93 | | - env: |
94 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
95 | | - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
96 | | - |
97 | | - build-mac-xcode: |
98 | | - runs-on: macOS-10.14 |
| 34 | + coverage: |
99 | 35 | needs: format |
100 | | - strategy: |
101 | | - matrix: |
102 | | - config: [Debug, Release] |
103 | | - |
104 | | - steps: |
105 | | - - uses: actions/checkout@v1 |
106 | | - - uses: Geode-solutions/actions/get-release@master |
107 | | - id: opengeode |
108 | | - with: |
109 | | - repository: OpenGeode |
110 | | - file: '-darwin.tar.gz' |
111 | | - token: ${{ secrets.TOKEN }} |
112 | | - - name: Compile & Test |
113 | | - run: | |
114 | | - mkdir -p build |
115 | | - cd build |
116 | | - cmake -G "Xcode" -DCMAKE_PREFIX_PATH:PATH=${{ steps.opengeode.outputs.path }} .. |
117 | | - cmake --build . --config ${{ matrix.config }} |
118 | | - ctest -C ${{ matrix.config }} --output-on-failure |
119 | | - - name: Notify slack |
120 | | - if: failure() && github.ref == 'refs/heads/master' |
121 | | - uses: 8398a7/action-slack@v2 |
122 | | - with: |
123 | | - status: failure |
124 | | - env: |
125 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
126 | | - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
| 36 | + uses: Geode-solutions/actions/.github/workflows/coverage.yml@master |
| 37 | + with: |
| 38 | + repos: OpenGeode |
| 39 | + secrets: |
| 40 | + TOKEN: ${{ secrets.TOKEN }} |
127 | 41 |
|
128 | 42 | build-windows: |
129 | | - runs-on: windows-2016 |
130 | 43 | needs: format |
131 | | - strategy: |
132 | | - matrix: |
133 | | - config: [Debug, Release] |
134 | | - |
135 | | - steps: |
136 | | - - uses: actions/checkout@v1 |
137 | | - - uses: Geode-solutions/actions/get-release@master |
138 | | - id: opengeode |
139 | | - with: |
140 | | - repository: OpenGeode |
141 | | - file: '-win64.zip' |
142 | | - token: ${{ secrets.TOKEN }} |
143 | | - - name: Compile & Test |
144 | | - run: | |
145 | | - mkdir -p build |
146 | | - cd build |
147 | | - cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_PREFIX_PATH:PATH=${{ steps.opengeode.outputs.path }} .. |
148 | | - cmake --build . --config ${{ matrix.config }} |
149 | | - ctest -C ${{ matrix.config }} --output-on-failure |
150 | | - - name: Notify slack |
151 | | - if: failure() && github.ref == 'refs/heads/master' |
152 | | - uses: 8398a7/action-slack@v2 |
153 | | - with: |
154 | | - status: failure |
155 | | - env: |
156 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
157 | | - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
| 44 | + uses: Geode-solutions/actions/.github/workflows/ci-windows.yml@master |
| 45 | + with: |
| 46 | + name: OPENGEODE_MYMODULE |
| 47 | + repos: OpenGeode |
| 48 | + secrets: |
| 49 | + TOKEN: ${{ secrets.TOKEN }} |
| 50 | + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
158 | 51 |
|
159 | 52 | semantic-release: |
160 | | - runs-on: ubuntu-18.04 |
161 | | - needs: [build-linux, coverage, build-mac-xcode, build-windows] |
162 | | - steps: |
163 | | - - uses: actions/checkout@v1 |
164 | | - - run: npx semantic-release |
165 | | - env: |
166 | | - GITHUB_TOKEN: ${{ secrets.TOKEN }} |
| 53 | + needs: [build-linux, build-linux-python, build-windows] |
| 54 | + uses: Geode-solutions/actions/.github/workflows/release.yml@master |
| 55 | + secrets: |
| 56 | + TOKEN: ${{ secrets.TOKEN }} |
0 commit comments