| 1 | name: Build |
| 2 | on: |
| 3 | push: |
| 4 | branches: ["master"] |
| 5 | pull_request: |
| 6 | branches: ["master"] |
| 7 | permissions: |
| 8 | contents: read |
| 9 | jobs: |
| 10 | build-mac: |
| 11 | name: Build (macOS, ${{ matrix.buildtype }}) |
| 12 | runs-on: macos-latest |
| 13 | strategy: |
| 14 | matrix: |
| 15 | buildtype: [debug, release] |
| 16 | steps: |
| 17 | - uses: actions/checkout@v6 |
| 18 | - name: Install dependencies |
| 19 | run: | |
| 20 | brew update |
| 21 | brew install \ |
| 22 | gumbo-parser \ |
| 23 | expat \ |
| 24 | meson \ |
| 25 | ossp-uuid |
| 26 | brew install --cask macfuse |
| 27 | - name: Setup Meson |
| 28 | run: | |
| 29 | OPENSSL_PREFIX=$(brew --prefix openssl@3) |
| 30 | BREW_PREFIX=$(brew --prefix) |
| 31 | export PKG_CONFIG_PATH="$OPENSSL_PREFIX/lib/pkgconfig" |
| 32 | export PKG_CONFIG_PATH="$BREW_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH" |
| 33 | meson setup builddir -Dbuildtype=${{ matrix.buildtype }} |
| 34 | - name: Compile |
| 35 | run: meson compile -C builddir |
| 36 | - name: Unit tests |
| 37 | run: meson test -C builddir --no-suite integration --verbose |
| 38 | - name: Upload Meson logs |
| 39 | if: always() |
| 40 | uses: actions/upload-artifact@v7 |
| 41 | with: |
| 42 | name: meson-logs-mac-${{ matrix.buildtype }} |
| 43 | path: builddir/meson-logs/ |
| 44 | build-ubuntu: |
| 45 | name: Build (Ubuntu, ${{ matrix.compiler }}, ${{ matrix.buildtype }}) |
| 46 | runs-on: ubuntu-latest |
| 47 | strategy: |
| 48 | matrix: |
| 49 | compiler: [gcc, clang] |
| 50 | buildtype: [debug, release] |
| 51 | steps: |
| 52 | - uses: actions/checkout@v6 |
| 53 | - name: Install dependencies |
| 54 | run: | |
| 55 | sudo apt-get update |
| 56 | sudo apt-get install -y \ |
| 57 | libgumbo-dev \ |
| 58 | libcurl4-openssl-dev \ |
| 59 | libfuse3-dev \ |
| 60 | fuse3 \ |
| 61 | uuid-dev \ |
| 62 | libexpat1-dev \ |
| 63 | libssl-dev \ |
| 64 | meson \ |
| 65 | ninja-build \ |
| 66 | help2man \ |
| 67 | python3 \ |
| 68 | clang |
| 69 | - name: Setup Meson |
| 70 | run: | |
| 71 | export CC=${{ matrix.compiler }} |
| 72 | meson setup builddir -Dbuildtype=${{ matrix.buildtype }} |
| 73 | - name: Compile |
| 74 | run: meson compile -C builddir |
| 75 | - name: Unit tests |
| 76 | run: meson test -C builddir --no-suite integration --verbose |
| 77 | - name: Integration tests (short) |
| 78 | run: meson test -C builddir --suite integration_short --verbose |
| 79 | - name: Integration tests (long) |
| 80 | run: meson test -C builddir --suite integration_long --verbose |
| 81 | - name: Upload Meson logs |
| 82 | if: always() |
| 83 | uses: actions/upload-artifact@v7 |
| 84 | with: |
| 85 | name: meson-logs-ubuntu-${{ matrix.compiler }}-${{ matrix.buildtype }} |
| 86 | path: builddir/meson-logs/ |