@@ -34,18 +34,26 @@ jobs:
3434 with :
3535 toolchain : ${{ matrix.rust-toolchain }}
3636 override : true
37+ components : rustfmt, clippy
3738 - name : Setup LLVM & Clang
39+ id : clang
3840 uses : KyleMayes/install-llvm-action@v1
3941 with :
4042 version : ${{ matrix.llvm }}
4143 directory : ${{ runner.temp }}/llvm-${{ matrix.llvm }}
44+ - name : Configure Clang
45+ run : |
46+ echo "LIBCLANG_PATH=${{ runner.temp }}/llvm-${{ matrix.llvm }}/lib" >> $GITHUB_ENV
47+ echo "LLVM_VERSION=${{ steps.clang.outputs.version }}" >> $GITHUB_ENV
48+ - name : Configure Clang (macOS only)
49+ if : " contains(matrix.os, 'macos')"
50+ run : echo "SDKROOT=$(xcrun --show-sdk-path)" >> $GITHUB_ENV
4251 - name : Install mdbook
4352 uses : peaceiris/actions-mdbook@v1
4453 with :
4554 mdbook-version : latest
4655 - name : Build
4756 env :
48- LIBCLANG_PATH : ${{ runner.temp }}/llvm-${{ matrix.llvm }}/lib
4957 EXT_PHP_RS_TEST :
5058 run : cargo build --release --all-features --all
5159 - name : Test guide examples
@@ -56,57 +64,30 @@ jobs:
5664 mdbook test guide -L target/release/deps
5765 - name : Test inline examples
5866 uses : actions-rs/cargo@v1
59- env :
60- LIBCLANG_PATH : ${{ runner.temp }}/llvm-${{ matrix.llvm }}/lib
6167 with :
6268 command : test
6369 args : --release --all
64- build-zts :
65- name : Build with ZTS
66- runs-on : ubuntu-latest
67- steps :
68- - name : Checkout code
69- uses : actions/checkout@v2
70- - name : Build
71- uses : ./.github/actions/zts
72- lint :
73- name : Lint
74- runs-on : ubuntu-latest
75- strategy :
76- matrix :
77- llvm :
78- - ' 11.0'
79- steps :
80- - name : Checkout code
81- uses : actions/checkout@v2
82- - name : Setup Rust
83- uses : actions-rs/toolchain@v1
84- with :
85- profile : minimal
86- toolchain : stable
87- override : true
88- components : rustfmt, clippy
89- - name : Setup LLVM & Clang
90- uses : KyleMayes/install-llvm-action@v1
91- with :
92- version : ${{ matrix.llvm }}
93- directory : ${{ runner.temp }}/llvm-${{ matrix.llvm }}
9470 - name : Run rustfmt
9571 uses : actions-rs/cargo@v1
96- env :
97- LIBCLANG_PATH : ${{ runner.temp }}/llvm-${{ matrix.llvm }}/lib
9872 with :
9973 command : fmt
10074 args : --all -- --check
10175 - name : Run clippy
10276 uses : actions-rs/cargo@v1
103- env :
104- LIBCLANG_PATH : ${{ runner.temp }}/llvm-${{ matrix.llvm }}/lib
10577 with :
10678 command : clippy
10779 args : --all -- -D warnings
10880 - name : Build with docs stub
81+ if : " contains(matrix.os, 'ubuntu') && ${{ matrix.php }} == '8.1'"
10982 env :
11083 DOCS_RS :
11184 run :
11285 cargo clean && cargo build
86+ build-zts :
87+ name : Build with ZTS
88+ runs-on : ubuntu-latest
89+ steps :
90+ - name : Checkout code
91+ uses : actions/checkout@v2
92+ - name : Build
93+ uses : ./.github/actions/zts
0 commit comments