Skip to content

Commit 6117076

Browse files
committed
build(bindgen): switch to nightly target function
Refs: #440
1 parent 1579cab commit 6117076

File tree

3 files changed

+337
-123
lines changed

3 files changed

+337
-123
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
os: [ubuntu-latest, macos-latest, windows-latest]
8989
php: ["8.0", "8.1", "8.2", "8.3", "8.4"]
9090
rust: [stable, nightly]
91-
clang: ["15", "17"]
91+
clang: ["15", "18"]
9292
phpts: [ts, nts]
9393
exclude:
9494
# ext-php-rs requires nightly Rust when on Windows.
@@ -100,7 +100,7 @@ jobs:
100100
- os: ubuntu-latest
101101
phpts: ts
102102
- os: macos-latest
103-
clang: "17"
103+
clang: "15"
104104
- os: ubuntu-latest
105105
clang: "15"
106106
- os: windows-latest
@@ -136,22 +136,22 @@ jobs:
136136
id: cache-llvm
137137
uses: actions/cache@v4
138138
# Macos build doesn't work with clang < 18. As a build for version 18 is not available, we skip the setup
139-
if: "!contains(matrix.os, 'windows') && !contains(matrix.os, 'macos')"
139+
if: "!contains(matrix.os, 'windows')"
140140
with:
141141
path: ${{ runner.temp }}/llvm-${{ matrix.clang }}
142142
key: ${{ matrix.os }}-llvm-${{ matrix.clang }}
143143
- name: Setup LLVM & Clang
144144
id: clang
145145
uses: KyleMayes/install-llvm-action@v2
146146
# Macos build doesn't work with clang < 18. As a build for version 18 is not available, we skip the setup
147-
if: "!contains(matrix.os, 'windows') && !contains(matrix.os, 'macos')"
147+
if: "!contains(matrix.os, 'windows')"
148148
with:
149149
version: ${{ matrix.clang }}
150150
directory: ${{ runner.temp }}/llvm-${{ matrix.clang }}
151151
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
152152
- name: Configure Clang
153153
# Macos build doesn't work with clang < 18. As a build for version 18 is not available, we skip the setup
154-
if: "!contains(matrix.os, 'windows') && !contains(matrix.os, 'macos')"
154+
if: "!contains(matrix.os, 'windows')"
155155
run: |
156156
echo "LIBCLANG_PATH=${{ runner.temp }}/llvm-${{ matrix.clang }}/lib" >> $GITHUB_ENV
157157
echo "LLVM_VERSION=${{ steps.clang.outputs.version }}" >> $GITHUB_ENV
@@ -164,7 +164,7 @@ jobs:
164164
# Test
165165
- name: Test inline examples
166166
# Macos fails on unstable rust. We skip the inline examples test for now.
167-
if: "!(contains(matrix.os, 'macos') && matrix.rust == 'nightly')"
167+
# if: "!(contains(matrix.os, 'macos') && matrix.rust == 'nightly')"
168168
run: cargo test --release --all --features closure,anyhow --no-fail-fast
169169
build-zts:
170170
name: Build with ZTS

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ fn generate_bindings(defines: &[(&str, &str)], includes: &[PathBuf]) -> Result<S
222222
.no_copy("_zend_array")
223223
.no_debug("_zend_function_entry") // On Windows when the handler uses vectorcall, Debug cannot be derived so we do it in code.
224224
.layout_tests(env::var("EXT_PHP_RS_TEST").is_ok())
225-
.rust_target(RustTarget::Nightly);
225+
.rust_target(RustTarget::nightly());
226226

227227
for binding in ALLOWED_BINDINGS {
228228
bindgen = bindgen

0 commit comments

Comments
 (0)