This repository was archived by the owner on Apr 16, 2025. It is now read-only.
CI #1686
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: | |
| branches: [main] | |
| schedule: | |
| - cron: '0 0 * * *' # run at 00:00 UTC | |
| # Cancel any in-flight jobs for the same PR/branch so there's only one active | |
| # at a time | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| doc: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: curl -L https://www.doxygen.nl/files/doxygen-1.9.5.linux.bin.tar.gz | tar xzf - | |
| - run: echo "`pwd`/doxygen-1.9.5/bin" >> $GITHUB_PATH | |
| - run: doxygen doxygen.conf | |
| - run: tar czf html.tar.gz html | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: c-api | |
| path: html.tar.gz | |
| - uses: JamesIves/[email protected] | |
| with: | |
| branch: gh-pages | |
| folder: html | |
| single-commit: true | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| # linux debug/release | |
| - os: ubuntu-latest | |
| config: Release | |
| args: -DCMAKE_CXX_COMPILER=clang++ | |
| - os: ubuntu-latest | |
| config: Debug | |
| args: -DCMAKE_CXX_COMPILER=clang++ | |
| # sanitizers | |
| - os: ubuntu-latest | |
| config: Debug | |
| args: -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS="-fsanitize=address -fno-omit-frame-pointer" | |
| - os: ubuntu-latest | |
| config: Debug | |
| args: -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS="-fsanitize=undefined -fno-omit-frame-pointer" | |
| # linux/gcc debug/release | |
| - os: ubuntu-latest | |
| config: Release | |
| gcc: true | |
| args: -DCMAKE_CXX_COMPILER=g++-10 | |
| - os: ubuntu-latest | |
| config: Debug | |
| gcc: true | |
| args: -DCMAKE_CXX_COMPILER=g++-10 | |
| # macos debug/release | |
| - os: macos-latest | |
| config: Release | |
| - os: macos-latest | |
| config: Debug | |
| # clang-cl debug/release | |
| - os: windows-latest | |
| config: Debug | |
| args: -T ClangCL | |
| - os: windows-latest | |
| config: Release | |
| args: -T ClangCL | |
| # cl.exe debug/release | |
| - os: windows-latest | |
| config: Debug | |
| - os: windows-latest | |
| config: Release | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Download the c-api directory | |
| - run: | | |
| curl -LO https://github.com/bytecodealliance/wasmtime/releases/download/dev/wasmtime-dev-x86_64-windows-c-api.zip | |
| unzip wasmtime-dev-x86_64-windows-c-api.zip | |
| mv wasmtime-dev-x86_64-windows-c-api c-api | |
| if: matrix.os == 'windows-latest' | |
| shell: bash | |
| - run: | | |
| curl -LO https://github.com/bytecodealliance/wasmtime/releases/download/dev/wasmtime-dev-aarch64-macos-c-api.tar.xz | |
| mkdir c-api | |
| tar xf wasmtime-dev-aarch64-macos-c-api.tar.xz -C c-api --strip-components=1 | |
| if: matrix.os == 'macos-latest' | |
| - run: | | |
| curl -LO https://github.com/bytecodealliance/wasmtime/releases/download/dev/wasmtime-dev-x86_64-linux-c-api.tar.xz | |
| mkdir c-api | |
| tar xf wasmtime-dev-x86_64-linux-c-api.tar.xz -C c-api --strip-components=1 | |
| if: matrix.os == 'ubuntu-latest' | |
| - run: sudo apt-get update -y && sudo apt-get install -y g++-10 | |
| if: matrix.gcc | |
| # Configure CMake appropriately | |
| - run: cmake -B build ${{ matrix.args }} | |
| if: matrix.os == 'windows-latest' | |
| - run: cmake -B build ${{ matrix.args }} -DCMAKE_BUILD_TYPE=${{ matrix.config }} | |
| if: matrix.os == 'ubuntu-latest' | |
| - run: echo /usr/local/opt/llvm/bin >> $GITHUB_PATH | |
| if: matrix.os == 'macos-latest' | |
| - run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.config }} ${{ matrix.args }} | |
| if: matrix.os == 'macos-latest' | |
| - run: cmake --build build --config ${{ matrix.config }} --verbose --parallel 4 | |
| - run: ctest -C ${{ matrix.config }} --parallel 4 | |
| working-directory: build | |
| env: | |
| CTEST_OUTPUT_ON_FAILURE: 1 | |