Skip to content

Commit

Permalink
Build darwin version on arm
Browse files Browse the repository at this point in the history
  • Loading branch information
ed-asriyan committed May 26, 2024
1 parent 81dafab commit 327c653
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
description: Name of artifact as which Darwin executable to be uploaded
required: true
type: string
arch:
description: "amd64 or arm64"
required: true
type: string
version:
description: Version to replace with
required: false
Expand All @@ -15,7 +19,7 @@ on:
jobs:
build-darwin:
name: Build MacOS executable
runs-on: macos-13
runs-on: ${{ inputs.arch == 'arm64' && 'macos-14' || 'macos-13' }}
steps:
- name: Install Conan
run: pip3 install --break-system-packages conan==2.0.10
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/cd-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@ jobs:
build-darwin:
name: Build Darwin executable
uses: ./.github/workflows/build-darwin.yml
strategy:
matrix:
arch:
- amd64
- arm64
with:
output-artifact-name: lottie-to-png.darwin.amd64
output-artifact-name: lottie-to-png.darwin.${{ matrix.arch }}
arch: ${{ matrix.arch }}
version: ${{ github.ref_name }}

build-windows:
Expand Down Expand Up @@ -141,6 +147,7 @@ jobs:
- linux.amd64
- linux.arm64
- darwin.amd64
- darwin.arm64
- windows.amd64.exe
env:
filename: lottie-converter.${{ matrix.file }}.zip
Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/ci-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,28 @@ jobs:
build-darwin:
name: Build Darwin executable
uses: ./.github/workflows/build-darwin.yml
strategy:
matrix:
arch:
- amd64
- arm64
with:
output-artifact-name: lottie-to-png.darwin.amd64
output-artifact-name: lottie-to-png.darwin.${{ matrix.arch }}
arch: ${{ matrix.arch }}

test-darwin:
name: Test on Darwin
needs: build-darwin
uses: ./.github/workflows/test-darwin.yml
strategy:
matrix:
arch:
- amd64
- arm64
with:
input-artifact-name: lottie-to-png.darwin.amd64
output-artifact-name: test-results.darwin
input-artifact-name: lottie-to-png.darwin.${{ matrix.arch }}
output-artifact-name: test-results.darwin.${{ matrix.arch }}
arch: ${{ matrix.arch }}

build-windows:
name: Build Windows executable
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: Test on Darwin
on:
workflow_call:
inputs:
arch:
description: "amd64 or arm64"
required: true
type: string
input-artifact-name:
description: Name of artifact as which Darwin executable is uploaded
required: true
Expand All @@ -15,7 +19,7 @@ on:
jobs:
test-darwin:
name: Test on Darwin
runs-on: macos-13
runs-on: ${{ inputs.arch == 'arm64' && 'macos-14' || 'macos-13' }}
strategy:
matrix:
case:
Expand Down

0 comments on commit 327c653

Please sign in to comment.