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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cli-release workflow #1078

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/cli-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: cli-release

on:
workflow_dispatch:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is so that I can run the action manually against PR branches, but I don't believe the final action will have this trigger since we need a tagged release to upload artifacts to.

release:
types: [published]

env:
CARGO_TERM_COLOR: always

jobs:
build_rust:
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you planning on building binaries for both arm64 and amd64? (I don't feel strongly that you have to, just making a note).

If so, consider that macos-latest runs on arm64, where macos-13 runs on amd64. Can consider targeting both macos-latest and macos-13 to get both architectures for free.

Sadly it doesn't look as simple for arm64 Linux, there doesn't appear to be runners available, so would need to either cross-compile or rent an arm64 VM from GCP. Maybe we can just skip arm64 Linux... client-side usage of arm64 Linux seems to be uncommon outside of Raspberry Pi's.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm optimistic that we can cross compile from x86_64 -> aarch64 on ubuntu-latest and the other way around on macos-latest, so all we'll need is to rustup add target <blah> (or moral equivalent in the dtolnay toolchain action). If that doesn't work, I'll look into the cross action on the marketplace. That'll all be in the next PR. Right now I'm stuck getting GH to run actions at all...

runs-on: matrix.os
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: build
run: cargo build --package divviup-cli --profile release
Loading