Skip to content

workflows/release-binaries: Enable builds on Linux/AArch64 #120786

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

Merged
merged 24 commits into from
Jan 26, 2025

Conversation

tstellar
Copy link
Collaborator

No description provided.

@tstellar
Copy link
Collaborator Author

This depends on #117111

Comment on lines 24 to 34
- name: Install Ninja
# This doesn't seem to work on Ubuntu any more, so just use apt-get
if: runner.os != 'Linux'
uses: llvm/actions/install-ninja@22e9f909d35b50bd1181709564bfe816eaeaae81 # main

- name: Install Ninja (Linux)
if: runner.os == 'Linux'
shell: bash
run: |
sudo apt-get update
sudo apt-get -y install ninja-build
Copy link
Member

Choose a reason for hiding this comment

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

It seems like this should work still, no?

Suggested change
- name: Install Ninja
# This doesn't seem to work on Ubuntu any more, so just use apt-get
if: runner.os != 'Linux'
uses: llvm/actions/install-ninja@22e9f909d35b50bd1181709564bfe816eaeaae81 # main
- name: Install Ninja (Linux)
if: runner.os == 'Linux'
shell: bash
run: |
sudo apt-get update
sudo apt-get -y install ninja-build
- name: Update apt
# Needed for the install-ninja action to work on Ubuntu for some reason.
if: runner.os == 'Linux'
run: sudo apt-get update
- name: Install Ninja
uses: llvm/actions/install-ninja@22e9f909d35b50bd1181709564bfe816eaeaae81 # main

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is working now, so I dropped this part of the change.

echo ccache=sccache >> $GITHUB_OUTPUT
fi

if [ "${{ runner.os }}" = "Linux" ]; then
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if [ "${{ runner.os }}" = "Linux" ]; then
if [ "$RUNNER_OS" = "Linux" ]; then

We don't need workflow interpolation here, and it's better to avoid it if we don't need it: https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable

In general I'd prefer to remove all workflow interpolation (even in instances where it is safe) to make auditing easier, but that would require plenty of changes across all workflows.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here is a patch to clean up the file: #120860

I'll update this patch with your suggestions too.

if: github.repository == 'llvm/llvm-project'
runs-on: ${{ inputs.runs-on }}
if: >-
github.repository == 'llvm/llvm-project'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
github.repository == 'llvm/llvm-project'
github.repository_owner == 'llvm'

Might make it easier to reuse workflow snippets in other org repos, but this is a very mild preference.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've put this change in a separate PR: #123797

@keith
Copy link
Member

keith commented Jan 22, 2025

would be awesome to land this before 20.x 🙏🏻

@tstellar
Copy link
Collaborator Author

@carlocab This is working now and ready for review again.

Copy link
Member

@carlocab carlocab left a comment

Choose a reason for hiding this comment

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

Might be worth using GitHub Actions runners now that they're publicly available.

@tstellar
Copy link
Collaborator Author

Might be worth using GitHub Actions runners now that they're publicly available.

They're still too slow for the release builds.

@tstellar tstellar changed the title Depot runners arm workflows/release-binaries: Enable builds on Linux/AArch64 Jan 26, 2025
@tstellar tstellar merged commit 6bb70a9 into llvm:main Jan 26, 2025
21 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants