Skip to content

Commit 86426f4

Browse files
committed
update release workflow
1 parent 562727e commit 86426f4

File tree

1 file changed

+44
-12
lines changed

1 file changed

+44
-12
lines changed

.github/workflows/release.yml

+44-12
Original file line numberDiff line numberDiff line change
@@ -45,38 +45,70 @@ jobs:
4545
files: "tw-x86-linux-gnu;./target/debian/*.deb;./target/generate-rpm/*.rpm"
4646
repo-token: ${{ secrets.GITHUB_TOKEN }}
4747

48-
build-and-upload-linux-arm-v6-v7-v8:
48+
build-and-upload-linux-arm-v7:
4949

50+
runs-on: ubuntu-latest
5051
if: startsWith(github.event.release.tag_name, 'v')
51-
strategy:
52-
matrix:
53-
os: [ubuntu-latest]
54-
target: [arm-unknown-linux-gnueabihf, armv7-unknown-linux-gnueabihf, aarch64-unknown-linux-gnu]
55-
runs-on: ${{ matrix.os }}
5652

5753
steps:
5854
- name: Checkout to the latest version
5955
uses: actions/checkout@v4
6056

61-
- name: Install GCC
62-
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends build-essential libzstd-dev gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu
57+
- name: Install build tools
58+
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends build-essential libzstd-dev gcc-arm-linux-gnueabihf libc6-dev-armhf-cross
59+
60+
- name: Set linker
61+
run: export CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc
6362

6463
- name: Install Rust
65-
run: rustup target add ${{ matrix.target }}
64+
run: rustup target add armv7-unknown-linux-gnueabihf
6665

6766
- name: Build
68-
run: cargo build --release --verbose --target ${{ matrix.target }}
67+
run: cargo build --release --verbose --target armv7-unknown-linux-gnueabihf
6968

7069
- name: Test
7170
run: cargo test --all --release
7271

7372
- name: Rename before upload
74-
run: mv target/${{ matrix.target }}/release/tw.exe tw-${{matrix.target}}.exe
73+
run: mv target/armv7-unknown-linux-gnueabihf/release/tw tw-armv7-unknown-linux-gnueabihf
7574

7675
- name: Upload artifacts to release
7776
uses: AButler/[email protected]
7877
with:
79-
files: tw-${{matrix.target}}.exe
78+
files: tw-armv7-unknown-linux-gnueabihf
79+
repo-token: ${{ secrets.GITHUB_TOKEN }}
80+
81+
build-and-upload-linux-aarch64:
82+
83+
runs-on: ubuntu-latest
84+
if: startsWith(github.event.release.tag_name, 'v')
85+
86+
steps:
87+
- name: Checkout to the latest version
88+
uses: actions/checkout@v4
89+
90+
- name: Install build tools
91+
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends build-essential libzstd-dev gcc-aarch64-linux-gnu libc6-dev-arm64-cross
92+
93+
- name: Set linker
94+
run: export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
95+
96+
- name: Install Rust
97+
run: rustup target add aarch64-unknown-linux-gnu
98+
99+
- name: Build
100+
run: cargo build --release --verbose --target aarch64-unknown-linux-gnu
101+
102+
- name: Test
103+
run: cargo test --all --release
104+
105+
- name: Rename before upload
106+
run: mv target/aarch64-unknown-linux-gnu/release/tw tw-aarch64-unknown-linux-gnu
107+
108+
- name: Upload artifacts to release
109+
uses: AButler/[email protected]
110+
with:
111+
files: tw-aarch64-unknown-linux-gnu
80112
repo-token: ${{ secrets.GITHUB_TOKEN }}
81113

82114
build-and-upload-windows:

0 commit comments

Comments
 (0)