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