8000 fix(installer): try native aarch64-unknown-linux-musl build for arm by twitchyliquid64 · Pull Request #764 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content
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
44 changes: 27 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,39 +180,49 @@ jobs:
retention-days: 7

build-release-linux-arm64:
runs-on: ubuntu-latest
# One combined cross build (was three sequential single-package builds).
# Keep 90m, not the optimistic 60: a dry-run (run 29375276363) showed the
# cold cross build (musl + aws-lc-sys) runs ~65m and hit the 60m cap. The
# rust-cache below makes the typical run fast, but a cache miss (first
# build, Cargo.lock change, or LRU eviction) is still cold, so the cap
# must clear the aws-lc-sys compile the recollapse can't shorten.
runs-on: ubuntu-26.04-arm
timeout-minutes: 90
steps:
- uses: actions/checkout@v7
- name: Install cross
uses: taiki-e/install-action@v2
- name: Free Disk Space
# Static release build of the full workspace; the cargo target dir
# is the largest in any of the linux jobs. `remove_tool_cache: true`
# is safe even without a `dtolnay/rust-toolchain` step — the
# pre-installed Rust toolchain on ubuntu-latest lives in
# `~/.rustup` + `~/.cargo`, not `/opt/hostedtoolcache`, so
# `rustup target add` below still resolves.
uses: endersonmenezes/free-disk-space@v3 # Use @main for latest, @v3 for stable
with:
tool: cross
remove_android: true
remove_dotnet: true
remove_haskell: true
remove_tool_cache: true
- uses: actions/checkout@v7
Comment on lines 186 to +200
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

sed -n '150,230p' .github/workflows/release.yml

Repository: gominimal/minimal

Length of output: 4637


🏁 Script executed:

wc -l .github/workflows/release.yml && sed -n '1,260p' .github/workflows/release.yml

Repository: gominimal/minimal

Length of output: 13386


🏁 Script executed:

python3 - <<'PY'
from pathlib import Path
p = Path('.github/workflows/release.yml')
text = p.read_text()
for i, line in enumerate(text.splitlines(), 1):
    if 170 <= i <= 210:
        print(f"{i:4}: {line}")
PY

Repository: gominimal/minimal

Length of output: 2481


🏁 Script executed:

sed -n '160,210p' .github/workflows/release.yml

Repository: gominimal/minimal

Length of output: 2888


🏁 Script executed:

grep -n "actions/checkout@v7\|free-disk-space" -n .github/workflows/release.yml

Repository: gominimal/minimal

Length of output: 788


Remove the first checkout. endersonmenezes/free-disk-space@v3 doesn’t need the repository, so the checkout before it is redundant; keep a single actions/checkout@v7 after cleanup.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 186 - 200, Remove the first
actions/checkout@v7 step before the “Free Disk Space” action in the release
workflow. Keep the endersonmenezes/free-disk-space@v3 cleanup step unchanged and
retain the single checkout step after it.

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y musl-tools protobuf-compiler
- name: Add Rust target
run: rustup target add aarch64-unknown-linux-musl
- name: Configure musl linker
run: |
echo '' >> .cargo/config.toml
echo '[target.aarch64-unknown-linux-musl]' >> .cargo/config.toml
echo 'linker = "musl-gcc"' >> .cargo/config.toml
Comment thread
twitchyliquid64 marked this conversation as resolved.
Resolved
- name: Cache Rust build artifacts (dependency-pruned)
# See the amd64 job: rust-cache replaces a raw multi-GB target/ cache
# the 10 GB LRU evicted, which is why this cross build kept running
# the 10 GB LRU evicted, which is why this build kept running
# cold (~65m). Pruned to dependency artifacts so it survives; save-if
# keeps branch/dry-run dispatches read-only. cross writes target/ and
# keeps branch/dry-run dispatches read-only. writes target/ and
# reads ~/.cargo on the host, so rust-cache caches them the same as a
# native build.
uses: Swatinem/rust-cache@v2
with:
shared-key: release-arm64
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Build static release binaries
# One build of all three packages (mirrors the amd64 job) instead of
# three separate cross invocations resolving the graph three times.
run: |
cross build --release --locked \
--target aarch64-unknown-linux-musl \
--package minimal \
cargo build --release --locked --target aarch64-unknown-linux-musl \
--package mip \
--package minimal \
--package minimald
- name: Rename binaries with platform suffix
# Platform-suffixed so download-artifact's merge-multiple basename
Expand Down
Loading
0