Skip to content

Commit 8eb3dd8

Browse files
author
damon
committed
release: use cross-rs for Linux musl builds, fix rpm version sed
1 parent 9fcc8db commit 8eb3dd8

1 file changed

Lines changed: 7 additions & 14 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,14 @@ jobs:
1919
os: ubuntu-latest
2020
arch: x86_64
2121
platform: linux
22-
use_cross: false
2322
- target: aarch64-unknown-linux-musl
2423
os: ubuntu-latest
2524
arch: aarch64
2625
platform: linux
27-
use_cross: true
2826
- target: aarch64-apple-darwin
2927
os: macos-latest
3028
arch: aarch64
3129
platform: darwin
32-
use_cross: false
3330

3431
runs-on: ${{ matrix.os }}
3532

@@ -44,25 +41,21 @@ jobs:
4441
with:
4542
key: ${{ matrix.target }}
4643

47-
- name: Install musl tools
48-
if: matrix.target == 'x86_64-unknown-linux-musl'
49-
run: sudo apt-get update && sudo apt-get install -y musl-tools
50-
5144
- name: Install cross
52-
if: matrix.use_cross
45+
if: matrix.platform == 'linux'
5346
run: cargo install cross --git https://github.com/cross-rs/cross
5447

5548
- name: Set version from tag
5649
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
5750

58-
- name: Build (native)
59-
if: "!matrix.use_cross"
60-
run: cargo build --release --target ${{ matrix.target }}
61-
62-
- name: Build (cross)
63-
if: matrix.use_cross
51+
- name: Build (cross, Linux musl)
52+
if: matrix.platform == 'linux'
6453
run: cross build --release --target ${{ matrix.target }}
6554

55+
- name: Build (native, macOS)
56+
if: matrix.platform == 'darwin'
57+
run: cargo build --release --target ${{ matrix.target }}
58+
6659
- name: Compress binary (zstd)
6760
run: zstd -19 target/${{ matrix.target }}/release/batdoc -o batdoc-${{ matrix.platform }}-${{ matrix.arch }}.zst
6861

0 commit comments

Comments
 (0)