Skip to content

Commit

Permalink
Enhance version bump workflow for macOS cross-compilation support. Ad…
Browse files Browse the repository at this point in the history
…ded aarch64-apple-darwin target configuration and updated build steps to conditionally install necessary tools for cross-compilation, improving multi-platform compatibility.
  • Loading branch information
slava-vishnyakov committed Dec 2, 2024
1 parent 0af14fe commit d9a0986
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ jobs:
target: x86_64-apple-darwin
binary_name: borgo-macos-x86_64
src_name: compiler
- os: macos-latest
target: aarch64-apple-darwin
binary_name: borgo-macos-aarch64
src_name: compiler
- os: windows-latest
target: x86_64-pc-windows-msvc
binary_name: borgo-windows-x86_64.exe
Expand Down Expand Up @@ -135,14 +139,18 @@ jobs:
- name: Add Rust target (Unix)
if: runner.os != 'Windows'
run: |
nix develop --command \
rustup target add ${{ matrix.target }}
rustup target add ${{ matrix.target }}
- name: Build release binary (Unix)
if: runner.os != 'Windows'
run: |
nix develop --command \
cargo build --release --target ${{ matrix.target }}
# Install cross-compilation tools if needed
if [[ "${{ matrix.target }}" == "aarch64-apple-darwin" ]]; then
rustup target add aarch64-apple-darwin
fi
# Build using cargo directly for cross-compilation
cargo build --release --target ${{ matrix.target }}
# Build step for Windows
- name: Build release binary (Windows)
Expand Down

0 comments on commit d9a0986

Please sign in to comment.