Skip to content

Commit

Permalink
chore: Switch to macos-14 for m1 runners (AztecProtocol#3456)
Browse files Browse the repository at this point in the history
Please provide a paragraph or two giving a summary of the change,
including relevant motivation and context.

# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [ ] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [ ] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).

---------

Co-authored-by: ludamad <adam.domurad@gmail.com>
  • Loading branch information
kevaundray and ludamad authored Jan 31, 2024
1 parent 26a0d49 commit ca5b6f8
Showing 1 changed file with 35 additions and 14 deletions.
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

0 comments on commit ca5b6f8

Please sign in to comment.