-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (35 loc) · 1.01 KB
/
publish-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: CMake
on:
workflow_dispatch: {}
push:
branches:
- feature/publish-release-from-ci
env:
BUILD_TYPE: Release
jobs:
build-and-test:
strategy:
matrix:
os:
- ubuntu-latest
- macos-13
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Configure CMake
env:
BUILD_DIR: build-${{ matrix.os }}
run: cmake -B ${{github.workspace}}/${BUILD_DIR} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSEMVERUTIL_ENABLE_TESTS=ON -DSEMVERUTIL_STATIC_BINARY=ON
- name: Build
env:
BUILD_DIR: build-${{ matrix.os }}
run: cmake --build ${{github.workspace}}/${BUILD_DIR} --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build-${{ matrix.os }}
run: ctest -C ${{ env.BUILD_TYPE }} --output-on-failure
- name: Upload
uses: actions/upload-artifact@v4
with:
name: dist=${{ matrix.os }}
path: |
build-${{ matrix.os }}/src/semverutil