-
Notifications
You must be signed in to change notification settings - Fork 78
Only run workflow on develop branch for arm64 arch #1132
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only run workflow on develop branch for arm64 arch #1132
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR ensures ARM64 build jobs only run on the develop
branch and extends branch checks to pull request contexts.
- Added a
matrix-prep
job that outputs an ARM64 matrix only when targetingdevelop
. - Updated the build job to depend on
matrix-prep
and dynamically include ARM64 config. - Enhanced ROS distro detection to consider both
github.ref
andgithub.base_ref
for branch-based flags.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
.github/workflows/linux-build-and-test.yml | Introduced matrix-prep job and wired dynamic ARM64 matrix into the build strategy. |
.github/workflows/identify-ros-distro.yml | Adjusted environment variables to check both github.ref and github.base_ref for branches. |
Comments suppressed due to low confidence (1)
.github/workflows/linux-build-and-test.yml:41
- Using
runs-on: ubuntu-${{ matrix.ubuntu-version }}
may resolve to invalid runner labels likeubuntu-24.04-arm
, which are not supported by GitHub-hosted runners. Consider using a valid runner label (e.g.,ubuntu-latest
) and configuring architecture separately or setting up a self-hosted runner.
runs-on: ubuntu-${{ matrix.ubuntu-version }}
steps: | ||
- id: set-matrix | ||
run: | | ||
if [[ ${{ contains(github.base_ref, 'develop') || contains(github.ref, 'develop') }} ]]; then |
Copilot
AI
May 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bash conditional [[ ${{ ... }} ]]
always succeeds since both 'true' and 'false' are non-empty strings. Compare the expression explicitly to 'true' (e.g., if [ "${{ contains(...) }}" = 'true' ]; then
) or use if ${{ contains(...) }}; then
to make the branch logic correct.
if [[ ${{ contains(github.base_ref, 'develop') || contains(github.ref, 'develop') }} ]]; then | |
if [ "${{ contains(github.base_ref, 'develop') || contains(github.ref, 'develop') }}" = 'true' ]; then |
Copilot uses AI. Check for mistakes.
This PR ensures ARM64 build jobs only run on the `develop` branch and extends branch checks to pull request contexts. - Added a `matrix-prep` job that outputs an ARM64 matrix only when targeting `develop`. - Updated the build job to depend on `matrix-prep` and dynamically include ARM64 config. - Enhanced ROS distro detection to consider both `github.ref` and `github.base_ref` for branch-based flags. Fix: #1131
This PR ensures ARM64 build jobs only run on the `develop` branch and extends branch checks to pull request contexts. - Added a `matrix-prep` job that outputs an ARM64 matrix only when targeting `develop`. - Updated the build job to depend on `matrix-prep` and dynamically include ARM64 config. - Enhanced ROS distro detection to consider both `github.ref` and `github.base_ref` for branch-based flags. Fix: #1131
This PR ensures ARM64 build jobs only run on the `develop` branch and extends branch checks to pull request contexts. - Added a `matrix-prep` job that outputs an ARM64 matrix only when targeting `develop`. - Updated the build job to depend on `matrix-prep` and dynamically include ARM64 config. - Enhanced ROS distro detection to consider both `github.ref` and `github.base_ref` for branch-based flags. Fix: #1131
This PR ensures ARM64 build jobs only run on the
develop
branch and extends branch checks to pull request contexts.matrix-prep
job that outputs an ARM64 matrix only when targetingdevelop
.matrix-prep
and dynamically include ARM64 config.github.ref
andgithub.base_ref
for branch-based flags.Fix: #1131