From 799c0395ab419d40b4ae96e749ead2e3dec77f38 Mon Sep 17 00:00:00 2001 From: Jackson Goode Date: Wed, 3 Jul 2024 18:49:31 -0700 Subject: [PATCH] Try --- .github/workflows/build.yml | 22 ++++++++-------------- Cargo.toml | 3 +++ psst-gui/Cargo.toml | 18 ++++++++---------- 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 114d03a6..b3ea4e75 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,28 +55,22 @@ jobs: - name: Install Linux Dependencies if: runner.os == 'Linux' run: | + sudo dpkg --add-architecture arm64 sudo apt-get update sudo apt-get install -y \ - libgtk-3-dev \ - libssl-dev \ - libasound2-dev \ - libglib2.0-dev \ - pkg-config - - - name: Install cross - if: runner.os == 'Linux' - run: | + gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \ + libgtk-3-dev:arm64 libssl-dev:arm64 libasound2-dev:arm64 libglib2.0-dev:arm64 \ + libgtk-3-dev libssl-dev libasound2-dev libglib2.0-dev cargo install cross - name: Build Release (Linux) if: runner.os == 'Linux' - run: | - sudo apt-get install -y gcc-${{ matrix.arch }}-linux-gnu g++-${{ matrix.arch }}-linux-gnu - cross build --target ${{ matrix.arch }}-unknown-linux-gnu --release + run: cross build --target ${{ matrix.arch }}-unknown-linux-gnu --release env: PKG_CONFIG_ALLOW_CROSS: 1 - PKG_CONFIG_SYSROOT_DIR: / - working-directory: ./psst-gui + PKG_CONFIG_PATH: /usr/lib/${{ matrix.arch }}/pkgconfig:/usr/lib/pkgconfig + CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc + CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_AR: aarch64-linux-gnu-ar - name: Build Release (macOS) if: runner.os == 'macOS' diff --git a/Cargo.toml b/Cargo.toml index cbb75d08..e8b84185 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,3 +18,6 @@ opt-level = 2 [profile.dev.package.libsamplerate] opt-level = 2 + +[target.aarch64-unknown-linux-gnu] +linker = "aarch64-linux-gnu-gcc" \ No newline at end of file diff --git a/psst-gui/Cargo.toml b/psst-gui/Cargo.toml index 5ff764ab..e6256b17 100644 --- a/psst-gui/Cargo.toml +++ b/psst-gui/Cargo.toml @@ -69,23 +69,21 @@ Small and efficient graphical music player for Spotify network. [package.metadata.cross.target.x86_64-unknown-linux-gnu] pre-build = [ - "dpkg --add-architecture $CROSS_DEB_ARCH", """apt-get update && apt-get --assume-yes install \ - libgtk-3-dev:$CROSS_DEB_ARCH \ - libssl-dev:$CROSS_DEB_ARCH \ - libasound2-dev:$CROSS_DEB_ARCH \ - libglib2.0-dev:$CROSS_DEB_ARCH + libgtk-3-dev \ + libssl-dev \ + libasound2-dev \ + libglib2.0-dev """ ] [package.metadata.cross.target.aarch64-unknown-linux-gnu] pre-build = [ - "dpkg --add-architecture $CROSS_DEB_ARCH", """apt-get update && apt-get --assume-yes install \ - libgtk-3-dev:$CROSS_DEB_ARCH \ - libssl-dev:$CROSS_DEB_ARCH \ - libasound2-dev:$CROSS_DEB_ARCH \ - libglib2.0-dev:$CROSS_DEB_ARCH + libgtk-3-dev:arm64 \ + libssl-dev:arm64 \ + libasound2-dev:arm64 \ + libglib2.0-dev:arm64 """ ]