-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
44 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,38 +45,70 @@ jobs: | |
files: "tw-x86-linux-gnu;./target/debian/*.deb;./target/generate-rpm/*.rpm" | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
build-and-upload-linux-arm-v6-v7-v8: | ||
build-and-upload-linux-arm-v7: | ||
|
||
runs-on: ubuntu-latest | ||
if: startsWith(github.event.release.tag_name, 'v') | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
target: [arm-unknown-linux-gnueabihf, armv7-unknown-linux-gnueabihf, aarch64-unknown-linux-gnu] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout to the latest version | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install GCC | ||
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 | ||
- name: Install build tools | ||
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 | ||
|
||
- name: Set linker | ||
run: export CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc | ||
|
||
- name: Install Rust | ||
run: rustup target add ${{ matrix.target }} | ||
run: rustup target add armv7-unknown-linux-gnueabihf | ||
|
||
- name: Build | ||
run: cargo build --release --verbose --target ${{ matrix.target }} | ||
run: cargo build --release --verbose --target armv7-unknown-linux-gnueabihf | ||
|
||
- name: Test | ||
run: cargo test --all --release | ||
|
||
- name: Rename before upload | ||
run: mv target/${{ matrix.target }}/release/tw.exe tw-${{matrix.target}}.exe | ||
run: mv target/armv7-unknown-linux-gnueabihf/release/tw tw-armv7-unknown-linux-gnueabihf | ||
|
||
- name: Upload artifacts to release | ||
uses: AButler/[email protected] | ||
with: | ||
files: tw-${{matrix.target}}.exe | ||
files: tw-armv7-unknown-linux-gnueabihf | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
build-and-upload-linux-aarch64: | ||
|
||
runs-on: ubuntu-latest | ||
if: startsWith(github.event.release.tag_name, 'v') | ||
|
||
steps: | ||
- name: Checkout to the latest version | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install build tools | ||
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 | ||
|
||
- name: Set linker | ||
run: export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc | ||
|
||
- name: Install Rust | ||
run: rustup target add aarch64-unknown-linux-gnu | ||
|
||
- name: Build | ||
run: cargo build --release --verbose --target aarch64-unknown-linux-gnu | ||
|
||
- name: Test | ||
run: cargo test --all --release | ||
|
||
- name: Rename before upload | ||
run: mv target/aarch64-unknown-linux-gnu/release/tw tw-aarch64-unknown-linux-gnu | ||
|
||
- name: Upload artifacts to release | ||
uses: AButler/[email protected] | ||
with: | ||
files: tw-aarch64-unknown-linux-gnu | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
build-and-upload-windows: | ||
|