Skip to content

Commit

Permalink
Run github workflows on merge queues (#2568)
Browse files Browse the repository at this point in the history
* Run github workflows on merge queues
* External CI only on labeled PRs, not on merge queues
  • Loading branch information
heerener authored Oct 5, 2023
1 parent 0a3408f commit c205e0a
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ concurrency:
cancel-in-progress: true

on:
merge_group:
push:
branches:
- master
Expand Down Expand Up @@ -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: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ concurrency:
cancel-in-progress: true

on:
merge_group:
push:
branches:
- master
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/external.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: External CIs

concurrency:
concurrency:
group: ${{ github.workflow }}#${{ github.ref }}
cancel-in-progress: true

Expand All @@ -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
Expand All @@ -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(".*(?<pr_azure_sha>[0-9a-f]{40}).*?(?<azure_drop_url>https://dev.azure.com/neuronsimulator/.*=zip)"))')
Expand All @@ -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: |
Expand All @@ -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
Expand All @@ -56,7 +56,7 @@ jobs:
neuron_v2: neuron-nightly

pr-update:
needs:
needs:
- nrn-modeldb-ci
- get-last-azure-url
runs-on: ubuntu-latest
Expand All @@ -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 }}
7 changes: 4 additions & 3 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/neuron-ci.yml
Original file line number Diff line number Diff line change
@@ -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/**
Expand Down Expand Up @@ -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'}}
Expand All @@ -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
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -13,7 +14,7 @@ on:
required: true
type: string
push:
branches:
branches:
- master
- release/**
pull_request:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c205e0a

Please sign in to comment.