Specify debug build in CI #11
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 Build | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| c_compiler: [gcc, cl] | |
| # Use gcc on Linux and MSVC on Windows | |
| include: | |
| - os: windows-latest | |
| c_compiler: cl | |
| cpp_compiler: cl | |
| - os: ubuntu-latest | |
| c_compiler: gcc | |
| cpp_compiler: g++ | |
| exclude: | |
| - os: windows-latest | |
| c_compiler: gcc | |
| - os: ubuntu-latest | |
| c_compiler: cl | |
| steps: | |
| - name: Checkout without vcpkg | |
| if: ${{ runner.os == 'Linux' }} | |
| uses: actions/checkout@v4 | |
| - name: Checkout with vcpkg | |
| if: ${{ runner.os == 'Windows' }} | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'true' | |
| - name: Set up dependencies | |
| id: depends | |
| if: ${{ runner.os == 'Linux' }} | |
| shell: bash | |
| # Install dpp from BenTheTechGuy repo until Ubuntu 26.04 LTS is released | |
| run: | | |
| sudo wget https://apt.benthetechguy.net/benthetechguy-archive-keyring.gpg -O /usr/share/keyrings/benthetechguy-archive-keyring.gpg | |
| echo "deb [signed-by=/usr/share/keyrings/benthetechguy-archive-keyring.gpg] https://apt.benthetechguy.net/debian trixie main" | sudo tee /etc/apt/sources.list.d/benthetechguy.list | |
| sudo apt-get update | |
| sudo apt-get install libdpp-dev libsqlite3-dev pkgconf | |
| - name: Set reusable strings | |
| id: strings | |
| shell: bash | |
| run: | | |
| echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
| - name: Configure CMake | |
| run: > | |
| cmake -B ${{ steps.strings.outputs.build-output-dir }} | |
| -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | |
| -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} | |
| -DCMAKE_BUILD_TYPE=Debug | |
| -S ${{ github.workspace }} | |
| - name: Build | |
| run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Debug |