ci(orm): fix standalone build workflow #31
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: build | |
| on: | |
| push: | |
| branches: [main, dev] | |
| pull_request: | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| compiler: [gcc, clang] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install build tools + deps | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake ninja-build | |
| # compilers | |
| if [ "${{ matrix.compiler }}" = "gcc" ]; then | |
| sudo apt-get install -y gcc-12 g++-12 | |
| echo "CC=gcc-12" >> $GITHUB_ENV | |
| echo "CXX=g++-12" >> $GITHUB_ENV | |
| else | |
| sudo apt-get install -y clang | |
| echo "CC=clang" >> $GITHUB_ENV | |
| echo "CXX=clang++" >> $GITHUB_ENV | |
| fi | |
| # optional deps used by orm/db | |
| sudo apt-get install -y libspdlog-dev libmysqlcppconn-dev | |
| - name: Configure (Release, ORM standalone) | |
| run: | | |
| cmake -S modules/orm -B build -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DVIX_ORM_BUILD_EXAMPLES=ON \ | |
| -DVIX_ORM_BUILD_TESTS=ON | |
| - name: Build | |
| run: cmake --build build -j | |
| - name: Run tests | |
| run: ctest --test-dir build --output-on-failure |