Skip to content

Commit

Permalink
Add linux arm64 support.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Dec 11, 2023
1 parent 41478b7 commit 06ef0ee
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 5 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
schedule:
- cron: "0 0 * * *"
# Uncomment to test in PRs (its safe)
# pull_request:
pull_request:

permissions:
contents: write
Expand All @@ -21,6 +21,14 @@ jobs:
fail-fast: false
matrix:
include:
- target: aarch64-unknown-linux-gnu
host: buildjet-4vcpu-ubuntu-2204-arm
ext: ""

- target: aarch64-unknown-linux-musl
host: buildjet-4vcpu-ubuntu-2204-arm
ext: ""

- target: x86_64-unknown-linux-gnu
host: ubuntu-20.04
ext: ""
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ jobs:
with:
submodules: recursive
- name: Install cargo-dist
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.5.0/cargo-dist-installer.sh | sh"
# we specify bash to get pipefail; it guards against the `curl` command
# failing. otherwise `sh` won't catch that `curl` returned non-0
shell: bash
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.6.0-prerelease.2/cargo-dist-installer.sh | sh"
# sure would be cool if github gave us proper conditionals...
# so here's a doubly-nested ternary-via-truthiness to try to provide the best possible
# functionality based on whether this is a pull_request, and whether it's from a fork.
Expand Down Expand Up @@ -156,7 +159,7 @@ jobs:
with:
submodules: recursive
- name: Install cargo-dist
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.5.0/cargo-dist-installer.sh | sh"
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.6.0-prerelease.2/cargo-dist-installer.sh | sh"
# Get all the local artifacts for the global tasks to use (for e.g. checksums)
- name: Fetch local artifacts
uses: actions/download-artifact@v3
Expand Down Expand Up @@ -200,7 +203,7 @@ jobs:
with:
submodules: recursive
- name: Install cargo-dist
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.5.0/cargo-dist-installer.sh | sh"
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.6.0-prerelease.2/cargo-dist-installer.sh | sh"
# Fetch artifacts from scratch-storage
- name: Fetch artifacts
uses: actions/download-artifact@v3
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
- [Rust](https://github.com/moonrepo/rust-plugin/blob/master/CHANGELOG.md)
- [TOML schema](https://github.com/moonrepo/schema-plugin/blob/master/CHANGELOG.md)

## Unreleased

#### 🚀 Updates

- Added Linux arm64 gnu and musl support (`aarch64-unknown-linux-gnu` and `aarch64-unknown-linux-musl`).

## 0.24.2

#### 🚀 Updates
Expand Down
8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,16 @@ tracing = "0.1.40"
# Config for 'cargo dist'
[workspace.metadata.dist]
# The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax)
cargo-dist-version = "0.5.0"
cargo-dist-version = "0.6.0-prerelease.2"
# CI backends to support
ci = ["github"]
# Target platforms to build apps for (Rust target-triple syntax)
targets = [
"aarch64-unknown-linux-gnu",
"x86_64-unknown-linux-gnu",
"aarch64-apple-darwin",
"x86_64-apple-darwin",
"aarch64-unknown-linux-musl",
"x86_64-unknown-linux-musl",
"x86_64-pc-windows-msvc",
]
Expand All @@ -63,6 +65,10 @@ pr-run-mode = "plan"
# Skip checking whether the specified configuration files are up to date
allow-dirty = ["ci"]

[workspace.metadata.dist.custom-github-runners]
aarch64-unknown-linux-gnu = "buildjet-4vcpu-ubuntu-2204-arm"
aarch64-unknown-linux-musl = "buildjet-4vcpu-ubuntu-2204-arm"

[profile.dist]
inherits = "release"
lto = "thin"

0 comments on commit 06ef0ee

Please sign in to comment.