Skip to content
Merged
Show file tree
Hide file tree
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
16 changes: 10 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ jobs:
# Each builds NATIVELY on its arch's runner — no cross-compiler needed.
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: aarch64-unknown-linux-musl
os: ubuntu-24.04-arm
# aarch64-unknown-linux-musl is deferred: rust-htslib 0.44.1 fails to compile
# on aarch64 (a c_char signedness mismatch, E0308 — an upstream bug). Tracked
# as a separate issue; re-add the runner once rust-htslib builds on aarch64.
# macOS builds on Apple Silicon runners (macos-14, plentiful). The
# aarch64 build is native; the x86_64 build is cross-compiled from arm64
# (the SDK ships both arches; the cc crate adds `-arch x86_64`) so the
Expand All @@ -38,9 +39,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install musl toolchain (Linux)
- name: Install musl toolchain + cmake (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y musl-tools
# cmake: hts-sys 2.2.0 forces libz-sys/zlib-ng, whose build uses CMake.
run: sudo apt-get update && sudo apt-get install -y musl-tools cmake

- uses: actions-rs/toolchain@v1
with:
Expand All @@ -61,9 +63,11 @@ jobs:
- name: Build (release, ${{ matrix.target }})
env:
# musl needs the musl C compiler for the bundled htslib/bzip2/lzma builds.
# On each musl runner `musl-gcc` is that arch's native musl compiler.
CC_x86_64_unknown_linux_musl: musl-gcc
CC_aarch64_unknown_linux_musl: musl-gcc
# hts-sys 2.2.0 forces libz-sys/zlib-ng, whose CMake build probes for a C++
# compiler. zlib-ng's sources are C (built with the musl CC above); the host
# `g++` is the right arch on this native runner and satisfies CMake's probe.
CXX_x86_64_unknown_linux_musl: g++
run: cargo build --release --target ${{ matrix.target }} --bin rosalind

- name: Stage the bundle
Expand Down
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ case "$os" in
Linux)
case "$arch" in
x86_64 | amd64) target="x86_64-unknown-linux-musl" ;;
aarch64 | arm64) target="aarch64-unknown-linux-musl" ;;
*) die "unsupported Linux arch '$arch' (prebuilt: x86_64, aarch64; build from source for others)" ;;
# aarch64-linux prebuilt is deferred (rust-htslib aarch64 build bug) — build from source.
*) die "unsupported Linux arch '$arch' (prebuilt: x86_64; build from source for others)" ;;
esac
;;
Darwin)
Expand Down
Loading