Rust Build #11
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
name: Rust Build | |
on: | |
workflow_dispatch: | |
env: | |
RUST_BACKTRACE: full | |
EXPECT_RUST_BINARY_NAME: WindSend-S-Rust | |
jobs: | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Rust | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
target: aarch64-pc-windows-msvc | |
- name: Build windows-amd64 | |
working-directory: ./windSend-rs | |
run: cargo build --verbose --release | |
- name: Build aarch64-pc-windows-msvc | |
working-directory: ./windSend-rs | |
run: cargo build --target aarch64-pc-windows-msvc --verbose --release | |
- name: Rename All Binary | |
run: | | |
mv ./windSend-rs/target/aarch64-pc-windows-msvc/release/wind_send.exe ./windSend-rs/target/aarch64-pc-windows-msvc/release/${{ env.EXPECT_RUST_BINARY_NAME }}.exe | |
mv ./windSend-rs/target/release/wind_send.exe ./windSend-rs/target/release/${{ env.EXPECT_RUST_BINARY_NAME }}.exe | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windSend-rs-windows | |
path: | | |
./windSend-rs/target/aarch64-pc-windows-msvc/release/${{ env.EXPECT_RUST_BINARY_NAME }}.exe | |
./windSend-rs/target/release/${{ env.EXPECT_RUST_BINARY_NAME }}.exe | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Rust | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
target: aarch64-unknown-linux-gnu | |
- name: Install dependencies on Ubuntu | |
run: sudo apt-get update && sudo apt-get install -y libgtk-3-dev libxdo-dev libappindicator3-dev | |
# run: sudo apt-get install -y gcc-aarch64-linux-gnu | |
- name: Build linux-amd64 | |
working-directory: ./windSend-rs | |
run: cargo build --verbose --release | |
# - name: Build aarch64-unknown-linux-gnu | |
# working-directory: ./windSend-rs | |
# run: cargo build --target aarch64-unknown-linux-gnu --verbose --release | |
- name: Rename All Binary | |
run: mv ./windSend-rs/target/release/wind_send ./windSend-rs/target/release/${{ env.EXPECT_RUST_BINARY_NAME }} | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windSend-rs-linux | |
path: | | |
./windSend-rs/target/release/${{ env.EXPECT_RUST_BINARY_NAME }} | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Rust | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
target: aarch64-apple-darwin | |
- name: Build macos-amd64 | |
working-directory: ./windSend-rs | |
run: cargo build --verbose --release | |
- name: Build aarch64-apple-darwin | |
working-directory: ./windSend-rs | |
run: cargo build --target aarch64-apple-darwin --verbose --release | |
- name: Rename All Binary | |
run: | | |
mv ./windSend-rs/target/aarch64-apple-darwin/release/wind_send ./windSend-rs/target/aarch64-apple-darwin/release/${{ env.EXPECT_RUST_BINARY_NAME }} | |
mv ./windSend-rs/target/release/wind_send ./windSend-rs/target/release/${{ env.EXPECT_RUST_BINARY_NAME }} | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windSend-rs-macos | |
path: | | |
./windSend-rs/target/aarch64-apple-darwin/release/${{ env.EXPECT_RUST_BINARY_NAME }} | |
./windSend-rs/target/release/${{ env.EXPECT_RUST_BINARY_NAME }} | |
build-x86_64-unknown-linux-musl: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Rust | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
target: x86_64-unknown-linux-musl | |
- name: Install dependencies on Ubuntu | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev libxdo-dev libappindicator3-dev | |
sudo apt-get install -y pkg-config libssl-dev build-essential linux-libc-dev | |
sudo apt-get install -y musl-dev musl-tools | |
- name: Build x86_64-unknown-linux-musl | |
working-directory: ./windSend-rs | |
run: cargo build --target x86_64-unknown-linux-musl --verbose --release | |
- name: Rename All Binary | |
run: mv ./windSend-rs/target/x86_64-unknown-linux-musl/release/wind_send ./windSend-rs/target/x86_64-unknown-linux-musl/release/${{ env.EXPECT_RUST_BINARY_NAME }} | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windSend-rs-x86_64-unknown-linux-musl | |
path: | | |
./windSend-rs/target/x86_64-unknown-linux-musl/release/${{ env.EXPECT_RUST_BINARY_NAME }} |