Use cross to for target armv7-unknown-linux-gnueabihf

in job `build`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-05-31 14:08:51 +10:00
parent 187ac2d20e
commit 9c9b8e55b3
No known key found for this signature in database
GPG key ID: 591C0B03040416D6

View file

@ -33,7 +33,7 @@ jobs:
os: ubuntu-20.04
output: cargo-binstall
archive: tgz
use-cross: false
use-cross: true
- target: x86_64-pc-windows-msvc
os: windows-latest
output: cargo-binstall.exe
@ -71,18 +71,8 @@ jobs:
${{ env.HOME }}/.cargo
target
- name: Install cross toolchain (armv7)
if: ${{ matrix.target == 'armv7-unknown-linux-gnueabihf' || matrix.target == 'armv7-unknown-linux-musleabihf' }}
run: sudo apt-get install gcc-arm-linux-gnueabihf
- name: Enable cross compilation (armv7)
if: ${{ matrix.target == 'armv7-unknown-linux-gnueabihf' || matrix.target == 'armv7-unknown-linux-musleabihf' }}
run: |
echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV
echo "LZMA_API_STATIC=1" >> $GITHUB_ENV
- name: Install musl-tools
if: ${{ matrix.target == 'armv7-unknown-linux-musleabihf' || matrix.target == 'x86_64-unknown-linux-musl' }}
if: ${{ matrix.target == 'x86_64-unknown-linux-musl' }}
run: sudo apt-get install -y musl-tools
- name: Build release