|
| 1 | +name: Nightly |
| 2 | +on: |
| 3 | + schedule: |
| 4 | + - cron: "0 1 * * *" |
| 5 | + workflow_dispatch: ~ |
| 6 | + issue_comment: |
| 7 | + types: [created] |
| 8 | +jobs: |
| 9 | + GENERATE_MATRIX: |
| 10 | + name: Generate Matrix |
| 11 | + runs-on: ubuntu-latest |
| 12 | + outputs: |
| 13 | + branches: ${{ steps.set-matrix.outputs.branches }} |
| 14 | + asan-matrix: ${{ steps.set-matrix.outputs.asan-matrix }} |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v2 |
| 17 | + with: |
| 18 | + # Set fetch-depth to 0 to clone the full repository |
| 19 | + # including all branches. This is required to find |
| 20 | + # the correct commit hashes. |
| 21 | + fetch-depth: 0 |
| 22 | + - name: Grab the commit mapping |
| 23 | + uses: actions/cache@v3 |
| 24 | + with: |
| 25 | + path: branch-commit-cache.json |
| 26 | + # The cache key needs to change every time for the |
| 27 | + # cache to be updated after this job finishes. |
| 28 | + key: nightly-${{ github.run_id }}-${{ github.run_attempt }} |
| 29 | + restore-keys: | |
| 30 | + nightly- |
| 31 | + - name: Generate Matrix |
| 32 | + id: set-matrix |
| 33 | + run: php .github/nightly_matrix.php "${{ github.event_name }}" "${{ github.run_attempt }}" |
| 34 | + LINUX_X64: |
| 35 | + needs: GENERATE_MATRIX |
| 36 | + if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }} |
| 37 | + strategy: |
| 38 | + fail-fast: false |
| 39 | + matrix: |
| 40 | + branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }} |
| 41 | + debug: [true, false] |
| 42 | + zts: [true, false] |
| 43 | + include: ${{ fromJson(needs.GENERATE_MATRIX.outputs.asan-matrix) }} |
| 44 | + name: "${{ matrix.branch.name }}_LINUX_X64${{ matrix.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}" |
| 45 | + runs-on: ubuntu-20.04 |
| 46 | + steps: |
| 47 | + - name: git checkout |
| 48 | + uses: actions/checkout@v2 |
| 49 | + with: |
| 50 | + ref: ${{ matrix.branch.ref }} |
| 51 | + - name: Create mssql container |
| 52 | + uses: ./.github/actions/mssql |
| 53 | + - name: apt |
| 54 | + uses: ./.github/actions/apt-x64 |
| 55 | + - name: ./configure |
| 56 | + uses: ./.github/actions/configure-x64 |
| 57 | + with: |
| 58 | + configurationParameters: >- |
| 59 | + ${{ matrix.configuration_parameters }} |
| 60 | + --${{ matrix.debug && 'enable' || 'disable' }}-debug |
| 61 | + --${{ matrix.zts && 'enable' || 'disable' }}-zts |
| 62 | + - name: make |
| 63 | + run: make -j$(/usr/bin/nproc) >/dev/null |
| 64 | + - name: make install |
| 65 | + uses: ./.github/actions/install-linux |
| 66 | + - name: Setup |
| 67 | + uses: ./.github/actions/setup-x64 |
| 68 | + - name: Test |
| 69 | + uses: ./.github/actions/test-linux |
| 70 | + with: |
| 71 | + runTestsParameters: >- |
| 72 | + ${{ matrix.run_tests_parameters }} |
| 73 | + - name: Test Tracing JIT |
| 74 | + uses: ./.github/actions/test-linux |
| 75 | + with: |
| 76 | + runTestsParameters: >- |
| 77 | + ${{ matrix.run_tests_parameters }} |
| 78 | + -d zend_extension=opcache.so |
| 79 | + -d opcache.jit_buffer_size=16M |
| 80 | + - name: Test OpCache |
| 81 | + uses: ./.github/actions/test-linux |
| 82 | + with: |
| 83 | + runTestsParameters: >- |
| 84 | + ${{ matrix.run_tests_parameters }} |
| 85 | + -d zend_extension=opcache.so |
| 86 | + - name: Test Function JIT |
| 87 | + uses: ./.github/actions/test-linux |
| 88 | + with: |
| 89 | + runTestsParameters: >- |
| 90 | + ${{ matrix.run_tests_parameters }} |
| 91 | + -d zend_extension=opcache.so |
| 92 | + -d opcache.jit_buffer_size=16M |
| 93 | + -d opcache.jit=1205 |
| 94 | + MACOS: |
| 95 | + needs: GENERATE_MATRIX |
| 96 | + if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }} |
| 97 | + strategy: |
| 98 | + fail-fast: false |
| 99 | + matrix: |
| 100 | + branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }} |
| 101 | + debug: [true, false] |
| 102 | + zts: [true, false] |
| 103 | + name: "${{ matrix.branch.name }}_MACOS_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}" |
| 104 | + runs-on: macos-10.15 |
| 105 | + steps: |
| 106 | + - name: git checkout |
| 107 | + uses: actions/checkout@v2 |
| 108 | + with: |
| 109 | + ref: ${{ matrix.branch.ref }} |
| 110 | + - name: brew |
| 111 | + uses: ./.github/actions/brew |
| 112 | + - name: ./configure |
| 113 | + uses: ./.github/actions/configure-macos |
| 114 | + with: |
| 115 | + configurationParameters: >- |
| 116 | + --${{ matrix.debug && 'enable' || 'disable' }}-debug |
| 117 | + --${{ matrix.zts && 'enable' || 'disable' }}-zts |
| 118 | + - name: make |
| 119 | + run: |- |
| 120 | + export PATH="/usr/local/opt/bison/bin:$PATH" |
| 121 | + make -j$(sysctl -n hw.logicalcpu) >/dev/null |
| 122 | + - name: make install |
| 123 | + run: sudo make install |
| 124 | + - name: Test |
| 125 | + uses: ./.github/actions/test-macos |
| 126 | + - name: Test Tracing JIT |
| 127 | + uses: ./.github/actions/test-macos |
| 128 | + with: |
| 129 | + runTestsParameters: >- |
| 130 | + -d zend_extension=opcache.so |
| 131 | + -d opcache.protect_memory=1 |
| 132 | + -d opcache.jit_buffer_size=16M |
| 133 | + - name: Test OpCache |
| 134 | + uses: ./.github/actions/test-macos |
| 135 | + with: |
| 136 | + runTestsParameters: >- |
| 137 | + -d zend_extension=opcache.so |
| 138 | + -d opcache.protect_memory=1 |
| 139 | + - name: Test Function JIT |
| 140 | + uses: ./.github/actions/test-macos |
| 141 | + with: |
| 142 | + runTestsParameters: >- |
| 143 | + -d zend_extension=opcache.so |
| 144 | + -d opcache.protect_memory=1 |
| 145 | + -d opcache.jit_buffer_size=16M |
| 146 | + -d opcache.jit=1205 |
0 commit comments