|
1 | 1 | name: Build and Lint |
2 | 2 | on: |
3 | | - schedule: |
4 | | - # runs every monday at midnight |
5 | | - - cron: "0 0 * * 1" |
6 | | - push: |
7 | | - branches: |
8 | | - - master |
9 | | - pull_request: |
| 3 | + workflow_call: |
| 4 | + inputs: |
| 5 | + rust_cache_prefix: |
| 6 | + description: "Cache busting prefix for Rust dependencies" |
| 7 | + default: "v0-rust" |
| 8 | + type: string |
| 9 | + workflow_dispatch: |
10 | 10 | env: |
11 | 11 | # increment this manually to force cache eviction |
12 | | - RUST_CACHE_PREFIX: "v0-rust" |
| 12 | + RUST_CACHE_PREFIX: ${{ inputs.rust_cache_prefix }} |
13 | 13 |
|
14 | 14 | concurrency: |
15 | 15 | group: ${{ github.workflow }}-${{ github.ref }} |
@@ -168,7 +168,6 @@ jobs: |
168 | 168 | # Macos fails on unstable rust. We skip the inline examples test for now. |
169 | 169 | if: "!(contains(matrix.os, 'macos') && matrix.rust == 'nightly')" |
170 | 170 | run: cargo test --release --workspace --features closure,anyhow,runtime --no-fail-fast |
171 | | - |
172 | 171 | test-embed: |
173 | 172 | name: Test with embed (${{ matrix.phpts }}) |
174 | 173 | runs-on: ubuntu-latest |
@@ -231,3 +230,45 @@ jobs: |
231 | 230 | ulimit -c unlimited |
232 | 231 | cargo test --workspace --release --features closure,embed,anyhow --no-fail-fast || \ |
233 | 232 | (for core in core.*; do [ -f "$core" ] && gdb -batch -ex "thread apply all bt" target/release/deps/sapi_tests-* "$core"; done; exit 1) |
| 233 | +
|
| 234 | + build-musl: |
| 235 | + name: musl / ${{ matrix.php }} / ${{ matrix.phpts[1] }} |
| 236 | + runs-on: ubuntu-latest |
| 237 | + strategy: |
| 238 | + matrix: |
| 239 | + php: ["8.1", "8.2", "8.3", "8.4"] |
| 240 | + phpts: [["-zts", "TS"], ["", "NTS"]] |
| 241 | + env: |
| 242 | + CARGO_TERM_COLOR: always |
| 243 | + steps: |
| 244 | + - name: Checkout code |
| 245 | + uses: actions/checkout@v5 |
| 246 | + - name: Setup DockerX |
| 247 | + uses: docker/setup-buildx-action@v3 |
| 248 | + - name: Build |
| 249 | + uses: docker/build-push-action@v6 |
| 250 | + with: |
| 251 | + context: .github/action/musl |
| 252 | + file: .github/action/musl/Dockerfile |
| 253 | + tags: | |
| 254 | + extphprs/ext-php-rs:musl-${{ matrix.php }}-${{ matrix.phpts[1] }} |
| 255 | + push: false |
| 256 | + load: true |
| 257 | + platforms: linux/amd64 |
| 258 | + build-args: | |
| 259 | + PHP_VERSION=${{ matrix.php }} |
| 260 | + TS=${{ matrix.phpts[0] }} |
| 261 | + - name: Build |
| 262 | + run: | |
| 263 | + docker run \ |
| 264 | + -v $(pwd):/workspace \ |
| 265 | + -w /workspace \ |
| 266 | + extphprs/ext-php-rs:musl-${{ matrix.php }}-${{ matrix.phpts[1] }} \ |
| 267 | + build --release --features closure,anyhow,runtime --workspace |
| 268 | + - name: Run tests |
| 269 | + run: | |
| 270 | + docker run \ |
| 271 | + -v $(pwd):/workspace \ |
| 272 | + -w /workspace \ |
| 273 | + extphprs/ext-php-rs:musl-${{ matrix.php }}-${{ matrix.phpts[1] }} \ |
| 274 | + test --workspace --release --features closure,anyhow,runtime --no-fail-fast |
0 commit comments