@@ -34,18 +34,26 @@ jobs:
34
34
with :
35
35
toolchain : ${{ matrix.rust-toolchain }}
36
36
override : true
37
+ components : rustfmt, clippy
37
38
- name : Setup LLVM & Clang
39
+ id : clang
38
40
uses : KyleMayes/install-llvm-action@v1
39
41
with :
40
42
version : ${{ matrix.llvm }}
41
43
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
42
51
- name : Install mdbook
43
52
uses : peaceiris/actions-mdbook@v1
44
53
with :
45
54
mdbook-version : latest
46
55
- name : Build
47
56
env :
48
- LIBCLANG_PATH : ${{ runner.temp }}/llvm-${{ matrix.llvm }}/lib
49
57
EXT_PHP_RS_TEST :
50
58
run : cargo build --release --all-features --all
51
59
- name : Test guide examples
@@ -56,57 +64,30 @@ jobs:
56
64
mdbook test guide -L target/release/deps
57
65
- name : Test inline examples
58
66
uses : actions-rs/cargo@v1
59
- env :
60
- LIBCLANG_PATH : ${{ runner.temp }}/llvm-${{ matrix.llvm }}/lib
61
67
with :
62
68
command : test
63
69
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 }}
94
70
- name : Run rustfmt
95
71
uses : actions-rs/cargo@v1
96
- env :
97
- LIBCLANG_PATH : ${{ runner.temp }}/llvm-${{ matrix.llvm }}/lib
98
72
with :
99
73
command : fmt
100
74
args : --all -- --check
101
75
- name : Run clippy
102
76
uses : actions-rs/cargo@v1
103
- env :
104
- LIBCLANG_PATH : ${{ runner.temp }}/llvm-${{ matrix.llvm }}/lib
105
77
with :
106
78
command : clippy
107
79
args : --all -- -D warnings
108
80
- name : Build with docs stub
81
+ if : " contains(matrix.os, 'ubuntu') && ${{ matrix.php }} == '8.1'"
109
82
env :
110
83
DOCS_RS :
111
84
run :
112
85
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