This repository was archived by the owner on Jan 20, 2026. It is now read-only.
Add macOS builds and refactor CI #59
Workflow file for this run
This file contains hidden or 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: CMake | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025, macos-26] | |
| cpp_compiler: [clang++, cl] | |
| build_shared_libs: [ON] | |
| exclude: | |
| - os: ubuntu-24.04 | |
| cpp_compiler: cl | |
| - os: ubuntu-24.04-arm | |
| cpp_compiler: cl | |
| - os: windows-2025 | |
| cpp_compiler: clang++ | |
| - os: macos-26 | |
| cpp_compiler: cl | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Setup Packages | |
| if: matrix.os == 'ubuntu-24.04' || matrix.os == 'ubuntu-24.04-arm' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install nasm | |
| - name: Setup Packages | |
| if: matrix.os == 'macos-26' | |
| run: | | |
| brew install nasm go | |
| - name: Set reusable strings | |
| id: strings | |
| shell: bash | |
| run: | | |
| echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
| echo "vcpkg-manifest-dir=${{ github.workspace }}/libdave/cpp/vcpkg-alts/boringssl" >> "$GITHUB_OUTPUT" | |
| echo "cmake-toolchain-file=${{ github.workspace }}/libdave/cpp/vcpkg/scripts/buildsystems/vcpkg.cmake" >> "$GITHUB_OUTPUT" | |
| echo "build-type=Release" >> "$GITHUB_OUTPUT" | |
| echo "pdb=ON" >> "$GITHUB_OUTPUT" | |
| - name: Configure CMake | |
| run: > | |
| make configure | |
| BUILD_DIR=${{ steps.strings.outputs.build-output-dir }} | |
| CMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | |
| CONFIG=${{ steps.strings.outputs.build-type }} | |
| VCPKG_MANIFEST_DIR=${{ steps.strings.outputs.vcpkg-manifest-dir }} | |
| TOOLCHAIN_FILE=${{ steps.strings.outputs.cmake-toolchain-file }} | |
| SHARED=${{ matrix.build_shared_libs }} | |
| PDB=${{ steps.strings.outputs.pdb }} | |
| SOURCE_DIR=${{ github.workspace }} | |
| - name: Build | |
| run: > | |
| make build | |
| CONFIG=${{ steps.strings.outputs.build-type }} | |
| BUILD_DIR=${{ steps.strings.outputs.build-output-dir }} | |
| SOURCE_DIR=${{ github.workspace }} | |
| - name: Test | |
| working-directory: ${{ steps.strings.outputs.build-output-dir }} | |
| run: ctest --build-config ${{ steps.strings.outputs.build-type }} | |
| - name: Move Build Output | |
| if: matrix.os == 'windows-2025' | |
| run: | | |
| mv ${{ steps.strings.outputs.build-output-dir }}/out/${{ steps.strings.outputs.build-type }}/* ${{ steps.strings.outputs.build-output-dir }}/out/ | |
| rm ${{ steps.strings.outputs.build-output-dir }}/out/${{ steps.strings.outputs.build-type }}/ | |
| - name: Copy License | |
| run: | | |
| cp ${{ github.workspace }}/LICENSE.md ${{ steps.strings.outputs.build-output-dir }}/out/ | |
| - name: Upload Artifacts with Symbols | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: libdavec-${{ matrix.os }}-${{ matrix.cpp_compiler }}-shared${{ matrix.build_shared_libs }}-symbolsON | |
| path: | | |
| ${{ steps.strings.outputs.build-output-dir }}/out/ | |
| - name: Strip Symbols | |
| if: matrix.os == 'ubuntu-24.04' || matrix.os == 'ubuntu-24.04-arm' | |
| run: | | |
| strip ${{ steps.strings.outputs.build-output-dir }}/out/libdavec.so | |
| - name: Strip Symbols | |
| if: matrix.os == 'windows-2025' | |
| run: | | |
| rm ${{ steps.strings.outputs.build-output-dir }}/out/libdavec.pdb | |
| - name: Strip Symbols | |
| if: matrix.os == 'macos-26' | |
| run: | | |
| strip -x ${{ steps.strings.outputs.build-output-dir }}/out/libdavec.dylib | |
| - name: Upload Artifacts without Symbols | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: libdavec-${{ matrix.os }}-${{ matrix.cpp_compiler }}-shared${{ matrix.build_shared_libs }}-symbolsOFF | |
| path: | | |
| ${{ steps.strings.outputs.build-output-dir }}/out/ |