mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-15 23:26:36 +00:00
feat: aarch64 support for linux and macos
This commit is contained in:
parent
77f51aff84
commit
79bd57730c
1 changed files with 18 additions and 20 deletions
36
.github/workflows/rust.yml
vendored
36
.github/workflows/rust.yml
vendored
|
@ -23,18 +23,32 @@ jobs:
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
output: cargo-binstall
|
output: cargo-binstall
|
||||||
archive: tgz
|
archive: tgz
|
||||||
|
cross: false
|
||||||
|
- target: aarch64-unknown-linux-gnu
|
||||||
|
os: ubuntu-latest
|
||||||
|
output: cargo-binstall
|
||||||
|
archive: tgz
|
||||||
|
cross: true
|
||||||
- target: x86_64-apple-darwin
|
- target: x86_64-apple-darwin
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
output: cargo-binstall
|
output: cargo-binstall
|
||||||
archive: zip
|
archive: zip
|
||||||
|
cross: false
|
||||||
|
- target: aarch64-apple-darwin
|
||||||
|
os: macos-latest
|
||||||
|
output: cargo-binstall
|
||||||
|
archive: zip
|
||||||
|
cross: false
|
||||||
- target: armv7-unknown-linux-gnueabihf
|
- target: armv7-unknown-linux-gnueabihf
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
output: cargo-binstall
|
output: cargo-binstall
|
||||||
archive: tgz
|
archive: tgz
|
||||||
|
cross: true
|
||||||
- target: x86_64-pc-windows-msvc
|
- target: x86_64-pc-windows-msvc
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
output: cargo-binstall.exe
|
output: cargo-binstall.exe
|
||||||
archive: zip
|
archive: zip
|
||||||
|
cross: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -43,17 +57,10 @@ jobs:
|
||||||
- name: Configure toolchain
|
- name: Configure toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: nightly
|
toolchain: stable
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
override: true
|
override: true
|
||||||
|
|
||||||
- name: Install openssl (apt armv7)
|
|
||||||
if: ${{ matrix.target == 'armv7-unknown-linux-gnueabihf' }}
|
|
||||||
uses: ryankurte/action-apt@v0.3.0
|
|
||||||
with:
|
|
||||||
arch: armhf
|
|
||||||
packages: libssl-dev:armhf libssl1.1:armhf zlib1g-dev:armhf zlib1g:armhf libc-dev:armhf
|
|
||||||
|
|
||||||
- name: Configure caching
|
- name: Configure caching
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
# Caching disabled on macos due to https://github.com/actions/cache/issues/403
|
# Caching disabled on macos due to https://github.com/actions/cache/issues/403
|
||||||
|
@ -64,21 +71,12 @@ jobs:
|
||||||
${{ env.HOME }}/.cargo"
|
${{ env.HOME }}/.cargo"
|
||||||
target
|
target
|
||||||
|
|
||||||
- name: Install cross toolchain (armv7)
|
- name: Build binary
|
||||||
if: ${{ matrix.target == 'armv7-unknown-linux-gnueabihf' }}
|
|
||||||
run: sudo apt install gcc-arm-linux-gnueabihf
|
|
||||||
|
|
||||||
- name: Enable cross compilation (armv7)
|
|
||||||
if: ${{ matrix.target == 'armv7-unknown-linux-gnueabihf' }}
|
|
||||||
run: |
|
|
||||||
echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV
|
|
||||||
echo "LZMA_API_STATIC=1" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Build release
|
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
args: --target ${{ matrix.target }} --release
|
args: --target ${{ matrix.target }} --release
|
||||||
|
use-cross: ${{ matrix.cross }}
|
||||||
|
|
||||||
- name: Copy and rename utility
|
- name: Copy and rename utility
|
||||||
run: cp target/${{ matrix.target }}/release/${{ matrix.output }} ${{ matrix.output }}
|
run: cp target/${{ matrix.target }}/release/${{ matrix.output }} ${{ matrix.output }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue