From 78a8c61f8544f57b46788e0458e36210d26b2bdb Mon Sep 17 00:00:00 2001 From: yubiuser Date: Thu, 29 Aug 2024 15:46:03 +0200 Subject: [PATCH] Don't use 'cross' for cross-compilation Signed-off-by: yubiuser --- .cargo/config.toml | 3 +++ .github/workflows/test.yml | 14 +++++++++++--- .gitignore | 1 - 3 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 00000000..36056447 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,3 @@ + +[target.armv7-unknown-linux-gnueabihf] +linker = "arm-linux-gnueabihf-gcc" \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d7b84d88..b9e29240 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -233,7 +233,15 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-${{ matrix.target }}-${{ steps.get-rustc-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} - - name: Install cross - run: cargo install cross || true + + - name: Install the cross compiler targets + run: rustup target add ${{ matrix.target }} + + - name: Install cross compiler toolchain + run: sudo apt-get install -y gcc-arm-linux-gnueabihf + - name: Build - run: cross build --target ${{ matrix.target }} --no-default-features + run: cargo build --verbose --target ${{ matrix.target }} --no-default-features + + - name: Check binary + run: file target/${{ matrix.target }}/debug/librespot diff --git a/.gitignore b/.gitignore index eebf401d..8b5fdeb6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ target -.cargo spotify_appkey.key .vagrant/ .project