mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-22 13:38:43 +00:00
Merge pull request #143 from NobodyXu/use-static-musl-libc-for-prebuilt
This commit is contained in:
commit
9026554471
1 changed files with 41 additions and 17 deletions
58
.github/workflows/rust.yml
vendored
58
.github/workflows/rust.yml
vendored
|
@ -23,18 +23,42 @@ jobs:
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
output: cargo-binstall
|
output: cargo-binstall
|
||||||
archive: tgz
|
archive: tgz
|
||||||
|
use-cross: false
|
||||||
- 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
|
||||||
|
use-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
|
||||||
|
use-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
|
||||||
|
use-cross: false
|
||||||
|
- target: x86_64-unknown-linux-musl
|
||||||
|
os: ubuntu-latest
|
||||||
|
output: cargo-binstall
|
||||||
|
archive: tgz
|
||||||
|
use-cross: false
|
||||||
|
- target: armv7-unknown-linux-musleabihf
|
||||||
|
os: ubuntu-20.04
|
||||||
|
output: cargo-binstall
|
||||||
|
archive: tgz
|
||||||
|
use-cross: true
|
||||||
|
- target: aarch64-unknown-linux-gnu
|
||||||
|
os: ubuntu-latest
|
||||||
|
output: cargo-binstall
|
||||||
|
archive: tgz
|
||||||
|
use-cross: true
|
||||||
|
- target: aarch64-unknown-linux-musl
|
||||||
|
os: ubuntu-latest
|
||||||
|
output: cargo-binstall
|
||||||
|
archive: tgz
|
||||||
|
use-cross: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -47,13 +71,6 @@ jobs:
|
||||||
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
|
||||||
|
@ -61,24 +78,19 @@ jobs:
|
||||||
with:
|
with:
|
||||||
key: ${{ matrix.os }}-${{ matrix.target }}
|
key: ${{ matrix.os }}-${{ matrix.target }}
|
||||||
path: |
|
path: |
|
||||||
${{ env.HOME }}/.cargo"
|
${{ env.HOME }}/.cargo
|
||||||
target
|
target
|
||||||
|
|
||||||
- name: Install cross toolchain (armv7)
|
- name: Install musl-tools
|
||||||
if: ${{ matrix.target == 'armv7-unknown-linux-gnueabihf' }}
|
if: ${{ matrix.target == 'x86_64-unknown-linux-musl' }}
|
||||||
run: sudo apt install gcc-arm-linux-gnueabihf
|
run: sudo apt-get install -y musl-tools
|
||||||
|
|
||||||
- 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
|
- 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.use-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 }}
|
||||||
|
@ -131,11 +143,23 @@ jobs:
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
output: cargo-binstall.exe
|
output: cargo-binstall.exe
|
||||||
archive: zip
|
archive: zip
|
||||||
|
- target: x86_64-unknown-linux-musl
|
||||||
|
os: ubuntu-latest
|
||||||
|
output: cargo-binstall
|
||||||
|
archive: tgz
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: FranzDiebold/github-env-vars-action@v1.2.1
|
- uses: FranzDiebold/github-env-vars-action@v1.2.1
|
||||||
|
|
||||||
|
- name: Configure toolchain
|
||||||
|
if: ${{ matrix.target == 'x86_64-unknown-linux-musl' }}
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
target: ${{ matrix.target }}
|
||||||
|
override: true
|
||||||
|
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: cargo-binstall-${{ matrix.target }}.${{ matrix.archive }}
|
name: cargo-binstall-${{ matrix.target }}.${{ matrix.archive }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue