fix aarch64 musl build: use cross instead of musl.cc download
musl.cc was unreachable from CI. cross handles the Docker-based cross-compilation automatically. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
30
.github/workflows/release.yml
vendored
30
.github/workflows/release.yml
vendored
@@ -35,30 +35,28 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
targets: ${{ matrix.target }}
|
targets: ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Install cross-compilation tools
|
- name: Install musl tools (x86_64)
|
||||||
if: contains(matrix.target, 'linux')
|
if: matrix.target == 'x86_64-unknown-linux-musl'
|
||||||
run: |
|
run: sudo apt-get update && sudo apt-get install -y musl-tools
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y musl-tools
|
|
||||||
if [ "${{ matrix.target }}" = "aarch64-unknown-linux-musl" ]; then
|
|
||||||
sudo apt-get install -y gcc-aarch64-linux-gnu musl-dev
|
|
||||||
# Install aarch64 musl cross-compiler
|
|
||||||
wget -q https://musl.cc/aarch64-linux-musl-cross.tgz
|
|
||||||
tar xzf aarch64-linux-musl-cross.tgz -C /opt
|
|
||||||
echo "/opt/aarch64-linux-musl-cross/bin" >> $GITHUB_PATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Build
|
- name: Install cross (aarch64)
|
||||||
|
if: matrix.target == 'aarch64-unknown-linux-musl'
|
||||||
|
run: cargo install cross
|
||||||
|
|
||||||
|
- name: Build (native)
|
||||||
|
if: matrix.target != 'aarch64-unknown-linux-musl'
|
||||||
run: cargo build --release --target ${{ matrix.target }}
|
run: cargo build --release --target ${{ matrix.target }}
|
||||||
env:
|
|
||||||
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-linux-musl-gcc
|
- name: Build (cross)
|
||||||
|
if: matrix.target == 'aarch64-unknown-linux-musl'
|
||||||
|
run: cross build --release --target ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Package
|
- name: Package
|
||||||
run: |
|
run: |
|
||||||
cd target/${{ matrix.target }}/release
|
cd target/${{ matrix.target }}/release
|
||||||
tar czf ../../../${{ matrix.name }}.tar.gz numa
|
tar czf ../../../${{ matrix.name }}.tar.gz numa
|
||||||
cd ../../..
|
cd ../../..
|
||||||
sha256sum ${{ matrix.name }}.tar.gz > ${{ matrix.name }}.tar.gz.sha256
|
sha256sum ${{ matrix.name }}.tar.gz > ${{ matrix.name }}.tar.gz.sha256 || shasum -a 256 ${{ matrix.name }}.tar.gz > ${{ matrix.name }}.tar.gz.sha256
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|||||||
Reference in New Issue
Block a user