|
7 | 7 |
|
8 | 8 | permissions: {} |
9 | 9 |
|
| 10 | +env: |
| 11 | + PHP_EXT: snappy |
| 12 | + BIN_SDK_VER: 2.3.0 |
| 13 | + |
10 | 14 | jobs: |
11 | | - get-extension-matrix: |
12 | | - runs-on: ubuntu-latest |
13 | | - outputs: |
14 | | - matrix: ${{ steps.extension-matrix.outputs.matrix }} |
15 | | - steps: |
16 | | - - name: Checkout |
17 | | - uses: actions/checkout@v4 |
18 | | - with: |
19 | | - persist-credentials: false |
20 | | - - id: extension-matrix |
21 | | - name: Get the extension matrix |
22 | | - uses: php/php-windows-builder/extension-matrix@v1 |
23 | 15 | build: |
24 | | - needs: get-extension-matrix |
25 | | - runs-on: ${{ matrix.os }} |
| 16 | + runs-on: ${{ matrix.vs == 'vs17' && 'windows-2022' || 'windows-2019' }} |
| 17 | + env: |
| 18 | + # PHP_EXT_VERSION: ${{ github.event.release.tag_name }} |
| 19 | + PHP_EXT_VERSION: 0.2.3 # WIP |
| 20 | + PHP_VER: ${{ matrix.php }} |
| 21 | + VS: ${{ matrix.vs }} |
| 22 | + ARCH: ${{ matrix.arch }} |
| 23 | + TS: ${{ matrix.ts }} |
26 | 24 | steps: |
27 | | - - name: Checkout |
| 25 | + - name: Checkout repository |
28 | 26 | uses: actions/checkout@v4 |
29 | 27 | with: |
30 | 28 | persist-credentials: false |
31 | | - submodules: true |
32 | | - - name: Build the extension |
33 | | - uses: php/php-windows-builder/extension@v1 |
| 29 | + - name: Checkout submodule |
| 30 | + run: .\.github\workflows\submodule.ps1 |
| 31 | + shell: powershell |
| 32 | + - name: Install build command |
| 33 | + run: .\.github\workflows\install.ps1 |
| 34 | + shell: powershell |
| 35 | + - name: Build |
| 36 | + run: .\.github\workflows\build.ps1 |
| 37 | + shell: powershell |
| 38 | + - name: Test |
| 39 | + run: .\.github\workflows\test.ps1 |
| 40 | + shell: powershell |
| 41 | + env: |
| 42 | + REPORT_EXIT_STATUS: 1 |
| 43 | + NO_INTERACTION: 1 |
| 44 | + - name: Archive |
| 45 | + run: .\.github\workflows\archive.ps1 |
| 46 | + shell: powershell |
| 47 | + - name: Store artifact DLL |
| 48 | + uses: actions/upload-artifact@v4 |
34 | 49 | with: |
35 | | - php-version: ${{ matrix.php-version }} |
36 | | - arch: ${{ matrix.arch }} |
37 | | - ts: ${{ matrix.ts }} |
| 50 | + name: php_${{ env.PHP_EXT }}-${{ env.PHP_EXT_VERSION }}-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.vs }}-${{ matrix.arch }} |
| 51 | + path: .\php_${{ env.PHP_EXT }}-${{ env.PHP_EXT_VERSION }}-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.vs }}-${{ matrix.arch }}.zip |
| 52 | + overwrite: true |
38 | 53 | strategy: |
39 | | - matrix: ${{fromJson(needs.get-extension-matrix.outputs.matrix)}} |
| 54 | + matrix: |
| 55 | + php: |
| 56 | + - '8.4' |
| 57 | + - '8.3' |
| 58 | + - '8.2' |
| 59 | + - '8.1' |
| 60 | + arch: |
| 61 | + - x64 |
| 62 | + - x86 |
| 63 | + ts: |
| 64 | + - 'nts' |
| 65 | + - 'ts' |
| 66 | + vs: |
| 67 | + - vs16 |
| 68 | + - vs17 |
| 69 | + exclude: |
| 70 | + - php: '8.4' |
| 71 | + vs: vs16 |
| 72 | + - php: '8.3' |
| 73 | + vs: vs17 |
| 74 | + - php: '8.2' |
| 75 | + vs: vs17 |
| 76 | + - php: '8.1' |
| 77 | + vs: vs17 |
| 78 | + |
40 | 79 | release: |
41 | 80 | permissions: |
42 | 81 | contents: write |
43 | 82 | needs: build |
44 | | - if: ${{ github.event_name == 'release' }} |
45 | 83 | runs-on: ubuntu-latest |
| 84 | + env: |
| 85 | + # PHP_EXT_VERSION: ${{ github.event.release.tag_name }} |
| 86 | + PHP_EXT_VERSION: 0.2.3 # WIP |
| 87 | + # if: ${{ github.event_name == 'release' }} |
46 | 88 | steps: |
47 | | - - name: Upload artifact to the release |
48 | | - uses: php/php-windows-builder/release@v1 |
| 89 | + - name: Checkout |
| 90 | + uses: actions/checkout@v4 |
| 91 | + with: |
| 92 | + persist-credentials: false |
| 93 | + - name: Get artifacts |
| 94 | + uses: actions/download-artifact@v4 |
49 | 95 | with: |
50 | | - release: ${{ github.event.release.tag_name }} |
51 | | - token: ${{ secrets.GITHUB_TOKEN }} |
| 96 | + path: artifacts |
| 97 | + merge-multiple: true |
| 98 | + - name: Upload artifacts |
| 99 | + # env: |
| 100 | + # GITHUB_TOKEN: ${{ inputs.token }} |
| 101 | + # run: gh release upload ${{ github.event.release.tag_name }} artifacts/php* --clobber |
| 102 | + run: gh release upload ${{ env.PHP_EXT_VERSION }} artifacts/php* --clobber |
| 103 | + shell: bash |
0 commit comments