From db1c28ba9b25ca8697ef806afc97e39755d7e3c8 Mon Sep 17 00:00:00 2001 From: mcbarton <150042563+mcbarton@users.noreply.github.com> Date: Tue, 7 May 2024 10:31:53 +0100 Subject: [PATCH] Update actions to latest version (part of migration from node 16 to node 20) --- .github/workflows/arch.yml | 2 +- .github/workflows/ci.yml | 10 +++++----- .github/workflows/clang-format.yml | 15 ++++++++------- .github/workflows/clang-tidy-review-post.yml | 2 +- .github/workflows/clang-tidy-review.yml | 10 +++++----- .github/workflows/postci.yml | 4 ++-- 6 files changed, 22 insertions(+), 21 deletions(-) diff --git a/.github/workflows/arch.yml b/.github/workflows/arch.yml index fe413e1f4..be57c9488 100644 --- a/.github/workflows/arch.yml +++ b/.github/workflows/arch.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: "Setup latest Alpine Linux" uses: jirutka/setup-alpine@v1 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7000f77d6..468062be6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -470,11 +470,11 @@ jobs: clang-runtime: '8' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.11 - name: Save PR Info @@ -483,7 +483,7 @@ jobs: mkdir -p ./pr echo ${{ github.event.number }} > ./pr/NR echo ${{ github.repository }} > ./pr/REPO - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: ${{ matrix.coverage == true }} with: name: pr @@ -651,7 +651,7 @@ jobs: - name: Restore Cache LLVM/Clang runtime build directory (debug_build==true) if: ${{ (matrix.debug_build == true) && (runner.os != 'windows') }} - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 id: cache with: path: | @@ -685,7 +685,7 @@ jobs: cmake --build . --target clang FileCheck llvm-config clang-repl --parallel ${CPU_COUNT} cd ../../ - name: Save Cache LLVM/Clang runtime build directory (debug_build==true) - uses: actions/cache/save@v3 + uses: actions/cache/save@v4 if: ${{ (matrix.debug_build == true) && (runner.os != 'windows') && (steps.cache.outputs.cache-hit != 'true') }} with: path: | diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index 5e6b26971..e63a60aba 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -15,20 +15,21 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout PR branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: 3.7 + python-version: 3.11 - name: Install clang-format run: | curl https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - echo "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" | sudo tee -a /etc/apt/sources.list + os_codename="`cat /etc/os-release | grep UBUNTU_CODENAME | cut -d = -f 2`" + echo "deb https://apt.llvm.org/${os_codename}/ llvm-toolchain-${os_codename}-18 main" | sudo tee -a /etc/apt/sources.list sudo apt update - sudo apt install -y clang-format-15 + sudo apt install -y clang-format-18 - name: Download git-clang-format run: | wget https://raw.githubusercontent.com/llvm/llvm-project/main/clang/tools/clang-format/git-clang-format @@ -41,10 +42,10 @@ jobs: -c color.ui=always \ -c diff.wsErrorHighlight=all \ -c color.diff.whitespace='red reverse' \ - clang-format-15 --diff --binary clang-format-15 --commit $PR_BASE || \ + clang-format-18 --diff --binary clang-format-18 --commit $PR_BASE || \ (echo "Please run the following git-clang-format locally to fix the formatting: \n git-clang-format HEAD~\n for multiple commits we should place the formatting changes in the related commit with:\n - \t\tgit rebase -i -x \"git-clang-format-15 master && git commit -a --allow-empty --fixup=HEAD\" --strategy-option=theirs origin/master\n + \t\tgit rebase -i -x \"git-clang-format-18 master && git commit -a --allow-empty --fixup=HEAD\" --strategy-option=theirs origin/master\n \t\t Then inspect the results with: git log --oneline\n \t\t Then squash without poluting the history with: git rebase --autosquash -i master\n" && exit 1) diff --git a/.github/workflows/clang-tidy-review-post.yml b/.github/workflows/clang-tidy-review-post.yml index 147976e36..f81504a69 100644 --- a/.github/workflows/clang-tidy-review-post.yml +++ b/.github/workflows/clang-tidy-review-post.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Post review comments id: post-review - uses: ZedThree/clang-tidy-review/post@v0.13.2 + uses: ZedThree/clang-tidy-review/post@v0.18.0 with: max_comments: 10 diff --git a/.github/workflows/clang-tidy-review.yml b/.github/workflows/clang-tidy-review.yml index 641318428..fa9514974 100644 --- a/.github/workflows/clang-tidy-review.yml +++ b/.github/workflows/clang-tidy-review.yml @@ -15,15 +15,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout PR branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install LLVM and Clang - uses: KyleMayes/install-llvm-action@v1 + uses: KyleMayes/install-llvm-action@v2 with: - version: "12.0.0" + version: "18.1.3" - name: Run clang-tidy - uses: ZedThree/clang-tidy-review@v0.13.2 + uses: ZedThree/clang-tidy-review@v0.18.0 id: review with: build_dir: build @@ -41,4 +41,4 @@ jobs: -DCMAKE_EXPORT_COMPILE_COMMANDS=On - name: Upload artifacts - uses: ZedThree/clang-tidy-review/upload@v0.13.1 + uses: ZedThree/clang-tidy-review/upload@v0.18.0 diff --git a/.github/workflows/postci.yml b/.github/workflows/postci.yml index 154bd4711..0b4162d8c 100644 --- a/.github/workflows/postci.yml +++ b/.github/workflows/postci.yml @@ -12,7 +12,7 @@ jobs: ${{ github.event.workflow_run.event == 'pull_request'}} steps: - name: 'Download artifact' - uses: actions/github-script@v3.1.0 + uses: actions/github-script@v7.0.1 with: script: | var artifacts = await github.actions.listWorkflowRunArtifacts({ @@ -38,7 +38,7 @@ jobs: echo "PR_NUMBER=`cat ./NR`" >> $GITHUB_ENV echo "PR_REPO=`cat ./REPO`" >> $GITHUB_ENV - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0