Skip to content

Commit 76adc77

Browse files
committed
fix build issues
1 parent bcab9ee commit 76adc77

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ jobs:
3232

3333
- name: Install dependencies (Linux)
3434
if: matrix.platform == 'linux'
35-
run: sudo apt-get update && sudo apt-get install -y libasound2-dev libjack-jackd2-dev libxkbcommon-dev protobuf-compiler
35+
run: |
36+
sudo apt-get update
37+
sudo apt-get install -y libasound2-dev libjack-jackd2-dev libxkbcommon-dev protobuf-compiler
38+
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
3639
3740
- name: Install dependencies (Windows)
3841
if: matrix.platform == 'windows'
@@ -44,8 +47,6 @@ jobs:
4447

4548
- name: Install Rust toolchain
4649
run: |
47-
rustup toolchain install stable --profile minimal
48-
4950
if [[ "${{ matrix.platform }}" == "linux" ]]; then
5051
rustup target add aarch64-unknown-linux-gnu x86_64-unknown-linux-gnu
5152
rustup component add rust-src --toolchain stable
@@ -68,25 +69,28 @@ jobs:
6869
if: matrix.platform == 'linux'
6970
working-directory: ./RustApp
7071
run: |
71-
TARGET=x86_64-unknown-linux-gnu cargo packager -r -f appimage --target x86_64-unknown-linux-gnu
72-
TARGET=aarch64-unknown-linux-gnu cargo packager -r -f appimage --target aarch64-unknown-linux-gnu
72+
cargo build --release --target x86_64-unknown-linux-gnu
73+
cargo packager -r -f appimage --target x86_64-unknown-linux-gnu
74+
PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_SYSROOT_DIR=/ cargo build --release --target aarch64-unknown-linux-gnu
75+
cargo packager -r -f appimage --target aarch64-unknown-linux-gnu
7376
7477
- name: Package (Windows)
7578
if: matrix.platform == 'windows'
7679
working-directory: ./RustApp
7780
run: |
78-
$env:TARGET = "x86_64-pc-windows-msvc"
81+
cargo build --release --target x86_64-pc-windows-msvc
7982
cargo packager -r -f nsis --target x86_64-pc-windows-msvc
80-
$env:TARGET = "i686-pc-windows-msvc"
83+
cargo build --release --target i686-pc-windows-msvc
8184
cargo packager -r -f nsis --target i686-pc-windows-msvc
82-
shell: powershell
8385
8486
- name: Package (macOS)
8587
if: matrix.platform == 'macos'
8688
working-directory: ./RustApp
8789
run: |
88-
TARGET=x86_64-apple-darwin cargo packager -r -f dmg --target x86_64-apple-darwin
89-
TARGET=aarch64-apple-darwin cargo packager -r -f dmg --target aarch64-apple-darwin
90+
cargo build --release --target x86_64-apple-darwin
91+
cargo packager -r -f dmg --target x86_64-apple-darwin
92+
cargo build --release --target aarch64-apple-darwin
93+
cargo packager -r -f dmg --target aarch64-apple-darwin
9094
9195
# For Linux
9296
- name: Upload Linux binary

RustApp/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ license = "GPL-3.0-only"
1313
product_name = "AndroidMic"
1414
version = "2.1.0"
1515
identifier = "io.github.teamclouday.android-mic"
16-
before_each_package_command = "cargo build --release --target $TARGET"
1716
icons = ["../Assets/icon512.png"]
1817
category = "Utility"
1918
description = "Use your Android phone as a mic for your PC"

0 commit comments

Comments
 (0)