Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
php: ["8.0", "8.1", "8.2", "8.3"]
rust: [stable, nightly]
clang: ["15", "17"]
clang: ["15", "17", "18"]
phpts: [ts, nts]
exclude:
# ext-php-rs requires nightly Rust when on Windows.
Expand All @@ -29,9 +29,9 @@ jobs:
- os: ubuntu-latest
phpts: ts
- os: macos-latest
clang: "17"
clang: "18"
- os: ubuntu-latest
clang: "15"
clang: "18"
- os: windows-latest
clang: "15"
env:
Expand All @@ -43,9 +43,11 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: phpize, php-config
env:
phpts: ${{ matrix.phpts }}
debug: true
update: true
- name: Setup Rust
uses: dtolnay/rust-toolchain@master
with:
Expand All @@ -64,27 +66,30 @@ jobs:
- name: Cache LLVM and Clang
id: cache-llvm
uses: actions/cache@v3
if: "!contains(matrix.os, 'windows')"
if: ${{ !contains(matrix.os, 'windows') }}
with:
path: ${{ runner.temp }}/llvm-${{ matrix.clang }}
key: ${{ matrix.os }}-llvm-${{ matrix.clang }}
- name: Setup LLVM & Clang
id: clang
uses: KyleMayes/install-llvm-action@v1
if: "!contains(matrix.os, 'windows')"
uses: KyleMayes/install-llvm-action@master
if: ${{ !contains(matrix.os, 'windows') }}
with:
version: ${{ matrix.clang }}
directory: ${{ runner.temp }}/llvm-${{ matrix.clang }}
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
- name: Configure Clang
if: "!contains(matrix.os, 'windows')"
if: ${{ !contains(matrix.os, 'windows') }}
run: |
echo "LIBCLANG_PATH=${{ runner.temp }}/llvm-${{ matrix.clang }}/lib" >> $GITHUB_ENV
echo "LLVM_VERSION=${{ steps.clang.outputs.version }}" >> $GITHUB_ENV
echo "LLVM_CONFIG_PATH=${{ runner.temp }}/llvm-${{ matrix.clang }}/bin/llvm-config" >> $GITHUB_ENV
- name: Configure Clang (macOS only)
if: "contains(matrix.os, 'macos')"
if: ${{ contains(matrix.os, 'macos') }}
run: echo "SDKROOT=$(xcrun --show-sdk-path)" >> $GITHUB_ENV
- name: Install libsqlite3 (OSX only)
if: ${{ contains(matrix.os, 'macos-latest') }}
run: brew reinstall sqlite
# Build
- name: Build
env:
Expand Down
8 changes: 2 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ skeptic = "0.13"

[build-dependencies]
anyhow = "1"
bindgen = "0.68.1"
bindgen = "0.69.4"
cc = "1.0"
skeptic = "0.13"

Expand All @@ -41,11 +41,7 @@ closure = []
embed = []

[workspace]
members = [
"crates/macros",
"crates/cli",
"tests"
]
members = ["crates/macros", "crates/cli", "tests"]

[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docs"]
7 changes: 6 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,12 @@ impl PHPInfo {
.output()
.context("Failed to call `php -i`")?;
if !cmd.status.success() {
bail!("Failed to call `php -i` status code {}", cmd.status);
let stderr = String::from_utf8_lossy(&cmd.stderr);
bail!(
"Failed to call `php -i` status code {} with stderr: {}",
cmd.status,
stderr
);
}
let stdout = String::from_utf8_lossy(&cmd.stdout);
Ok(Self(stdout.to_string()))
Expand Down
Loading