@@ -12,8 +12,6 @@ name: release-please
12
12
jobs :
13
13
release-please :
14
14
name : Create Release
15
- outputs :
16
- tag-name : ${{ steps.release.outputs.tag_name }}
17
15
runs-on : ubuntu-latest
18
16
steps :
19
17
- name : Run Release Please
@@ -22,144 +20,15 @@ jobs:
22
20
with :
23
21
command : manifest
24
22
25
- build-linux :
26
- name : Build on Linux
27
- runs-on : ubuntu-20.04
28
- needs : [release-please]
29
- if : ${{ needs.release-please.outputs.tag-name }}
30
- steps :
31
- - name : Checkout Code
32
- uses : actions/checkout@v3
33
-
34
- - name : Install bleeding edge cmake
35
- run : |
36
- sudo apt -y remove --purge cmake
37
- sudo snap install cmake --classic
38
-
39
- - name : Create Build Environment
40
- run : |
41
- sudo apt-get update
42
- sudo apt-get -y install ninja-build yarn
43
-
44
- - name : Install Clang16
45
- run : |
46
- wget https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.0/clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz
47
- tar -xvf clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz
48
- sudo cp clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/* /usr/local/bin/
49
- sudo cp -r clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/include/* /usr/local/include/
50
- sudo cp -r clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/lib/* /usr/local/lib/
51
- sudo cp -r clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/share/* /usr/local/share/
52
-
53
- - name : Install yarn
54
- run : |
55
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
56
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
57
- sudo apt -y update && sudo apt -y install yarn
58
- - name : Compile Barretenberg
59
- run : |
60
- cd cpp
61
-
62
- cmake --preset default -DCMAKE_BUILD_TYPE=RelWithAssert
63
- cmake --build --preset default --target bb
64
-
65
- - name : Install WASI-SDK
66
- run : |
67
- cd cpp
68
-
69
- ./scripts/install-wasi-sdk.sh
70
-
71
- - name : Compile Typescript
72
- run : |
73
- cd ts
74
- yarn install && yarn && yarn build
75
-
76
- - name : Tar and GZip barretenberg.wasm
77
- run : tar -cvzf barretenberg.wasm.tar.gz cpp/build-wasm/bin/barretenberg.wasm
78
-
79
- - name : Setup Node.js
80
- uses : actions/setup-node@v2
23
+ - name : Dispatch to publish workflow
24
+ uses : benc-uk/workflow-dispatch@v1
25
+ if : ${{ steps.release.outputs.tag-name }}
81
26
with :
82
- node-version : " 18"
83
- registry-url : " https://registry.npmjs.org"
84
-
85
- - name : Deploy Typescript to NPM
86
- run : |
87
- cd ts
88
- yarn deploy
89
- env :
90
- NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
27
+ workflow : publish.yml
28
+ repo : AztecProtocol/barretenberg
29
+ ref : master
30
+ token : ${{ secrets.GITHUB_TOKEN }}
31
+ inputs : ' { "tag": "${{ steps.release.outputs.tag-name }}", "publish": true }'
91
32
92
- - name : Tar and GZip bb Binary (Ubuntu)
93
- run : tar -cvzf bb-ubuntu.tar.gz cpp/build/bin/bb
94
33
95
- - name : Upload artifacts
96
- uses : actions/upload-artifact@v2
97
- with :
98
- name : release-linux-wasm
99
- path : |
100
- barretenberg.wasm.tar.gz
101
- bb-ubuntu.tar.gz
102
-
103
- build-mac :
104
- name : Build on Mac
105
- runs-on : macos-13
106
- needs : [release-please]
107
- if : ${{ needs.release-please.outputs.tag-name }}
108
- steps :
109
- - name : Checkout
110
- uses : actions/checkout@v3
111
- # We need clang 14.0.3 or higher, as lower versions do not seem
112
- # to be spec conformant. In particular std::span does not seem
113
- # to follow the specifications.
114
- - name : Select Xcode version
115
- run : |
116
- sudo xcode-select -switch /Applications/Xcode_14.3.1.app
117
-
118
- - name : Create Mac Build Environment
119
- run : |
120
- brew install cmake ninja
121
-
122
- - name : Compile Barretenberg
123
- working-directory : cpp
124
- run : |
125
- cmake --preset default -DCMAKE_BUILD_TYPE=RelWithAssert
126
- cmake --build --preset default --target bb
127
-
128
- - name : Package barretenberg artifact
129
- working-directory : cpp/build/bin
130
- run : |
131
- mkdir dist
132
- cp ./bb ./dist/bb
133
- 7z a -ttar -so -an ./dist/* | 7z a -si ./barretenberg-x86_64-apple-darwin.tar.gz
134
-
135
- - name : Upload artifact
136
- uses : actions/upload-artifact@v3
137
- with :
138
- name : barretenberg-x86_64-apple-darwin
139
- path : ./cpp/build/bin/barretenberg-x86_64-apple-darwin.tar.gz
140
- retention-days : 3
141
-
142
- release :
143
- name : Publish
144
- needs : [build-linux, build-mac, release-please]
145
- runs-on : ubuntu-latest
146
- steps :
147
- - name : Download files from Linux Runner
148
- uses : actions/download-artifact@v2
149
- with :
150
- name : release-linux-wasm
151
-
152
- - name : Download files from Mac Runner
153
- uses : actions/download-artifact@v2
154
- with :
155
- name : barretenberg-x86_64-apple-darwin
156
-
157
- - name : Publish to GitHub
158
- uses : softprops/action-gh-release@v1
159
- with :
160
- tag_name : ${{ needs.release-please.outputs.tag-name }}
161
- prerelease : true
162
- files : |
163
- barretenberg.wasm.tar.gz
164
- bb-ubuntu.tar.gz
165
- barretenberg-x86_64-apple-darwin.tar.gz
34
+
0 commit comments