Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix potential github action smells #8836

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,11 @@ permissions:
jobs:
build-graalvm-linux:
name: /${{ matrix.env.PRIMARY }} ${{ matrix.env.GATE_TAGS }} JDK${{ matrix.env.JDK_VERSION }}
runs-on: ubuntu-20.04
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
fniephaus marked this conversation as resolved.
Show resolved Hide resolved
include:
# /compiler
- env:
Expand Down Expand Up @@ -225,6 +226,8 @@ jobs:
build-graalvm-windows:
name: /substratevm on Windows
runs-on: windows-2022
matrix:
os: [windows-2022, windows-2019]
fniephaus marked this conversation as resolved.
Show resolved Hide resolved
env:
MX_PYTHON: 'python'
steps:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/micronaut.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ env:
permissions:
contents: read # to fetch code (actions/checkout)

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

jobs:
build-graalvm-and-micronaut:
name: Native Tests
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/quarkus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ on:
- cron: '0 3 * * *'
workflow_dispatch:

concurrency:
group: ${{github.workflow}} - ${{github.ref}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why - ${{github.ref}} here and not in micronaut.yml? There are also other workflows that may need a concurrency rule such as spring.yml.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added the ${{github.ref}} because it can also be triggered by pull requests. Therefore, I was assuming that if there are two pr's running this workflow, one should not cancel the other.
If this is not the case, the ${{github.ref}} can be removed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In main.yml, we've got:

group: "workflow = ${{ github.workflow }}, ref = ${{ github.event.ref }}, pr = ${{ github.event.pull_request.id }}"

Any reason not to use this consistently? My point was also about being consistent across all other workflows (e.g., micronaut.yml and spring.yml)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh I see, sorry for the misunderstanding.
I've changed it so that it is consistent with the main.yml. Same for the reachabilit-metadata.yml, spring.yml and micronaut.yml.
I did not change the cdt-inspect.yml because this is only triggered through a schedule.

cancel-in-progress: true

env:
COMMON_MAVEN_ARGS: "-e -B --settings .github/mvn-settings.xml --fail-at-end"
DB_NAME: hibernate_orm_test
Expand Down Expand Up @@ -180,7 +184,7 @@ jobs:
run: find . -type d -name '*-reports' -o -wholename '*/build/reports/tests/functionalTest' | tar -czf test-reports.tgz -T -
- name: Upload failure Archive (if maven failed)
uses: actions/upload-artifact@v4
if: failure()
if: failure() && github.repository == 'oracle/graal'
with:
name: test-reports-native-${{matrix.category}}
path: 'test-reports.tgz'