Skip to content

Commit

Permalink
🍎 Set up build action for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve-xmh committed Mar 3, 2024
1 parent 3d5487d commit d6f191c
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build_macos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on: [ push, pull_request ]

name: CI for macOS

jobs:
build:
name: build for macOS
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest ]
steps:
- uses: actions/checkout@v4
- name: Build for Intel/Apple Silicon target
run: |
rustup target add aarch64-apple-darwin x86_64-apple-darwin
cargo build --verbose --release --target aarch64-apple-darwin
cargo build --verbose --release --target x86_64-apple-darwin
- name: Create Fat Executable for Intel/Apple Silicon
run: |
lipo -create -output target/libv8_killer_core.dylib \
target/aarch64-apple-darwin/release/libv8_killer_core.dylib \
target/x86_64-apple-darwin/release/libv8_killer_core.dylib
lipo -create -output target/v8_killer_launcher \
target/aarch64-apple-darwin/release/v8_killer_launcher \
target/x86_64-apple-darwin/release/v8_killer_launcher
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-release
path: |
target/libv8_killer_core.dylib
target/v8_killer_launcher

0 comments on commit d6f191c

Please sign in to comment.