Skip to content

Commit

Permalink
Add CLang 18 support
Browse files Browse the repository at this point in the history
  • Loading branch information
ptondereau committed Jun 12, 2024
1 parent 0d9496b commit a84668c
Show file tree
Hide file tree
Showing 5 changed files with 171 additions and 199 deletions.
14 changes: 7 additions & 7 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 @@ -31,7 +31,7 @@ jobs:
- os: macos-latest
clang: "17"
- os: ubuntu-latest
clang: "15"
clang: "18"
- os: windows-latest
clang: "15"
env:
Expand Down Expand Up @@ -64,26 +64,26 @@ 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@v2
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
# Build
- name: Build
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"]
Loading

0 comments on commit a84668c

Please sign in to comment.