Remove .cargo/config.toml and set link compiler on CI with CARGO_TARGET_<triple>_LINKER (#1333)

* Remove .cargo/config.toml and set link compiler on CI with CARGO_TARGET_<triple>_LINKER

* Run windows and cross builds parallel to linux tests

Signed-off-by: yubiuser <github@yubiuser.dev>
This commit is contained in:
yubiuser 2024-09-13 07:40:22 +02:00 committed by GitHub
parent 4f9151c642
commit b85bab5095
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 8 deletions

View file

@ -1,3 +0,0 @@
[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"

View file

@ -154,7 +154,7 @@ jobs:
- run: cargo hack check --each-feature - run: cargo hack check --each-feature
test-windows: test-windows:
needs: test-linux needs: clippy
name: cargo +${{ matrix.toolchain }} check (${{ matrix.os }}) name: cargo +${{ matrix.toolchain }} check (${{ matrix.os }})
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
continue-on-error: false continue-on-error: false
@ -201,7 +201,7 @@ jobs:
test-cross-arm: test-cross-arm:
name: cross +${{ matrix.toolchain }} build ${{ matrix.target }} name: cross +${{ matrix.toolchain }} build ${{ matrix.target }}
needs: test-linux needs: clippy
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
continue-on-error: false continue-on-error: false
strategy: strategy:
@ -234,11 +234,24 @@ jobs:
target target
key: ${{ runner.os }}-${{ matrix.target }}-${{ steps.get-rustc-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} key: ${{ runner.os }}-${{ matrix.target }}-${{ steps.get-rustc-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
- name: Install the cross compiler targets - name: Install the cross compiler rust targets
run: rustup target add ${{ matrix.target }} run: rustup target add ${{ matrix.target }}
- name: Install cross compiler toolchain - name: Install cross compiler
run: sudo apt-get install -y gcc-arm-linux-gnueabihf run: |
if [ ${{ matrix.target }} = "armv7-unknown-linux-gnueabihf" ]; then
sudo apt-get install -y gcc-arm-linux-gnueabihf
fi
- name: Set target link compiler
run: |
# Convert target to uppercase and replace - with _
target=${{ matrix.target }}
target=${target^^}
target=${target//-/_}
if [ ${{ matrix.target }} = "armv7-unknown-linux-gnueabihf" ]; then
echo "CARGO_TARGET_${target}_LINKER=arm-linux-gnueabihf-gcc" >> $GITHUB_ENV
fi
- name: Build - name: Build
run: cargo build --verbose --target ${{ matrix.target }} --no-default-features run: cargo build --verbose --target ${{ matrix.target }} --no-default-features

1
.gitignore vendored
View file

@ -1,4 +1,5 @@
target target
.cargo
spotify_appkey.key spotify_appkey.key
.vagrant/ .vagrant/
.project .project