Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Switch to macos-14 for m1 runners #3456

Merged
merged 10 commits into from
Jan 31, 2024
49 changes: 35 additions & 14 deletions .github/workflows/publish-bb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,9 @@ jobs:
./barretenberg/cpp/build-wasm/bin/barretenberg.wasm.tar.gz
./barretenberg/cpp/build-wasm/bin/acvm_backend.wasm.tar.gz

build-mac:
name: Build on Mac (${{ matrix.target }})
build-mac-intel:
name: Build on Mac x86_64-apple-darwin
runs-on: macos-13
strategy:
matrix:
target: [x86_64-apple-darwin, aarch64-apple-darwin]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -154,37 +151,61 @@ jobs:
- name: Create Mac Build Environment
run: brew install cmake ninja

- name: Compile Barretenberg (x86_64)
if: matrix.target == 'x86_64-apple-darwin'
- name: Compile Barretenberg
working-directory: barretenberg/cpp
run: |
cmake --preset default -DCMAKE_BUILD_TYPE=RelWithAssert
cmake --build --preset default --target bb

- name: Compile Barretenberg (ARM)
if: matrix.target == 'aarch64-apple-darwin'
- name: Package barretenberg artifact
working-directory: barretenberg/cpp/build/bin
run: |
mkdir dist
cp ./bb ./dist/bb
7z a -ttar -so -an ./dist/* | 7z a -si ./barretenberg-x86_64-apple-darwin.tar.gz

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: barretenberg-x86_64-apple-darwin
path: ./barretenberg/cpp/build/bin/barretenberg-x86_64-apple-darwin.tar.gz
retention-days: 3

build-mac-m1:
name: Build on Mac aarch64-apple-darwin
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ inputs.tag || env.GITHUB_REF }}

- name: Create Mac Build Environment
run: brew install cmake ninja

- name: Compile Barretenberg
working-directory: barretenberg/cpp
run: |
cmake --toolchain ./cmake/toolchains/aarch64-darwin.cmake --preset default -DCMAKE_BUILD_TYPE=RelWithAssert
cmake --preset default -DCMAKE_BUILD_TYPE=RelWithAssert
cmake --build --preset default --target bb

- name: Package barretenberg artifact
working-directory: barretenberg/cpp/build/bin
run: |
mkdir dist
cp ./bb ./dist/bb
7z a -ttar -so -an ./dist/* | 7z a -si ./barretenberg-${{ matrix.target }}.tar.gz
7z a -ttar -so -an ./dist/* | 7z a -si ./barretenberg-aarch64-apple-darwin.tar.gz

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: barretenberg-${{ matrix.target }}
path: ./barretenberg/cpp/build/bin/barretenberg-${{ matrix.target }}.tar.gz
name: barretenberg-aarch64-apple-darwin
path: ./barretenberg/cpp/build/bin/barretenberg-aarch64-apple-darwin.tar.gz
retention-days: 3

release:
name: Publish
needs: [build-x86_64-linux-gnu, build-mac, build-wasm-ts]
needs: [build-x86_64-linux-gnu, build-mac-intel, build-mac-m1,build-wasm-ts]
runs-on: ubuntu-latest
steps:
- name: Download files from Linux Runner
Expand Down
Loading