diff options
Diffstat (limited to '.github/workflows/main.yml')
-rw-r--r-- | .github/workflows/main.yml | 64 |
1 files changed, 34 insertions, 30 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d27cd44584..30492eacdd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,18 +42,18 @@ jobs: then skip_concurrent=no fi - echo "::set-output name=enabled::$enabled" - echo "::set-output name=skip_concurrent::$skip_concurrent" + echo "enabled=$enabled" >>$GITHUB_OUTPUT + echo "skip_concurrent=$skip_concurrent" >>$GITHUB_OUTPUT - name: skip if the commit or tree was already tested id: skip-if-redundant - uses: actions/github-script@v3 + uses: actions/github-script@v6 if: steps.check-ref.outputs.enabled == 'yes' with: github-token: ${{secrets.GITHUB_TOKEN}} script: | try { // Figure out workflow ID, commit and tree - const { data: run } = await github.actions.getWorkflowRun({ + const { data: run } = await github.rest.actions.getWorkflowRun({ owner: context.repo.owner, repo: context.repo.repo, run_id: context.runId, @@ -63,7 +63,7 @@ jobs: const tree_id = run.head_commit.tree_id; // See whether there is a successful run for that commit or tree - const { data: runs } = await github.actions.listWorkflowRuns({ + const { data: runs } = await github.rest.actions.listWorkflowRuns({ owner: context.repo.owner, repo: context.repo.repo, per_page: 500, @@ -95,7 +95,7 @@ jobs: group: windows-build-${{ github.ref }} cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: git-for-windows/setup-git-for-windows-sdk@v1 - name: build shell: bash @@ -106,7 +106,7 @@ jobs: - name: zip up tracked files run: git archive -o artifacts/tracked.tar.gz HEAD - name: upload tracked files and build artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: windows-artifacts path: artifacts @@ -123,7 +123,7 @@ jobs: cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }} steps: - name: download tracked files and build artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: windows-artifacts path: ${{github.workspace}} @@ -140,14 +140,14 @@ jobs: run: ci/print-test-failures.sh - name: Upload failed tests' directories if: failure() && env.FAILED_TEST_ARTIFACTS != '' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: failed-tests-windows path: ${{env.FAILED_TEST_ARTIFACTS}} vs-build: name: win+VS build needs: ci-config - if: needs.ci-config.outputs.enabled == 'yes' + if: github.event.repository.owner.login == 'git-for-windows' && needs.ci-config.outputs.enabled == 'yes' env: NO_PERL: 1 GIT_CONFIG_PARAMETERS: "'user.name=CI' 'user.email=ci@git'" @@ -156,10 +156,10 @@ jobs: group: vs-build-${{ github.ref }} cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: git-for-windows/setup-git-for-windows-sdk@v1 - name: initialize vcpkg - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: 'microsoft/vcpkg' path: 'compat/vcbuild/vcpkg' @@ -195,7 +195,7 @@ jobs: - name: zip up tracked files run: git archive -o artifacts/tracked.tar.gz HEAD - name: upload tracked files and build artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: vs-artifacts path: artifacts @@ -213,7 +213,7 @@ jobs: steps: - uses: git-for-windows/setup-git-for-windows-sdk@v1 - name: download tracked files and build artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: vs-artifacts path: ${{github.workspace}} @@ -231,7 +231,7 @@ jobs: run: ci/print-test-failures.sh - name: Upload failed tests' directories if: failure() && env.FAILED_TEST_ARTIFACTS != '' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: failed-tests-windows path: ${{env.FAILED_TEST_ARTIFACTS}} @@ -251,24 +251,22 @@ jobs: pool: ubuntu-latest - jobname: linux-sha256 cc: clang - os: ubuntu pool: ubuntu-latest - jobname: linux-gcc cc: gcc cc_package: gcc-8 - pool: ubuntu-latest + pool: ubuntu-20.04 - jobname: linux-TEST-vars cc: gcc - os: ubuntu cc_package: gcc-8 - pool: ubuntu-latest + pool: ubuntu-20.04 - jobname: osx-clang cc: clang - pool: macos-latest + pool: macos-12 - jobname: osx-gcc cc: gcc cc_package: gcc-9 - pool: macos-latest + pool: macos-12 - jobname: linux-gcc-default cc: gcc pool: ubuntu-latest @@ -288,16 +286,15 @@ jobs: runs_on_pool: ${{matrix.vector.pool}} runs-on: ${{matrix.vector.pool}} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - run: ci/install-dependencies.sh - run: ci/run-build-and-tests.sh - name: print test failures if: failure() && env.FAILED_TEST_ARTIFACTS != '' - shell: bash run: ci/print-test-failures.sh - name: Upload failed tests' directories if: failure() && env.FAILED_TEST_ARTIFACTS != '' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: failed-tests-${{matrix.vector.jobname}} path: ${{env.FAILED_TEST_ARTIFACTS}} @@ -315,7 +312,6 @@ jobs: - jobname: linux-musl image: alpine - jobname: linux32 - os: ubuntu32 image: daald/ubuntu32:xenial - jobname: pedantic image: fedora @@ -324,15 +320,23 @@ jobs: runs-on: ubuntu-latest container: ${{matrix.vector.image}} steps: + - uses: actions/checkout@v3 + if: matrix.vector.jobname != 'linux32' - uses: actions/checkout@v1 + if: matrix.vector.jobname == 'linux32' - run: ci/install-docker-dependencies.sh - run: ci/run-build-and-tests.sh - name: print test failures if: failure() && env.FAILED_TEST_ARTIFACTS != '' - shell: bash run: ci/print-test-failures.sh - name: Upload failed tests' directories - if: failure() && env.FAILED_TEST_ARTIFACTS != '' + if: failure() && env.FAILED_TEST_ARTIFACTS != '' && matrix.vector.jobname != 'linux32' + uses: actions/upload-artifact@v3 + with: + name: failed-tests-${{matrix.vector.jobname}} + path: ${{env.FAILED_TEST_ARTIFACTS}} + - name: Upload failed tests' directories + if: failure() && env.FAILED_TEST_ARTIFACTS != '' && matrix.vector.jobname == 'linux32' uses: actions/upload-artifact@v1 with: name: failed-tests-${{matrix.vector.jobname}} @@ -347,7 +351,7 @@ jobs: group: static-analysis-${{ github.ref }} cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - run: ci/install-dependencies.sh - run: ci/run-static-analysis.sh - run: ci/check-directional-formatting.bash @@ -370,7 +374,7 @@ jobs: artifact: sparse-20.04 - name: Install the current `sparse` package run: sudo dpkg -i sparse-20.04/sparse_*.deb - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install other dependencies run: ci/install-dependencies.sh - run: make sparse @@ -385,6 +389,6 @@ jobs: jobname: Documentation runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - run: ci/install-dependencies.sh - run: ci/test-documentation.sh |