ci: generate universal binaries for macOS
This persuades the CI to install both the arm and intel flavors of the rust toolchain on macOS, and the deploy script to generate a universal binary. * need big sur to build for M1 * Use cross-compilation compatible mlua from my fork for now
This commit is contained in:
1 parent
f39c4f9d6e
commit
42b95cd413
9 files changed
+101
-20
No files matched your search
@@ -14,7 +14,7 @@ jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
runs-on: "macos-latest"
|
||||
runs-on: "macos-11.0"
|
||||
|
||||
steps:
|
||||
- name: "checkout repo"
|
||||
@@ -44,6 +44,13 @@ jobs:
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
- name: "Install Rust (ARM)"
|
||||
shell: bash
|
||||
run: |
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.9
|
||||
rustup target add aarch64-apple-darwin
|
||||
|
||||
|
||||
- name: "Install System Deps"
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -58,18 +65,25 @@ jobs:
|
||||
cargo fmt --all -- --check
|
||||
|
||||
|
||||
- name: "Build (Release mode)"
|
||||
- name: "Build (Release mode Intel)"
|
||||
shell: bash
|
||||
run: |
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.9
|
||||
cargo build --all --release
|
||||
cargo build --target x86_64-apple-darwin --all --release
|
||||
|
||||
|
||||
- name: "Build (Release mode ARM)"
|
||||
shell: bash
|
||||
run: |
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.9
|
||||
cargo build --target aarch64-apple-darwin --all --release
|
||||
|
||||
|
||||
- name: "Test (Release mode)"
|
||||
shell: bash
|
||||
run: |
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.9
|
||||
cargo test --all --release
|
||||
cargo test --target x86_64-apple-darwin --all --release
|
||||
|
||||
|
||||
- name: "Package"
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
runs-on: "macos-latest"
|
||||
runs-on: "macos-11.0"
|
||||
|
||||
steps:
|
||||
- name: "checkout repo"
|
||||
@@ -44,6 +44,15 @@ jobs:
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
- name: "Install Rust (ARM)"
|
||||
shell: bash
|
||||
run: |
|
||||
export BUILD_REASON=Schedule
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.9
|
||||
rustup target add aarch64-apple-darwin
|
||||
|
||||
|
||||
|
||||
- name: "Install System Deps"
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -53,12 +62,21 @@ jobs:
|
||||
|
||||
|
||||
|
||||
- name: "Build (Release mode)"
|
||||
- name: "Build (Release mode Intel)"
|
||||
shell: bash
|
||||
run: |
|
||||
export BUILD_REASON=Schedule
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.9
|
||||
cargo build --all --release
|
||||
cargo build --target x86_64-apple-darwin --all --release
|
||||
|
||||
|
||||
|
||||
- name: "Build (Release mode ARM)"
|
||||
shell: bash
|
||||
run: |
|
||||
export BUILD_REASON=Schedule
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.9
|
||||
cargo build --target aarch64-apple-darwin --all --release
|
||||
|
||||
|
||||
|
||||
@@ -67,7 +85,7 @@ jobs:
|
||||
run: |
|
||||
export BUILD_REASON=Schedule
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.9
|
||||
cargo test --all --release
|
||||
cargo test --target x86_64-apple-darwin --all --release
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
runs-on: "macos-latest"
|
||||
runs-on: "macos-11.0"
|
||||
|
||||
steps:
|
||||
- name: "checkout repo"
|
||||
@@ -41,6 +41,13 @@ jobs:
|
||||
components: "rustfmt"
|
||||
env:
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
||||
- name: "Install Rust (ARM)"
|
||||
shell: bash
|
||||
run: |
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.9
|
||||
rustup target add aarch64-apple-darwin
|
||||
|
||||
|
||||
- name: "Install System Deps"
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -48,18 +55,25 @@ jobs:
|
||||
./get-deps
|
||||
|
||||
|
||||
- name: "Build (Release mode)"
|
||||
- name: "Build (Release mode Intel)"
|
||||
shell: bash
|
||||
run: |
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.9
|
||||
cargo build --all --release
|
||||
cargo build --target x86_64-apple-darwin --all --release
|
||||
|
||||
|
||||
- name: "Build (Release mode ARM)"
|
||||
shell: bash
|
||||
run: |
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.9
|
||||
cargo build --target aarch64-apple-darwin --all --release
|
||||
|
||||
|
||||
- name: "Test (Release mode)"
|
||||
shell: bash
|
||||
run: |
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.9
|
||||
cargo test --all --release
|
||||
cargo test --target x86_64-apple-darwin --all --release
|
||||
|
||||
|
||||
- name: "Package"
|
||||
|
||||
Reference in new issue
Block a user