Skip to content

Commit

Permalink
Merge pull request #638 from axodotdev/test-arm
Browse files Browse the repository at this point in the history
feat: add aarch64 custom runner and builds
  • Loading branch information
Gankra authored Dec 11, 2023
2 parents 8ce9dde + 85dfc31 commit 9e6b741
Show file tree
Hide file tree
Showing 6 changed files with 128 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
# 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.1/cargo-dist-installer.sh | sh"
run: "cargo install --git https://github.com/axodotdev/cargo-dist/ --branch=main cargo-dist"
# 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 @@ -159,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.6.0-prerelease.1/cargo-dist-installer.sh | sh"
run: "cargo install --git https://github.com/axodotdev/cargo-dist/ --branch=main cargo-dist"
# 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 @@ -203,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.6.0-prerelease.1/cargo-dist-installer.sh | sh"
run: "cargo install --git https://github.com/axodotdev/cargo-dist/ --branch=main cargo-dist"
# Fetch artifacts from scratch-storage
- name: Fetch artifacts
uses: actions/download-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ publish = false
# Config for 'cargo dist'
[workspace.metadata.dist]
# The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax)
cargo-dist-version = "0.6.0-prerelease.1"
cargo-dist-version = "0.6.0-github-main"
# CI backends to support
ci = ["github"]
# The installers to generate for each app
Expand All @@ -24,14 +24,18 @@ tap = "axodotdev/homebrew-tap"
# Publish jobs to run in CI
publish-jobs = ["homebrew"]
# Target platforms to build apps for (Rust target-triple syntax)
targets = ["x86_64-unknown-linux-gnu", "aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-musl", "x86_64-pc-windows-msvc"]
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"]
# Publish jobs to run in CI
pr-run-mode = "plan"

[[workspace.metadata.dist.extra-artifacts]]
artifacts = ["dist-manifest-schema.json"]
build = ["cargo", "run", "--", "dist", "manifest-schema", "--output=dist-manifest-schema.json"]

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

# The profile that 'cargo dist' will build with
[profile.dist]
inherits = "release"
Expand Down
2 changes: 1 addition & 1 deletion cargo-dist-schema/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "cargo-dist-schema"
description = "Schema information for cargo-dist's dist-manifest.json"
version = "0.6.0-prerelease.2"
version = "0.6.0-prerelease.3"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/axodotdev/cargo-dist"
Expand Down
4 changes: 2 additions & 2 deletions cargo-dist/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "cargo-dist"
description = "Shippable application packaging for Rust"
version = "0.6.0-prerelease.2"
version = "0.6.0-prerelease.3"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/axodotdev/cargo-dist"
Expand Down Expand Up @@ -31,7 +31,7 @@ axocli = { version = "0.1.1", optional = true }

# Features used by the cli and library
axotag = "0.1.0"
cargo-dist-schema = { version = "=0.6.0-prerelease.2", path = "../cargo-dist-schema" }
cargo-dist-schema = { version = "=0.6.0-prerelease.3", path = "../cargo-dist-schema" }

