github: macos build
This commit is contained in:
parent
d77598c259
commit
accf123d49
1 changed files with 7 additions and 13 deletions
20
.github/workflows/release.yml
vendored
20
.github/workflows/release.yml
vendored
|
@ -94,26 +94,22 @@ jobs:
|
||||||
|
|
||||||
macos_release:
|
macos_release:
|
||||||
name: MacOS Release
|
name: MacOS Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: macos-12
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Setup zig
|
|
||||||
uses: korandoru/setup-zig@v1
|
|
||||||
with:
|
|
||||||
zig-version: 0.12.1
|
|
||||||
- name: Download SDK
|
- name: Download SDK
|
||||||
run: wget https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX10.15.sdk.tar.xz
|
run: wget https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX10.15.sdk.tar.xz
|
||||||
- name: Setup SDK env
|
- name: Setup SDK env
|
||||||
run: tar xf ${{ github.workspace }}/MacOSX10.15.sdk.tar.xz && echo "SDKROOT=${{ github.workspace }}/MacOSX10.15.sdk" >> $GITHUB_ENV
|
run: tar xf ${{ github.workspace }}/MacOSX10.15.sdk.tar.xz && echo "SDKROOT=${{ github.workspace }}/MacOSX10.15.sdk" >> $GITHUB_ENV
|
||||||
- name: Install cargo-zigbuild
|
- name: Setup platform env
|
||||||
run: cargo install cargo-zigbuild
|
run: echo "MACOSX_DEPLOYMENT_TARGET=10.15" >> $GITHUB_ENV
|
||||||
- name: Release x86
|
- name: Release x86
|
||||||
run: |
|
run: |
|
||||||
rustup target add x86_64-apple-darwin
|
rustup target add x86_64-apple-darwin
|
||||||
cargo zigbuild --release --target x86_64-apple-darwin
|
cargo build --release --target x86_64-apple-darwin
|
||||||
yes | cp -rf target/x86_64-apple-darwin/release/grim macos/Grim.app/Contents/MacOS
|
yes | cp -rf target/x86_64-apple-darwin/release/grim macos/Grim.app/Contents/MacOS
|
||||||
- name: Archive x86
|
- name: Archive x86
|
||||||
run: |
|
run: |
|
||||||
|
@ -128,7 +124,7 @@ jobs:
|
||||||
- name: Release ARM
|
- name: Release ARM
|
||||||
run: |
|
run: |
|
||||||
rustup target add aarch64-apple-darwin
|
rustup target add aarch64-apple-darwin
|
||||||
cargo zigbuild --release --target aarch64-apple-darwin
|
cargo build --release --target aarch64-apple-darwin
|
||||||
yes | cp -rf target/aarch64-apple-darwin/release/grim macos/Grim.app/Contents/MacOS
|
yes | cp -rf target/aarch64-apple-darwin/release/grim macos/Grim.app/Contents/MacOS
|
||||||
- name: Archive ARM
|
- name: Archive ARM
|
||||||
run: |
|
run: |
|
||||||
|
@ -142,10 +138,8 @@ jobs:
|
||||||
run: sha256sum grim-${{ github.ref_name }}-macos-arm.zip > grim-${{ github.ref_name }}-macos-arm-sha256sum.txt
|
run: sha256sum grim-${{ github.ref_name }}-macos-arm.zip > grim-${{ github.ref_name }}-macos-arm-sha256sum.txt
|
||||||
- name: Release Universal
|
- name: Release Universal
|
||||||
run: |
|
run: |
|
||||||
rustup target add aarch64-apple-darwin
|
lipo -create -output target/grim target/aarch64-apple-darwin/release/grim target/x86_64-apple-darwin/release/grim
|
||||||
rustup target add x86_64-apple-darwin
|
yes | cp -rf target/grim macos/Grim.app/Contents/MacOS
|
||||||
cargo zigbuild --release --target universal2-apple-darwin
|
|
||||||
yes | cp -rf target/universal2-apple-darwin/release/grim macos/Grim.app/Contents/MacOS
|
|
||||||
- name: Archive Universal
|
- name: Archive Universal
|
||||||
run: |
|
run: |
|
||||||
cd macos
|
cd macos
|
||||||
|
|
Loading…
Reference in a new issue