From 6670f1dfbda1d80f6bd00252d6e8549db5698dea Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 19 Nov 2019 22:40:48 +0000 Subject: [PATCH 1/4] GitHub Actions: Only run tests on pushes to release/** branches This prevents the tests from being run twice on pull requests since pull requests first require creating a new branch (which was also triggering CI runs). --- .github/workflows/commit-tests.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/commit-tests.yml b/.github/workflows/commit-tests.yml index c2aea1dc8ec50..3ece749fea720 100644 --- a/.github/workflows/commit-tests.yml +++ b/.github/workflows/commit-tests.yml @@ -3,7 +3,11 @@ name: Commit Tests env: release_major: 9 -on: [push, pull_request] +on: + push: + branches: + - 'releases/**' + pull_request: jobs: build_llvm: From a9a4a8e4a2d336a9aaaa03e34b3c153b4753e306 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 20 Nov 2019 00:05:52 +0000 Subject: [PATCH 2/4] GitHub Actions: Pull source code from current repo when dumping the ABI This makes it possible for this step to work during pull requests. --- .github/workflows/commit-tests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/commit-tests.yml b/.github/workflows/commit-tests.yml index 3ece749fea720..1c2c06ac82741 100644 --- a/.github/workflows/commit-tests.yml +++ b/.github/workflows/commit-tests.yml @@ -48,17 +48,20 @@ jobs: # FIXME: Referencing the env context does not work here # ref: llvmorg-${{ env.release_major }}.0.0 ref: llvmorg-9.0.0 + repo: llvm/llvm-project - name: build-latest ref: ${{ github.sha }} + repo: ${{ env.GITHUB_REPOSITORY }} steps: - name: Install Ninja uses: llvm/actions/install-ninja@master - name: Install abi-compliance-checker run: sudo apt-get install abi-dumper - name: Download source code - uses: llvm/actions/get-llvm-project-src@master + uses: tstellar/actions/get-llvm-project-src@src-repo with: ref: ${{ matrix.ref }} + repo: ${{ matrix.repo }} - name: Configure run: | mkdir build From 37aef389804ca0fe8dc3d796fb2bdca01772582d Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 20 Nov 2019 00:23:50 +0000 Subject: [PATCH 3/4] commit-tests.yml: Fix indentation --- .github/workflows/commit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/commit-tests.yml b/.github/workflows/commit-tests.yml index 1c2c06ac82741..7d0b56a287cfc 100644 --- a/.github/workflows/commit-tests.yml +++ b/.github/workflows/commit-tests.yml @@ -7,7 +7,7 @@ on: push: branches: - 'releases/**' - pull_request: + pull_request: jobs: build_llvm: From e2a8b59d9a333d9f49b0a1eeb07abb57c48c8aad Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 20 Nov 2019 00:26:01 +0000 Subject: [PATCH 4/4] commit-tests.yml: Get repository from github context --- .github/workflows/commit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/commit-tests.yml b/.github/workflows/commit-tests.yml index 7d0b56a287cfc..cab2719c859c7 100644 --- a/.github/workflows/commit-tests.yml +++ b/.github/workflows/commit-tests.yml @@ -51,7 +51,7 @@ jobs: repo: llvm/llvm-project - name: build-latest ref: ${{ github.sha }} - repo: ${{ env.GITHUB_REPOSITORY }} + repo: ${{ github.repository }} steps: - name: Install Ninja uses: llvm/actions/install-ninja@master