axoasset = { version = "0.6.0", features = ["json-serde", "toml-serde", "toml-edit", "compression"] }
axoproject = { version = "0.6.0", default-features = false, features = ["cargo-projects", "generic-projects"] }
Expand Down
119 changes: 114 additions & 5 deletions cargo-dist/tests/snapshots/manifest.snap
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ stdout:
"cargo-dist.rb",
"cargo-dist-aarch64-apple-darwin.tar.xz",
"cargo-dist-aarch64-apple-darwin.tar.xz.sha256",
"cargo-dist-aarch64-unknown-linux-gnu.tar.xz",
"cargo-dist-aarch64-unknown-linux-gnu.tar.xz.sha256",
"cargo-dist-aarch64-unknown-linux-musl.tar.xz",
"cargo-dist-aarch64-unknown-linux-musl.tar.xz.sha256",
"cargo-dist-x86_64-apple-darwin.tar.xz",
"cargo-dist-x86_64-apple-darwin.tar.xz.sha256",
"cargo-dist-x86_64-pc-windows-msvc.zip",
Expand Down Expand Up @@ -85,6 +89,90 @@ stdout:
"aarch64-apple-darwin"
]
},
"cargo-dist-aarch64-unknown-linux-gnu.tar.xz": {
"name": "cargo-dist-aarch64-unknown-linux-gnu.tar.xz",
"kind": "executable-zip",
"target_triples": [
"aarch64-unknown-linux-gnu"
],
"assets": [
{
"name": "CHANGELOG.md",
"path": "CHANGELOG.md",
"kind": "changelog"
},
{
"name": "LICENSE-APACHE",
"path": "LICENSE-APACHE",
"kind": "license"
},
{
"name": "LICENSE-MIT",
"path": "LICENSE-MIT",
"kind": "license"
},
{
"name": "README.md",
"path": "README.md",
"kind": "readme"
},
{
"name": "cargo-dist",
"path": "cargo-dist",
"kind": "executable"
}
],
"checksum": "cargo-dist-aarch64-unknown-linux-gnu.tar.xz.sha256"
},
"cargo-dist-aarch64-unknown-linux-gnu.tar.xz.sha256": {
"name": "cargo-dist-aarch64-unknown-linux-gnu.tar.xz.sha256",
"kind": "checksum",
"target_triples": [
"aarch64-unknown-linux-gnu"
]
},
"cargo-dist-aarch64-unknown-linux-musl.tar.xz": {
"name": "cargo-dist-aarch64-unknown-linux-musl.tar.xz",
"kind": "executable-zip",
"target_triples": [
"aarch64-unknown-linux-musl"
],
"assets": [
{
"name": "CHANGELOG.md",
"path": "CHANGELOG.md",
"kind": "changelog"
},
{
"name": "LICENSE-APACHE",
"path": "LICENSE-APACHE",
"kind": "license"
},
{
"name": "LICENSE-MIT",
"path": "LICENSE-MIT",
"kind": "license"
},
{
"name": "README.md",
"path": "README.md",
"kind": "readme"
},
{
"name": "cargo-dist",
"path": "cargo-dist",
"kind": "executable"
}
],
"checksum": "cargo-dist-aarch64-unknown-linux-musl.tar.xz.sha256"
},
"cargo-dist-aarch64-unknown-linux-musl.tar.xz.sha256": {
"name": "cargo-dist-aarch64-unknown-linux-musl.tar.xz.sha256",
"kind": "checksum",
"target_triples": [
"aarch64-unknown-linux-musl"
]
},
"cargo-dist-installer.ps1": {
"name": "cargo-dist-installer.ps1",
"kind": "installer",
Expand All @@ -99,6 +187,8 @@ stdout:
"kind": "installer",
"target_triples": [
"aarch64-apple-darwin",
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-musl"
Expand Down Expand Up @@ -279,6 +369,8 @@ stdout:
"kind": "installer",
"target_triples": [
"aarch64-apple-darwin",
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-musl"
Expand Down Expand Up @@ -310,39 +402,56 @@ stdout:
"aarch64-apple-darwin"
],
"runner": "macos-11",
"install_dist": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v1.0.0-FAKEVERSION/cargo-dist-installer.sh | sh",
"install_dist": "cargo install --git https://github.com/axodotdev/cargo-dist/ --branch=main cargo-dist",
"dist_args": "--artifacts=local --target=aarch64-apple-darwin"
},
{
"targets": [
"aarch64-unknown-linux-gnu"
],
"runner": "buildjet-8vcpu-ubuntu-2204-arm",
"install_dist": "cargo install --git https://github.com/axodotdev/cargo-dist/ --branch=main cargo-dist",
"dist_args": "--artifacts=local --target=aarch64-unknown-linux-gnu"
},
{
"targets": [
"aarch64-unknown-linux-musl"
],
"runner": "buildjet-8vcpu-ubuntu-2204-arm",
"install_dist": "cargo install --git https://github.com/axodotdev/cargo-dist/ --branch=main cargo-dist",
"dist_args": "--artifacts=local --target=aarch64-unknown-linux-musl",
"packages_install": "sudo apt-get install musl-tools"
},
{
"targets": [
"x86_64-apple-darwin"
],
"runner": "macos-11",
"install_dist": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v1.0.0-FAKEVERSION/cargo-dist-installer.sh | sh",
"install_dist": "cargo install --git https://github.com/axodotdev/cargo-dist/ --branch=main cargo-dist",
"dist_args": "--artifacts=local --target=x86_64-apple-darwin"
},
{
"targets": [
"x86_64-pc-windows-msvc"
],
"runner": "windows-2019",
"install_dist": "irm https://github.com/axodotdev/cargo-dist/releases/download/v1.0.0-FAKEVERSION/cargo-dist-installer.ps1 | iex",
"install_dist": "cargo install --git https://github.com/axodotdev/cargo-dist/ --branch=main cargo-dist",
"dist_args": "--artifacts=local --target=x86_64-pc-windows-msvc"
},
{
"targets": [
"x86_64-unknown-linux-gnu"
],
"runner": "ubuntu-20.04",
"install_dist": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v1.0.0-FAKEVERSION/cargo-dist-installer.sh | sh",
"install_dist": "cargo install --git https://github.com/axodotdev/cargo-dist/ --branch=main cargo-dist",
"dist_args": "--artifacts=local --target=x86_64-unknown-linux-gnu"
},
{
"targets": [
"x86_64-unknown-linux-musl"
],
"runner": "ubuntu-20.04",
"install_dist": "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v1.0.0-FAKEVERSION/cargo-dist-installer.sh | sh",
"install_dist": "cargo install --git https://github.com/axodotdev/cargo-dist/ --branch=main cargo-dist",
"dist_args": "--artifacts=local --target=x86_64-unknown-linux-musl",
"packages_install": "sudo apt-get install musl-tools"
}
Expand Down

0 comments on commit 9e6b741

Please sign in to comment.