-
Notifications
You must be signed in to change notification settings - Fork 295
75 lines (67 loc) · 2.19 KB
/
ci-mac.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: CI (Mac)
on:
push:
branches:
- master
- '*/*mac-build'
jobs:
build-mac-intel:
name: Build on Mac x86_64-apple-darwin
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ inputs.tag || env.GITHUB_REF }}
- name: Create Mac Build Environment
run: brew install cmake ninja llvm@16
- name: Compile Barretenberg
working-directory: barretenberg/cpp
run: |
export PATH="/usr/local/opt/llvm@16/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/llvm@16/lib"
export CPPFLAGS="-I/usr/local/opt/llvm@16/include"
cmake -DCMAKE_BUILD_TYPE=RelWithAssert --preset default
cmake --build --preset default --target bb
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 --preset default -DCMAKE_BUILD_TYPE=RelWithAssert
cmake --build --preset default --target bb
build-check:
name: Check builds are successful
needs: [build-mac-intel, build-mac-m1]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Report overall success
env:
FAIL: ${{ contains(needs.*.result, 'failure') }}
run: |
if [[ $FAIL == true ]]; then
echo "At least one job failed, release is unsuccessful."
exit 1
else
echo "All jobs succeeded, uploading artifacts to release."
exit 0
fi
- name: Send notification to aztec3-ci channel if workflow failed on master
if: ${{ failure() }}
uses: slackapi/[email protected]
with:
payload: |
{
"url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFY_WORKFLOW_TRIGGER_URL }}