Skip to content

Commit

Permalink
Merge pull request #1561 from axodotdev/cross-self
Browse files Browse the repository at this point in the history
Update own dist and test cross-compiling
  • Loading branch information
ashleygwilliams authored Nov 15, 2024
2 parents c90513a + 77d8ca9 commit b487ee9
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 20 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,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.25.2-prerelease.2/cargo-dist-installer.sh | sh"
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.26.0-prerelease.1/cargo-dist-installer.sh | sh"
- name: Cache dist
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -111,6 +111,7 @@ jobs:
# - N "local" tasks that build each platform's binaries and platform-specific installers
matrix: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix }}
runs-on: ${{ matrix.runner }}
container: ${{ matrix.container && matrix.container.image || null }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_MANIFEST_NAME: target/distrib/${{ join(matrix.targets, '-') }}-dist-manifest.json
Expand All @@ -121,6 +122,13 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Rust non-interactively if not already installed
if: ${{ matrix.container }}
run: |
if ! command -v cargo > /dev/null 2>&1; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
fi
- name: Install dist
run: ${{ matrix.install_dist.run }}
# Get the dist-manifest
Expand Down Expand Up @@ -151,7 +159,7 @@ jobs:
run: |
# Parse out what we just built and upload it to scratch storage
echo "paths<<EOF" >> "$GITHUB_OUTPUT"
jq --raw-output ".upload_files[]" dist-manifest.json >> "$GITHUB_OUTPUT"
dist print-upload-files-from-manifest --manifest dist-manifest.json >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
cp dist-manifest.json "$BUILD_MANIFEST_NAME"
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/axodotdev/cargo-dist"
homepage = "https://opensource.axo.dev/cargo-dist/"
version = "0.26.0-prerelease.1"
version = "0.26.0-prerelease.2"

[workspace.dependencies]
# intra-workspace deps (you need to bump these versions when you cut releases too!
cargo-dist-schema = { version = "=0.26.0-prerelease.1", path = "cargo-dist-schema" }
axoproject = { version = "=0.26.0-prerelease.1", path = "axoproject", default-features = false, features = ["cargo-projects", "generic-projects", "npm-projects"] }
cargo-dist-schema = { version = "=0.26.0-prerelease.2", path = "cargo-dist-schema" }
axoproject = { version = "=0.26.0-prerelease.2", path = "axoproject", default-features = false, features = ["cargo-projects", "generic-projects", "npm-projects"] }

# first-party deps
axocli = { version = "0.2.0" }
Expand Down
25 changes: 18 additions & 7 deletions cargo-dist/tests/snapshots/manifest.snap

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

14 changes: 9 additions & 5 deletions dist-workspace.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = ["cargo:."]
# Config for 'dist'
[dist]
# The preferred dist version to use in CI (Cargo.toml SemVer syntax)
cargo-dist-version = "0.25.2-prerelease.2"
cargo-dist-version = "0.26.0-prerelease.1"
# CI backends to support
ci = "github"
# The installers to generate for each app
Expand Down Expand Up @@ -32,9 +32,13 @@ install-path = "CARGO_HOME"
artifacts = ["dist-manifest-schema.json"]
build = ["cargo", "run", "--release", "--", "dist", "manifest-schema", "--output=dist-manifest-schema.json"]

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

[dist.bin-aliases]
"dist" = ["cargo-dist"]

[dist.github-custom-runners.aarch64-unknown-linux-gnu.container]
image = "quay.io/pypa/manylinux_2_28_x86_64"
host = "x86_64-unknown-linux-musl"

[dist.github-custom-runners.aarch64-unknown-linux-musl.container]
image = "quay.io/pypa/manylinux_2_28_x86_64"
host = "x86_64-unknown-linux-musl"

0 comments on commit b487ee9

Please sign in to comment.