1
1
name : Build and Lint
2
2
on :
3
- schedule :
4
- # runs every monday at midnight
5
- - cron : " 0 0 * * 1"
3
+ # schedule:
4
+ # # runs every monday at midnight
5
+ # - cron: "0 0 * * 1"
6
6
push :
7
7
branches :
8
8
- master
9
9
pull_request :
10
10
11
11
jobs :
12
- build :
13
- name : Build and Test
14
- runs-on : ${{ matrix.os }}
15
- strategy :
16
- matrix :
17
- os : [ubuntu-latest, macos-latest, windows-latest]
18
- php : ["8.0", "8.1", "8.2", "8.3"]
19
- rust : [stable, nightly]
20
- clang : ["15", "17"]
21
- phpts : [ts, nts]
22
- exclude :
23
- # ext-php-rs requires nightly Rust when on Windows.
24
- - os : windows-latest
25
- rust : stable
26
- # setup-php doesn't support thread safe PHP on Linux and macOS.
27
- - os : macos-latest
28
- phpts : ts
29
- - os : ubuntu-latest
30
- phpts : ts
31
- - os : macos-latest
32
- clang : " 17"
33
- - os : ubuntu-latest
34
- clang : " 15"
35
- - os : windows-latest
36
- clang : " 15"
37
- env :
38
- CARGO_TERM_COLOR : always
39
- steps :
40
- - name : Checkout code
41
- uses : actions/checkout@v4
42
- - name : Setup PHP
43
- uses : shivammathur/setup-php@v2
44
- with :
45
- php-version : ${{ matrix.php }}
46
- env :
47
- phpts : ${{ matrix.phpts }}
48
- debug : true
49
- - name : Setup Rust
50
- uses : dtolnay/rust-toolchain@master
51
- with :
52
- toolchain : ${{ matrix.rust }}
53
- components : rustfmt, clippy
54
- - run : rustup show
55
- - name : Cache cargo dependencies
56
- uses : Swatinem/rust-cache@v2
57
- # Uncomment the following if statement if caching nightly deps
58
- # ends up causing too much cache invalidation.
59
- # if: matrix.rust == 'stable'
60
- with :
61
- # increment this manually to force cache eviction
62
- prefix-key : " v0-rust"
63
- # LLVM & Clang
64
- - name : Cache LLVM and Clang
65
- id : cache-llvm
66
- uses : actions/cache@v3
67
- if : " !contains(matrix.os, 'windows')"
68
- with :
69
- path : ${{ runner.temp }}/llvm-${{ matrix.clang }}
70
- key : ${{ matrix.os }}-llvm-${{ matrix.clang }}
71
- - name : Setup LLVM & Clang
72
- id : clang
73
- uses : KyleMayes/install-llvm-action@v1
74
- if : " !contains(matrix.os, 'windows')"
75
- with :
76
- version : ${{ matrix.clang }}
77
- directory : ${{ runner.temp }}/llvm-${{ matrix.clang }}
78
- cached : ${{ steps.cache-llvm.outputs.cache-hit }}
79
- - name : Configure Clang
80
- if : " !contains(matrix.os, 'windows')"
81
- run : |
82
- echo "LIBCLANG_PATH=${{ runner.temp }}/llvm-${{ matrix.clang }}/lib" >> $GITHUB_ENV
83
- echo "LLVM_VERSION=${{ steps.clang.outputs.version }}" >> $GITHUB_ENV
84
- echo "LLVM_CONFIG_PATH=${{ runner.temp }}/llvm-${{ matrix.clang }}/bin/llvm-config" >> $GITHUB_ENV
85
- - name : Configure Clang (macOS only)
86
- if : " contains(matrix.os, 'macos')"
87
- run : echo "SDKROOT=$(xcrun --show-sdk-path)" >> $GITHUB_ENV
88
- # Build
89
- - name : Build
90
- env :
91
- EXT_PHP_RS_TEST : " "
92
- run : cargo build --release --features closure,anyhow --all
93
- # Test & lint
94
- - name : Test inline examples
95
- run : cargo test --release --all --features closure,anyhow --no-fail-fast
96
- - name : Run rustfmt
97
- if : matrix.rust == 'stable' && matrix.os == 'ubuntu-latest' && matrix.php == '8.2'
98
- run : cargo fmt --all -- --check
99
- - name : Run clippy
100
- if : matrix.rust == 'stable' && matrix.os == 'ubuntu-latest' && matrix.php == '8.2'
101
- run : cargo clippy --all -- -D warnings
102
- # Docs
103
- - name : Run rustdoc
104
- if : matrix.rust == 'stable' && matrix.os == 'ubuntu-latest' && matrix.php == '8.2'
105
- run : cargo rustdoc -- -D warnings
106
- - name : Build with docs stub
107
- if : matrix.rust == 'stable' && matrix.os == 'ubuntu-latest' && matrix.php == '8.2'
108
- env :
109
- DOCS_RS : " "
110
- run : cargo clean && cargo build
12
+ # build:
13
+ # name: Build and Test
14
+ # runs-on: ${{ matrix.os }}
15
+ # strategy:
16
+ # matrix:
17
+ # os: [ubuntu-latest, macos-latest, windows-latest]
18
+ # php: ["8.0", "8.1", "8.2", "8.3"]
19
+ # rust: [stable, nightly]
20
+ # clang: ["15", "17"]
21
+ # phpts: [ts, nts]
22
+ # exclude:
23
+ # # ext-php-rs requires nightly Rust when on Windows.
24
+ # - os: windows-latest
25
+ # rust: stable
26
+ # # setup-php doesn't support thread safe PHP on Linux and macOS.
27
+ # - os: macos-latest
28
+ # phpts: ts
29
+ # - os: ubuntu-latest
30
+ # phpts: ts
31
+ # - os: macos-latest
32
+ # clang: "17"
33
+ # - os: ubuntu-latest
34
+ # clang: "15"
35
+ # - os: windows-latest
36
+ # clang: "15"
37
+ # env:
38
+ # CARGO_TERM_COLOR: always
39
+ # steps:
40
+ # - name: Checkout code
41
+ # uses: actions/checkout@v4
42
+ # - name: Setup PHP
43
+ # uses: shivammathur/setup-php@v2
44
+ # with:
45
+ # php-version: ${{ matrix.php }}
46
+ # env:
47
+ # phpts: ${{ matrix.phpts }}
48
+ # debug: true
49
+ # - name: Setup Rust
50
+ # uses: dtolnay/rust-toolchain@master
51
+ # with:
52
+ # toolchain: ${{ matrix.rust }}
53
+ # components: rustfmt, clippy
54
+ # - run: rustup show
55
+ # - name: Cache cargo dependencies
56
+ # uses: Swatinem/rust-cache@v2
57
+ # # Uncomment the following if statement if caching nightly deps
58
+ # # ends up causing too much cache invalidation.
59
+ # # if: matrix.rust == 'stable'
60
+ # with:
61
+ # # increment this manually to force cache eviction
62
+ # prefix-key: "v0-rust"
63
+ # # LLVM & Clang
64
+ # - name: Cache LLVM and Clang
65
+ # id: cache-llvm
66
+ # uses: actions/cache@v3
67
+ # if: "!contains(matrix.os, 'windows')"
68
+ # with:
69
+ # path: ${{ runner.temp }}/llvm-${{ matrix.clang }}
70
+ # key: ${{ matrix.os }}-llvm-${{ matrix.clang }}
71
+ # - name: Setup LLVM & Clang
72
+ # id: clang
73
+ # uses: KyleMayes/install-llvm-action@v1
74
+ # if: "!contains(matrix.os, 'windows')"
75
+ # with:
76
+ # version: ${{ matrix.clang }}
77
+ # directory: ${{ runner.temp }}/llvm-${{ matrix.clang }}
78
+ # cached: ${{ steps.cache-llvm.outputs.cache-hit }}
79
+ # - name: Configure Clang
80
+ # if: "!contains(matrix.os, 'windows')"
81
+ # run: |
82
+ # echo "LIBCLANG_PATH=${{ runner.temp }}/llvm-${{ matrix.clang }}/lib" >> $GITHUB_ENV
83
+ # echo "LLVM_VERSION=${{ steps.clang.outputs.version }}" >> $GITHUB_ENV
84
+ # echo "LLVM_CONFIG_PATH=${{ runner.temp }}/llvm-${{ matrix.clang }}/bin/llvm-config" >> $GITHUB_ENV
85
+ # - name: Configure Clang (macOS only)
86
+ # if: "contains(matrix.os, 'macos')"
87
+ # run: echo "SDKROOT=$(xcrun --show-sdk-path)" >> $GITHUB_ENV
88
+ # # Build
89
+ # - name: Build
90
+ # env:
91
+ # EXT_PHP_RS_TEST: ""
92
+ # run: cargo build --release --features closure,anyhow --all
93
+ # # Test & lint
94
+ # - name: Test inline examples
95
+ # run: cargo test --release --all --features closure,anyhow --no-fail-fast
96
+ # - name: Run rustfmt
97
+ # if: matrix.rust == 'stable' && matrix.os == 'ubuntu-latest' && matrix.php == '8.2'
98
+ # run: cargo fmt --all -- --check
99
+ # - name: Run clippy
100
+ # if: matrix.rust == 'stable' && matrix.os == 'ubuntu-latest' && matrix.php == '8.2'
101
+ # run: cargo clippy --all -- -D warnings
102
+ # # Docs
103
+ # - name: Run rustdoc
104
+ # if: matrix.rust == 'stable' && matrix.os == 'ubuntu-latest' && matrix.php == '8.2'
105
+ # run: cargo rustdoc -- -D warnings
106
+ # - name: Build with docs stub
107
+ # if: matrix.rust == 'stable' && matrix.os == 'ubuntu-latest' && matrix.php == '8.2'
108
+ # env:
109
+ # DOCS_RS: ""
110
+ # run: cargo clean && cargo build
111
111
build-zts :
112
112
name : Build with ZTS
113
113
runs-on : ubuntu-latest
@@ -116,6 +116,7 @@ jobs:
116
116
uses : actions/checkout@v4
117
117
- name : Build
118
118
uses : ./.github/actions/zts
119
+
119
120
test-embed :
120
121
name : Test with embed
121
122
runs-on : ubuntu-latest
0 commit comments