Skip to content

Commit d29f457

Browse files
committed
chore(ci): simplify ci, test all features combination
1 parent 828338d commit d29f457

File tree

6 files changed

+11
-68
lines changed

6 files changed

+11
-68
lines changed

.cargo/config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ linker = "rust-lld"
66

77
[target.i686-pc-windows-msvc]
88
linker = "rust-lld"
9+
10+
[alias]
11+
ci-test = "hack test --workspace --feature-powerset --clean-per-run"

.github/actions/embed/Dockerfile

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/actions/embed/action.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/actions/zts/Dockerfile

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/actions/zts/action.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,6 @@ jobs:
9191
- os: windows-latest
9292
rust: stable
9393
# setup-php doesn't support thread safe PHP on Linux and macOS.
94-
- os: macos-latest
95-
phpts: ts
96-
- os: ubuntu-latest
97-
phpts: ts
9894
- os: macos-latest
9995
clang: "17"
10096
- os: ubuntu-latest
@@ -111,6 +107,7 @@ jobs:
111107
with:
112108
php-version: ${{ matrix.php }}
113109
env:
110+
extensions: embed
114111
phpts: ${{ matrix.phpts }}
115112
debug: true
116113
- name: Setup Rust
@@ -152,29 +149,12 @@ jobs:
152149
echo "LIBCLANG_PATH=${{ runner.temp }}/llvm-${{ matrix.clang }}/lib" >> $GITHUB_ENV
153150
echo "LLVM_VERSION=${{ steps.clang.outputs.version }}" >> $GITHUB_ENV
154151
echo "LLVM_CONFIG_PATH=${{ runner.temp }}/llvm-${{ matrix.clang }}/bin/llvm-config" >> $GITHUB_ENV
155-
# Build
156-
- name: Build
152+
- name: Install cargo-hack
153+
uses: taiki-e/install-action@v2
154+
with:
155+
tool: cargo-hack
156+
# Test
157+
- name: Test features matrix
157158
env:
158159
EXT_PHP_RS_TEST: ""
159-
run: cargo build --release --features closure,anyhow --all
160-
# Test
161-
- name: Test inline examples
162-
# Macos fails on unstable rust. We skip the inline examples test for now.
163-
if: "!(contains(matrix.os, 'macos') && matrix.rust == 'nightly')"
164-
run: cargo test --release --all --features closure,anyhow --no-fail-fast
165-
build-zts:
166-
name: Build with ZTS
167-
runs-on: ubuntu-latest
168-
steps:
169-
- name: Checkout code
170-
uses: actions/checkout@v4
171-
- name: Build
172-
uses: ./.github/actions/zts
173-
test-embed:
174-
name: Test with embed
175-
runs-on: ubuntu-latest
176-
steps:
177-
- name: Checkout code
178-
uses: actions/checkout@v4
179-
- name: Test
180-
uses: ./.github/actions/embed
160+
run: cargo ci-test

0 commit comments

Comments
 (0)