mirror of
https://github.com/Quad4-Software/MeshChatX.git
synced 2026-08-18 09:49:09 -04:00
feat(ci): add Rust x86_64-apple-darwin target installation for macOS builds
This commit is contained in:
parent
cacd1f6424
commit
2f5474a153
3 changed files with 37 additions and 0 deletions
4
.github/workflows/build-release.yml
vendored
4
.github/workflows/build-release.yml
vendored
|
|
@ -475,6 +475,10 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
- name: Install Rust x86_64-apple-darwin target (cbor2 x64 slice)
|
||||
if: matrix.label == 'macos'
|
||||
run: bash scripts/ci/github-macos-rust-x64-target.sh
|
||||
|
||||
- name: Install project deps into x64 Python (mac universal cx_Freeze)
|
||||
if: matrix.label == 'macos'
|
||||
env:
|
||||
|
|
|
|||
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
|
@ -121,6 +121,10 @@ jobs:
|
|||
set -euo pipefail
|
||||
arch -x86_64 /usr/local/bin/brew install codec2
|
||||
|
||||
- name: Install Rust x86_64-apple-darwin target (cbor2 x64 slice)
|
||||
if: matrix.label == 'macos'
|
||||
run: bash scripts/ci/github-macos-rust-x64-target.sh
|
||||
|
||||
- name: Install project deps into x64 Python (mac universal cx_Freeze)
|
||||
if: matrix.label == 'macos'
|
||||
env:
|
||||
|
|
|
|||
29
scripts/ci/github-macos-rust-x64-target.sh
Executable file
29
scripts/ci/github-macos-rust-x64-target.sh
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env bash
|
||||
# Rust cross-target for x86_64 macOS wheels built on Apple Silicon CI runners.
|
||||
set -euo pipefail
|
||||
|
||||
if [[ "$(uname -s)" != "Darwin" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! command -v rustup >/dev/null 2>&1; then
|
||||
echo "Installing rustup (minimal stable) for macOS x86_64 cross-builds." >&2
|
||||
curl -sSfL https://sh.rustup.rs -o /tmp/rustup-init.sh
|
||||
sh /tmp/rustup-init.sh -y --profile minimal --default-toolchain stable
|
||||
rm -f /tmp/rustup-init.sh
|
||||
fi
|
||||
|
||||
if [[ -d "${HOME}/.cargo/bin" ]]; then
|
||||
if [[ -n "${GITHUB_PATH:-}" ]]; then
|
||||
echo "${HOME}/.cargo/bin" >> "${GITHUB_PATH}"
|
||||
else
|
||||
export PATH="${HOME}/.cargo/bin:${PATH}"
|
||||
fi
|
||||
fi
|
||||
if [[ -f "${HOME}/.cargo/env" ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
source "${HOME}/.cargo/env"
|
||||
fi
|
||||
|
||||
rustup target add x86_64-apple-darwin
|
||||
rustup show
|
||||
Loading…
Add table
Add a link
Reference in a new issue