Optimize GitHub social preview asset #7
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| linux: | |
| name: Linux / ${{ matrix.compiler }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - compiler: GCC | |
| cc: gcc | |
| cxx: g++ | |
| - compiler: Clang | |
| cc: clang | |
| cxx: clang++ | |
| env: | |
| CC: ${{ matrix.cc }} | |
| CXX: ${{ matrix.cxx }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure | |
| run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DHBT_WARNINGS_AS_ERRORS=ON | |
| - name: Build | |
| run: cmake --build build --parallel 2 | |
| - name: Test | |
| run: ctest --test-dir build --output-on-failure | |
| macos: | |
| name: macOS / AppleClang | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure | |
| run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DHBT_WARNINGS_AS_ERRORS=ON | |
| - name: Build | |
| run: cmake --build build --parallel 2 | |
| - name: Test | |
| run: ctest --test-dir build --output-on-failure | |
| package-consumer: | |
| name: Installed package consumer | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build and install | |
| run: | | |
| cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DHBT_BUILD_TESTS=OFF -DHBT_BUILD_EXAMPLES=OFF | |
| cmake --build build --parallel 2 | |
| cmake --install build --prefix "$PWD/stage" | |
| - name: Configure consumer | |
| run: cmake -S consumer -B consumer-build -DCMAKE_PREFIX_PATH="$PWD/stage" | |
| - name: Build and run consumer | |
| run: | | |
| cmake --build consumer-build --parallel 2 | |
| ./consumer-build/hbt_consumer |