name: Build on: push jobs: build: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: include: - description: Windows - Visual Studio os: windows-2022 cmakeOptions: '-G "Visual Studio 17 2022" -A x64' publish: true - description: macOS - Xcode os: macos-14 cmakeOptions: '' publish: true - description: Linux - GCC os: ubuntu-24.04 cmakeOptions: '-D CMAKE_C_COMPILER=gcc-14 -D CMAKE_CXX_COMPILER=g++-14' publish: true - description: Linux - Clang os: ubuntu-24.04 cmakeOptions: '-D CMAKE_C_COMPILER=clang-18 -D CMAKE_CXX_COMPILER=clang++-18' publish: false env: BOOST_ROOT: ${{ github.workspace }}/lib/boost BOOST_URL: https://sourceforge.net/projects/boost/files/boost/1.86.0/boost_1_86_0.tar.bz2/download steps: - name: Install Deno uses: denoland/setup-deno@v2 - name: Deactivate EOL conversion shell: bash run: | git config --global core.autocrlf false git config --global core.eol lf - name: Checkout repository uses: actions/checkout@v4 with: lfs: true - name: Install Python uses: actions/setup-python@v5 with: python-version: '3.13' - name: Install Python wheels shell: bash run: pip install -r requirements.txt - name: Restore Boost from cache uses: actions/cache@v4 id: cache-boost with: path: ${{ env.BOOST_ROOT }} key: ${{ env.BOOST_URL }} - name: Lint shell: bash run: doit check-formatted - name: Download Boost if: steps.cache-boost.outputs.cache-hit != 'true' shell: bash run: | if [ "$RUNNER_OS" == "Windows" ]; then # use forward slashes only BOOST_ROOT=$(echo $BOOST_ROOT | sed 's/\\/\//g') fi mkdir -p $BOOST_ROOT curl --insecure -L $BOOST_URL | tar -xj --strip-components=1 -C $BOOST_ROOT - name: Build and package shell: bash run: | JAVA_HOME=$JAVA_HOME_11_X64 mkdir rhubarb/build (cd rhubarb/build && cmake ${{ matrix.cmakeOptions }} ..) doit package - name: Run tests shell: bash run: | if [ "$RUNNER_OS" == "Windows" ]; then ./rhubarb/build/Release/runTests.exe else ./rhubarb/build/runTests fi - name: Upload artifacts if: ${{ matrix.publish }} uses: actions/upload-artifact@v4 with: name: 'binaries ${{ matrix.description }}' path: | artifacts/*.zip artifacts/*.tar.gz release: needs: build runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/v') steps: - name: Download artifacts uses: actions/download-artifact@v4 - name: Create GitHub release draft uses: softprops/action-gh-release@v2 with: draft: true files: | '*.zip' '*.tar.gz' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}