This repository was archived by the owner on Jan 20, 2026. It is now read-only.
Include license in artifacts #43
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: | |
| # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, ubuntu-24.04-arm, windows-2025] | |
| cpp_compiler: [g++, clang++, cl] | |
| build_shared_libs: [ON] | |
| include: | |
| - os: ubuntu-24.04 | |
| cpp_compiler: g++ | |
| - os: ubuntu-24.04 | |
| cpp_compiler: clang++ | |
| - os: ubuntu-24.04-arm | |
| cpp_compiler: g++ | |
| - os: ubuntu-24.04-arm | |
| cpp_compiler: clang++ | |
| - os: windows-2025 | |
| cpp_compiler: cl | |
| exclude: | |
| - os: ubuntu-24.04 | |
| cpp_compiler: cl | |
| - os: ubuntu-24.04-arm | |
| cpp_compiler: cl | |
| - os: windows-2025 | |
| cpp_compiler: g++ | |
| - os: windows-2025 | |
| cpp_compiler: clang++ | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Install Required Packages | |
| if: matrix.os == 'ubuntu-24.04' || matrix.os == 'ubuntu-24.04-arm' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install nasm | |
| - name: Set reusable strings | |
| # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. | |
| 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 | |
| # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). | |
| 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 }} | |
| # Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). | |
| # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
| 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: 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/ |