Skip to content

Units module

Units module #18

Workflow file for this run

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