-
Notifications
You must be signed in to change notification settings - Fork 31
119 lines (99 loc) · 2.92 KB
/
packaging.yml
File metadata and controls
119 lines (99 loc) · 2.92 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Packaging Tests
on:
push:
branches:
- main
- v*
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
CTEST_OUTPUT_ON_FAILURE: "1"
jobs:
install:
name: Install Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: true
- name: Configure
run: |
cmake -S . -B build \
-DUNITS_ENABLE_TESTS=ON \
-DUNITS_INSTALL_PACKAGE_TESTS=ON \
-DUNITS_BUILD_SHARED_LIBRARY=ON \
-DCMAKE_INSTALL_PREFIX=/home/runner/work/install
- name: Build
run: cmake --build build -j2
- name: Install
run: cmake --install build
- name: Run package tests
run: ctest --output-on-failure -R find-package-tests
working-directory: build
install-alt:
name: Install Tests Alt Package Name
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: true
- name: Configure
run: |
cmake -S . -B build \
-DUNITS_ENABLE_TESTS=ON \
-DUNITS_INSTALL_PACKAGE_TESTS=ON \
-DUNITS_BUILD_SHARED_LIBRARY=ON \
-DUNITS_CMAKE_PROJECT_NAME=LLNL-UNITS \
-DCMAKE_INSTALL_PREFIX=/home/runner/work/install
- name: Build
run: cmake --build build -j2
- name: Install
run: cmake --install build
- name: Run package tests
run: ctest --output-on-failure -R find-package-tests
working-directory: build
install-module:
name: Install Module Tests
runs-on: ubuntu-latest
steps:
- name: Set up Clang
uses: egor-tensin/setup-clang@v2
with:
version: 20
platform: x64
- name: Install specific libc++ version
run: |
sudo apt-get update
sudo apt-get install -y libc++-20-dev libc++abi-20-dev lld-20
- uses: actions/checkout@v6
with:
submodules: true
- uses: ./.github/actions/quick_cmake
with:
cmake-version: "4.2"
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Configure
run: |
cmake -S . -B build -G Ninja \
-DUNITS_ENABLE_TESTS=ON \
-DUNITS_INSTALL_PACKAGE_TESTS=ON \
-DUNITS_BUILD_SHARED_LIBRARY=ON \
-DUNITS_BUILD_CXX_MODULE=ON \
-DCMAKE_CXX_STANDARD=23 \
-DCMAKE_INSTALL_PREFIX=/home/runner/work/install \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_LINKER_TYPE=LLD \
-DCMAKE_CXX_FLAGS=-stdlib=libc++
- name: Build
run: cmake --build build -j2
- name: Install
run: cmake --install build
- name: Run package tests
run: ctest --output-on-failure -R find-package-tests
working-directory: build