Skip to content

chore: migrate from Cirrus CI to GHA#5058

Merged
JohnTitor merged 1 commit intorust-lang:mainfrom
JohnTitor:retire-cirrus
Apr 17, 2026
Merged

chore: migrate from Cirrus CI to GHA#5058
JohnTitor merged 1 commit intorust-lang:mainfrom
JohnTitor:retire-cirrus

Conversation

@JohnTitor
Copy link
Copy Markdown
Member

@JohnTitor JohnTitor commented Apr 14, 2026

Description

Fix #5052

This migrates FreeBSD CI from Cirrus CI to GitHub Actions to address Cirrus CI shutdown.
The new GHA matrix should have the same workflow as Cirrus as possible.

Sources

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

@rustbot rustbot added the A-CI Area: CI-related items label Apr 14, 2026
@JohnTitor
Copy link
Copy Markdown
Member Author

NetBSD CDN is down but it's unrelated to this change, ready for review.

@JohnTitor JohnTitor marked this pull request as ready for review April 14, 2026 11:49
@JohnTitor JohnTitor requested a review from tgross35 April 14, 2026 11:50
Copy link
Copy Markdown
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

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

Looks great to me, but maybe hold off for a day in case @asomers gets the chance to take a look.

Also maybe update the commit/PR description to say it's migrating to GHA? From the quick read I assumed you were just deleting the job :)

View changes since this review

Comment thread .github/workflows/ci.yaml Outdated
Comment thread .github/workflows/ci.yaml Outdated
Comment thread .github/workflows/ci.yaml Outdated
mem: 4096
copyback: false
prepare: |
set -eux
Copy link
Copy Markdown
Contributor

@asomers asomers Apr 14, 2026

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it's good practice to always set this in scripts. Expected nullable variables are rare enough to have :- on a case-by-case basis.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I guess I copied it from somewhere while referencing a prior-art PR 🙇
Addressed in 8c3f4fe

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh I was saying the other way around, -u should always be included. Not that it's super useful here since the only thing to catch is unset $HOME (which is actually a problem we've historically hit with some runners).

@JohnTitor JohnTitor changed the title chore: retire Cirrus CI chore: migrate from Cirrus CI to GHA Apr 15, 2026
@JohnTitor
Copy link
Copy Markdown
Member Author

Also maybe update the commit/PR description to say it's migrating to GHA? From the quick read I assumed you were just deleting the job :)

Renamed, it was too cool :P

Comment thread .github/workflows/ci.yaml Outdated
rustup target add i686-unknown-freebsd
fi
run: |
set -x
Copy link
Copy Markdown
Contributor

@asomers asomers Apr 15, 2026

Choose a reason for hiding this comment

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

I think you still want -e here, or else the job will be considered passing even if the first run.sh invocation fails.

Suggested change
set -x
set -xe

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Should I apply it to NetBSD scripts? I guess it benefits on it as well.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should I apply it to NetBSD scripts? I guess it benefits on it as well.

Yes, please do. Or, just remove the set -x, because the default is equivalent to -e.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Addressed, thanks!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, please do. Or, just remove the set -x, because the default is equivalent to -e.

Why would this make a difference? set only changes the specified options and doesn't override others, unless GH is doing some inspection here.

Not that I think it's a bad thing to be explicit.

Comment thread .github/workflows/ci.yaml Outdated
Comment on lines +304 to +306
if [ "${{ matrix.target }}" = "i686-unknown-freebsd" ]; then
rustup target add i686-unknown-freebsd
fi
Copy link
Copy Markdown
Contributor

@xtqqczze xtqqczze Apr 15, 2026

Choose a reason for hiding this comment

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

Suggested change
if [ "${{ matrix.target }}" = "i686-unknown-freebsd" ]; then
rustup target add i686-unknown-freebsd
fi
rustup target add ${{ matrix.target }}

View changes since the review

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

On others the default host toolchain works. But also no harm since rustup does the same check, 🤷‍♂️

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's less code, and would make things future-proof in case targets like aarch64-unknown-freebsd are added to the job matrix later.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The funny thing about i686-unknown-freebsd is that we don't run that check in an i686 VM. We run it in an x86_64 VM, using 32-bit compat. So the rustup target add really is needed.

Copy link
Copy Markdown
Contributor

@xtqqczze xtqqczze Apr 16, 2026

Choose a reason for hiding this comment

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

Right, so rustup target add wouldn't be needed for aarch64-unknown-freebsd; i686-unknown-freebsd really is a special case.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

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

LGTM with or without @xtqqczze's suggestion, thank you for taking care of this!

View changes since this review

@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Apr 16, 2026
Comment thread .github/workflows/ci.yaml Outdated
steps:
- uses: actions/checkout@v6
- name: Test on FreeBSD
uses: vmactions/solaris-vm@v1.3.2
Copy link
Copy Markdown
Contributor

@asomers asomers Apr 16, 2026

Choose a reason for hiding this comment

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

Oops, looks like a copy/paste error.

Suggested change
uses: vmactions/solaris-vm@v1.3.2
uses: vmactions/freebsd-vm@v1

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ah, good catch, fixed!

@JohnTitor JohnTitor added this pull request to the merge queue Apr 17, 2026
Merged via the queue into rust-lang:main with commit 088a284 Apr 17, 2026
204 of 231 checks passed
@JohnTitor JohnTitor deleted the retire-cirrus branch April 17, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: CI-related items stable-nominated This PR should be considered for cherry-pick to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CirrusCI will shut down on 2026-06-01

5 participants