-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (39 loc) · 1.34 KB
/
cmake-single-platform.yml
File metadata and controls
48 lines (39 loc) · 1.34 KB
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
39
40
41
42
43
44
45
46
47
48
name: CMake on a single platform
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
env:
BUILD_TYPE: Release
BUILD_SHARED_LIBS: OFF
MAKE_INSTALLABLE: ON
BUILD_TESTING: ON
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '4.2.x'
- name: Configure CMake
run: |
cmake -S . -B ${{github.workspace}}/build \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DBUILD_TESTING=${{env.BUILD_TESTING}} \
-DMAKE_INSTALLABLE=${{env.MAKE_INSTALLABLE}} \
-DBUILD_SHARED_LIBS=${{env.BUILD_SHARED_LIBS}} \
-DCMAKE_INSTALL_PREFIX:PATH=$GITHUB_WORKSPACE/test_install \
-DFETCHCONTENT_UPDATES_DISCONNECTED=ON
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure
- name: Test Install
working-directory: ${{github.workspace}}/build
run: cmake --install . --config ${{env.BUILD_TYPE}}