CI: use mlugg/setup-zig #1215

Open
mlugg wants to merge 1 commit from mlugg/ci-mlugg-action into main
mlugg commented 2024-06-09 02:21:21 +00:00 (Migrated from github.com)

This doesn't need to be merged if you'd prefer to stick with the current logic; I largely just wanted to see if it works properly. Nonetheless, I think this represents an improvement to the CI scripts.

This PR begins using the https://github.com/mlugg/setup-zig action to install Zig in the CI workflow. This has the following advantages:

  • No more target-specific scripts; setting up Zig is 4 simple lines.
  • The tarball's minisig is verified, so this will flag up issues if the Mach mirror ever starts doing anything weird.
  • The Zig version is specified in Mach lingo, i.e. 2024.5.0-mach rather than zig-0.13.0-dev.351+64ef45eb0.
    • This could alternatively say mach-latest, but I figured this makes more sense for handling the upgrade process when new versions are nominated.
  • The global Zig cache is automatically preserved across runs, avoiding redundant work. In particular, this will avoid doing redundant work rebuilding C dependencies on every commit.
  • By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right.
This doesn't need to be merged if you'd prefer to stick with the current logic; I largely just wanted to see if it works properly. Nonetheless, I think this represents an improvement to the CI scripts. This PR begins using the https://github.com/mlugg/setup-zig action to install Zig in the CI workflow. This has the following advantages: * No more target-specific scripts; setting up Zig is 4 simple lines. * The tarball's minisig is verified, so this will flag up issues if the Mach mirror ever starts doing anything weird. * The Zig version is specified in Mach lingo, i.e. `2024.5.0-mach` rather than `zig-0.13.0-dev.351+64ef45eb0`. * This could alternatively say `mach-latest`, but I figured this makes more sense for handling the upgrade process when new versions are nominated. * The global Zig cache is automatically preserved across runs, avoiding redundant work. In particular, this will avoid doing redundant work rebuilding C dependencies on every commit. - [x] By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right.
This pull request has changes conflicting with the target branch.
  • .github/workflows/ci.yml
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin mlugg/ci-mlugg-action:mlugg/ci-mlugg-action
git switch mlugg/ci-mlugg-action

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff mlugg/ci-mlugg-action
git switch mlugg/ci-mlugg-action
git rebase main
git switch main
git merge --ff-only mlugg/ci-mlugg-action
git switch mlugg/ci-mlugg-action
git rebase main
git switch main
git merge --no-ff mlugg/ci-mlugg-action
git switch main
git merge --squash mlugg/ci-mlugg-action
git switch main
git merge --ff-only mlugg/ci-mlugg-action
git switch main
git merge mlugg/ci-mlugg-action
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hexops/mach!1215
No description provided.