Release v1.7 #814
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- 'v*.*.*' | |
pull_request: | |
workflow_call: | |
jobs: | |
Build: | |
name: ${{ matrix.os }} (${{ matrix.compiler }}, ${{ matrix.config }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: [Release, Debug] | |
os: | |
- windows-2022 | |
- ubuntu-24.04 | |
- macos-15 | |
compiler: | |
- clang-18 | |
- gcc-14 | |
- msvc | |
exclude: | |
- os: windows-2022 | |
compiler: gcc-14 | |
- os: ubuntu-24.04 | |
compiler: msvc | |
- os: macos-15 | |
compiler: msvc | |
- os: macos-15 | |
compiler: clang-18 | |
env: | |
os-name: ${{ contains(matrix.os, 'windows') && 'Windows' || (contains(matrix.os, 'ubuntu') && 'Linux' || 'MacOS') }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Setup Cpp | |
uses: aminya/setup-cpp@v1 | |
with: | |
# Skip compiler setup for macos clang-17 | |
compiler: ${{ (contains(matrix.os, 'macos') && matrix.compiler == 'clang-17') && '' || matrix.compiler }} | |
vcvarsall: ${{ contains(matrix.os, 'windows') }} | |
cmake: true | |
ninja: true | |
- name: (MacOS) Install clang-17 through brew | |
if: contains(matrix.os, 'macos') && matrix.compiler == 'clang-17' | |
run: | | |
brew install llvm@17 | |
export LLVM_DIR="$(brew --prefix llvm@17)/lib/cmake" | |
echo "CC=$(brew --prefix llvm@17)/bin/clang" >> $GITHUB_ENV | |
echo "CXX=$(brew --prefix llvm@17)/bin/clang++" >> $GITHUB_ENV | |
echo "$(brew --prefix llvm@17)/bin" >> $GITHUB_PATH | |
brew link --overwrite llvm@17 | |
- name: Cache Build | |
uses: actions/cache@v4 | |
with: | |
path: Build | |
key: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.config }}-build-${{ secrets.VCACHE}} | |
- name: Configure | |
run: cmake -GNinja -S . -B Build -DCMAKE_BUILD_TYPE=${{ matrix.config }} | |
- name: Build | |
run: cmake --build Build --config ${{ matrix.config }} | |
- name: Install | |
run: cmake --install Build --config ${{ matrix.config }} --prefix Install | |
- name: Upload installation | |
uses: actions/upload-artifact@v4 | |
if: ${{ contains(matrix.compiler, 'clang') }} # Only clang artifacts are stored | |
with: | |
name: Pipe-${{ env.os-name }}-${{ matrix.config }} | |
path: Install | |
- name: Run Tests | |
if: ${{ !contains(matrix.os, 'macos') }} # Tests are skipped temporarily on MacOS | |
working-directory: ./Build | |
run: ctest --output-on-failure -j2 -C ${{ matrix.config }} | |
Package: | |
needs: Build | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Debug Linux | |
uses: actions/download-artifact@v4 | |
with: | |
name: Pipe-Linux-Debug | |
path: Install/Linux/Debug | |
- name: Download Release Linux | |
uses: actions/download-artifact@v4 | |
with: | |
name: Pipe-Linux-Release | |
path: Install/Linux/Release | |
- name: Download Debug Windows | |
uses: actions/download-artifact@v4 | |
with: | |
name: Pipe-Windows-Debug | |
path: Install/Windows/Debug | |
- name: Download Release Windows | |
uses: actions/download-artifact@v4 | |
with: | |
name: Pipe-Windows-Release | |
path: Install/Windows/Release | |
- name: Download Debug MacOS | |
uses: actions/download-artifact@v4 | |
with: | |
name: Pipe-MacOS-Debug | |
path: Install/MacOS/Debug | |
- name: Download Release MacOS | |
uses: actions/download-artifact@v4 | |
with: | |
name: Pipe-MacOS-Release | |
path: Install/MacOS/Release | |
- name: Copy includes | |
run: | | |
mkdir -p Install/Final/include | |
cp -r Install/Linux/Release/include/. Install/Final/include | |
- name: Copy binaries | |
run: | | |
mkdir -p Install/Final/lib/Linux/Debug | |
mkdir -p Install/Final/lib/Linux/Release | |
mkdir -p Install/Final/lib/Windows/Debug | |
mkdir -p Install/Final/lib/Windows/Release | |
mkdir -p Install/Final/lib/MacOS/Debug | |
mkdir -p Install/Final/lib/MacOS/Release | |
cp -r Install/Linux/Debug/lib/. Install/Final/lib/Linux/Debug | |
cp -r Install/Linux/Release/lib/. Install/Final/lib/Linux/Release | |
cp -r Install/Windows/Debug/lib/. Install/Final/lib/Windows/Debug | |
cp -r Install/Windows/Release/lib/. Install/Final/lib/Windows/Release | |
cp -r Install/MacOS/Debug/lib/. Install/Final/lib/MacOS/Debug | |
cp -r Install/MacOS/Release/lib/. Install/Final/lib/MacOS/Release | |
- name: Upload all | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Pipe | |
path: Install/Final |