Signal handling fix and logging modification #250
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: Run Tests | |
| on: | |
| push: | |
| branches: [ 'main', 'develop' ] | |
| tags: ['*'] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| RunTests: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, ubuntu-22.04, macos-26, macos-15-intel, macos-15, macos-14] | |
| steps: | |
| - name: Checkout the repo | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Select CC version | |
| # We require GCC 12 or higher if using GCC | |
| # The default GCC for Ubuntu 22.04 is 11, but 12 is available | |
| if: ${{ matrix.os == 'ubuntu-22.04' }} | |
| run: | | |
| echo "CC=gcc-12" >> $GITHUB_ENV | |
| echo "CXX=g++-12" >> $GITHUB_ENV | |
| - name: Install dependencies -- Mac | |
| # pybind11 is manually installed because we need to use v3.0.0 (as of 8/21/25) | |
| # Fix the /usr/local directory structure | |
| if: startsWith(matrix.os, 'macos') | |
| run: | | |
| brew install \ | |
| boost \ | |
| rabbitmq-c \ | |
| rapidjson \ | |
| yaml-cpp | |
| sudo mkdir -p /usr/local/include && \ | |
| sudo chown -R $(whoami) /usr/local/include | |
| sudo mkdir -p /usr/local/lib && \ | |
| sudo chown -R $(whoami) /usr/local/lib | |
| sudo mkdir -p /usr/local/bin && \ | |
| sudo chown -R $(whoami) /usr/local/bin | |
| sudo mkdir -p /usr/local/share && \ | |
| sudo chown -R $(whoami) /usr/local/share | |
| git clone https://github.com/pybind/pybind11.git | |
| cd pybind11 | |
| git checkout v3.0.0 | |
| mkdir build | |
| cd build | |
| cmake -DPYBIND11_TEST=FALSE .. | |
| make -j2 install | |
| pip install pytest | |
| - name: Install dependencies -- Linux | |
| # pybind11 is manually installed because we need to use v3.0.0 (as of 8/21/25) | |
| if: startsWith(matrix.os, 'ubuntu') | |
| run: | | |
| sudo apt-get update | |
| DEBIAN_FRONTEND=noninteractive sudo apt-get install -y \ | |
| libboost-all-dev \ | |
| rapidjson-dev \ | |
| libyaml-cpp-dev | |
| git clone https://github.com/pybind/pybind11.git | |
| cd pybind11 | |
| git checkout v3.0.0 | |
| mkdir build | |
| cd build | |
| sudo cmake -DPYBIND11_TEST=FALSE .. | |
| sudo make -j2 install | |
| cd ../.. | |
| pip install pytest | |
| - name: Configure | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. -DScarab_ENABLE_TESTING=TRUE -DScarab_BUILD_PYTHON=TRUE | |
| - name: Build | |
| run: | | |
| cd build | |
| make -j2 install | |
| - name: Run tests | |
| run: | | |
| cd build | |
| ctest --output-on-failure | |
| source bin/add_lib_python_path.sh | |
| pytest testing/python | |
| # For debugging | |
| # - name: Setup tmate session | |
| # if: ${{ ! success() }} | |
| # uses: mxschmitt/action-tmate@v3 | |
| Release: | |
| runs-on: ubuntu-22.04 | |
| if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }} | |
| needs: [RunTests] | |
| steps: | |
| - name: Checkout the repo | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Release with a changelog | |
| uses: rasmus-saks/release-a-changelog-action@v1.2.0 | |
| with: | |
| github-token: '${{ secrets.GITHUB_TOKEN }}' | |
| path: 'changelog.md' | |
| title-template: 'Scarab v{version} -- Release Notes' | |
| tag-template: 'v{version}' |