mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 22:30:03 +00:00
Include x86_64
& x86_64h
in universal apple pre-built binary (#1279)
To makre sure it can run on pre-haswell Intel CPUs. Fixed #1277 Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
a84844938d
commit
c4bb0fd77a
2 changed files with 23 additions and 11 deletions
4
.github/workflows/release-build.yml
vendored
4
.github/workflows/release-build.yml
vendored
|
@ -127,6 +127,10 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: x86_64h-apple-darwin
|
name: x86_64h-apple-darwin
|
||||||
path: packages/
|
path: packages/
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: x86_64-apple-darwin
|
||||||
|
path: packages/
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: aarch64-apple-darwin
|
name: aarch64-apple-darwin
|
||||||
|
|
30
justfile
30
justfile
|
@ -322,17 +322,20 @@ package-prepare: build package-dir
|
||||||
[macos]
|
[macos]
|
||||||
lipo-prepare: package-dir
|
lipo-prepare: package-dir
|
||||||
just target=aarch64-apple-darwin build get-binary packages/prep/arm64
|
just target=aarch64-apple-darwin build get-binary packages/prep/arm64
|
||||||
just target=x86_64h-apple-darwin build get-binary packages/prep/x64
|
just target=x86_64-apple-darwin build get-binary packages/prep/x64
|
||||||
|
just target=x86_64h-apple-darwin build get-binary packages/prep/x64h
|
||||||
|
|
||||||
just target=aarch64-apple-darwin get-binary packages/prep/arm64
|
just target=aarch64-apple-darwin get-binary packages/prep/arm64
|
||||||
just target=x86_64h-apple-darwin get-binary packages/prep/x64
|
just target=x86_64-apple-darwin get-binary packages/prep/x64
|
||||||
lipo -create -output packages/prep/{{output-filename}} packages/prep/{arm64,x64}/{{output-filename}}
|
just target=x86_64h-apple-darwin get-binary packages/prep/x64h
|
||||||
|
lipo -create -output packages/prep/{{output-filename}} packages/prep/{arm64,x64,x64h}/{{output-filename}}
|
||||||
|
|
||||||
just target=aarch64-apple-darwin get-output detect-wasi{{output-ext}} packages/prep/arm64
|
just target=aarch64-apple-darwin get-output detect-wasi{{output-ext}} packages/prep/arm64
|
||||||
just target=x86_64h-apple-darwin get-output detect-wasi{{output-ext}} packages/prep/x64
|
just target=x86_64-apple-darwin get-output detect-wasi{{output-ext}} packages/prep/x64
|
||||||
lipo -create -output packages/prep/detect-wasi{{output-ext}} packages/prep/{arm64,x64}/detect-wasi{{output-ext}}
|
just target=x86_64h-apple-darwin get-output detect-wasi{{output-ext}} packages/prep/x64h
|
||||||
|
lipo -create -output packages/prep/detect-wasi{{output-ext}} packages/prep/{arm64,x64,x64h}/detect-wasi{{output-ext}}
|
||||||
|
|
||||||
rm -rf packages/prep/{arm64,x64}
|
rm -rf packages/prep/{arm64,x64,x64h}
|
||||||
|
|
||||||
|
|
||||||
[linux]
|
[linux]
|
||||||
|
@ -358,13 +361,18 @@ package-lipo: lipo-prepare
|
||||||
# assuming x64 and arm64 packages are already built, extract and lipo them
|
# assuming x64 and arm64 packages are already built, extract and lipo them
|
||||||
[macos]
|
[macos]
|
||||||
repackage-lipo: package-dir
|
repackage-lipo: package-dir
|
||||||
mkdir -p packages/prep/{arm64,x64}
|
set -euxo pipefail
|
||||||
cd packages/prep/x64 && unzip -o "../../cargo-binstall-x86_64h-apple-darwin.full.zip"
|
|
||||||
|
mkdir -p packages/prep/{arm64,x64,x64h}
|
||||||
|
cd packages/prep/x64 && unzip -o "../../cargo-binstall-x86_64-apple-darwin.full.zip"
|
||||||
|
cd packages/prep/x64h && unzip -o "../../cargo-binstall-x86_64h-apple-darwin.full.zip"
|
||||||
cd packages/prep/arm64 && unzip -o "../../cargo-binstall-aarch64-apple-darwin.full.zip"
|
cd packages/prep/arm64 && unzip -o "../../cargo-binstall-aarch64-apple-darwin.full.zip"
|
||||||
|
|
||||||
lipo -create -output packages/prep/{{output-filename}} packages/prep/{arm64,x64}/{{output-filename}}
|
lipo -create -output packages/prep/{{output-filename}} packages/prep/{arm64,x64,x64h}/{{output-filename}}
|
||||||
lipo -create -output packages/prep/detect-wasi packages/prep/{arm64,x64}/detect-wasi
|
lipo -create -output packages/prep/detect-wasi packages/prep/{arm64,x64,x64h}/detect-wasi
|
||||||
|
|
||||||
rm -rf packages/prep/{arm64,x64}
|
./packages/prep/{{output-filename}} -vV
|
||||||
|
|
||||||
|
rm -rf packages/prep/{arm64,x64,x64h}
|
||||||
cd packages/prep && zip -9 "../cargo-binstall-universal-apple-darwin.zip" {{output-filename}}
|
cd packages/prep && zip -9 "../cargo-binstall-universal-apple-darwin.zip" {{output-filename}}
|
||||||
cd packages/prep && zip -9 "../cargo-binstall-universal-apple-darwin.full.zip" *
|
cd packages/prep && zip -9 "../cargo-binstall-universal-apple-darwin.full.zip" *
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue