From c205e0aefef7fd5b3b4488ccdc3f9037037e086b Mon Sep 17 00:00:00 2001 From: Erik Heeren Date: Thu, 5 Oct 2023 10:26:51 +0200 Subject: [PATCH] Run github workflows on merge queues (#2568) * Run github workflows on merge queues * External CI only on labeled PRs, not on merge queues --- .github/workflows/coverage.yml | 3 ++- .github/workflows/docs.yml | 1 + .github/workflows/external.yml | 13 ++++++------- .github/workflows/formatting.yml | 7 ++++--- .github/workflows/neuron-ci.yml | 11 ++++++----- .github/workflows/windows.yml | 11 ++++++----- 6 files changed, 25 insertions(+), 21 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 587fda37e2..ae15e0428b 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -5,6 +5,7 @@ concurrency: cancel-in-progress: true on: + merge_group: push: branches: - master @@ -65,7 +66,7 @@ jobs: ./configure --with-python-sys-prefix --prefix=$MUSIC_INSTALL_DIR --disable-anysource make -j install deactivate - working-directory: ${{runner.temp}} + working-directory: ${{runner.temp}} - name: Setup Xvfb run: | diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 962add64dc..d4206d7345 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -5,6 +5,7 @@ concurrency: cancel-in-progress: true on: + merge_group: push: branches: - master diff --git a/.github/workflows/external.yml b/.github/workflows/external.yml index 9b877be67b..088168c161 100644 --- a/.github/workflows/external.yml +++ b/.github/workflows/external.yml @@ -1,6 +1,6 @@ name: External CIs -concurrency: +concurrency: group: ${{ github.workflow }}#${{ github.ref }} cancel-in-progress: true @@ -10,7 +10,7 @@ on: env: PR_URL: ${{ github.event.pull_request.html_url }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - + jobs: get-last-azure-url: runs-on: ubuntu-latest @@ -19,7 +19,7 @@ jobs: azure_drop_url: ${{ steps.drop.outputs.azure_drop_url }} pr_azure_sha: ${{ steps.drop.outputs.pr_azure_sha }} steps: - - id: drop + - id: drop run: | # use jq to get the last Azure drop URL from the PR and the SHA1 from the same body export pr_json=$(gh pr view $PR_URL --json comments -q 'last(.comments[] .body | capture(".*(?[0-9a-f]{40}).*?(?https://dev.azure.com/neuronsimulator/.*=zip)"))') @@ -32,7 +32,7 @@ jobs: export pr_azure_sha=$(echo $pr_json | jq -r .pr_azure_sha) echo azure_drop_url=$azure_drop_url >> $GITHUB_OUTPUT echo pr_azure_sha=$pr_azure_sha >> $GITHUB_OUTPUT - + - id: remove-label if: always() run: | @@ -47,7 +47,7 @@ jobs: env: pr_azure_sha: ${{ steps.drop.outputs.pr_azure_sha }} azure_drop_url: ${{ steps.drop.outputs.azure_drop_url }} - + nrn-modeldb-ci: needs: get-last-azure-url uses: neuronsimulator/nrn-modeldb-ci/.github/workflows/nrn-modeldb-ci.yaml@master @@ -56,7 +56,7 @@ jobs: neuron_v2: neuron-nightly pr-update: - needs: + needs: - nrn-modeldb-ci - get-last-azure-url runs-on: ubuntu-latest @@ -68,4 +68,3 @@ jobs: env: ARTIFACTS_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} pr_azure_sha: ${{ needs.get-last-azure-url.outputs.pr_azure_sha }} - diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml index 1da74bbee4..1b490ed4b0 100644 --- a/.github/workflows/formatting.yml +++ b/.github/workflows/formatting.yml @@ -1,12 +1,13 @@ name: Check formatting -concurrency: +concurrency: group: ${{ github.workflow }}#${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: true on: + merge_group: push: - branches: + branches: - release/** pull_request: branches: diff --git a/.github/workflows/neuron-ci.yml b/.github/workflows/neuron-ci.yml index 2fba4088ad..ed3ed7ef72 100644 --- a/.github/workflows/neuron-ci.yml +++ b/.github/workflows/neuron-ci.yml @@ -1,12 +1,13 @@ name: NEURON CI -concurrency: +concurrency: group: ${{ github.workflow }}#${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: true on: + merge_group: push: - branches: + branches: # If nothing else, this is important for the ccache logic below... - master - release/** @@ -169,7 +170,7 @@ jobs: ./configure --with-python-sys-prefix --prefix=$MUSIC_INSTALL_DIR --disable-anysource make -j install deactivate - working-directory: ${{runner.temp}} + working-directory: ${{runner.temp}} - name: Register gcc problem matcher if: ${{matrix.config.flag_warnings == 'ON'}} @@ -195,7 +196,7 @@ jobs: repository: actions/cache ref: v3 path: tmp/actions/cache - + - name: Make actions/cache@v3 run even on failure run: | sed -i'.bak' -e '/ post-if: /d' tmp/actions/cache/action.yml diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index f3d243e2ba..fd9dcc0771 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -1,10 +1,11 @@ name: Windows Installer -concurrency: +concurrency: group: ${{ github.workflow }}#${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: true on: + merge_group: workflow_call: inputs: tag: @@ -13,7 +14,7 @@ on: required: true type: string push: - branches: + branches: - master - release/** pull_request: @@ -54,12 +55,12 @@ jobs: .\nrn\ci\win_download_deps.cmd shell: powershell working-directory: ${{runner.workspace}} - + - name: Install Dependencies run: .\nrn\ci\win_install_deps.cmd shell: powershell working-directory: ${{runner.workspace}} - + - name: Build and Create Installer run: | rm.exe C:\WINDOWS\system32\bash.EXE