Skip to content

fix: align bbmalloc implementations (#1513) #97

fix: align bbmalloc implementations (#1513)

fix: align bbmalloc implementations (#1513) #97

on:
push:
branches:
- master
permissions:
contents: write
pull-requests: write
name: release-please
jobs:
release-please:
name: Create Release
outputs:
tag-name: ${{ steps.release.outputs.tag_name }}
runs-on: ubuntu-latest
steps:
- name: Run Release Please
id: release
uses: google-github-actions/release-please-action@v3
with:
command: manifest
build-linux:
name: Build on Linux
runs-on: ubuntu-20.04
needs: [release-please]
if: ${{ needs.release-please.outputs.tag-name }}
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install bleeding edge cmake
run: |
sudo apt -y remove --purge cmake
sudo snap install cmake --classic
- name: Create Build Environment
run: |
sudo apt-get update
sudo apt-get -y install clang ninja-build yarn
- name: Install yarn
run: |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt -y update && sudo apt -y install yarn
- name: Compile Barretenberg
run: |
cd cpp
cmake --preset default -DCMAKE_BUILD_TYPE=RelWithAssert
cmake --build --preset default --target bb
- name: Install WASI-SDK
run: |
cd cpp
./scripts/install-wasi-sdk.sh
- name: Compile Typescript
run: |
cd ts
yarn install && yarn && yarn build
- name: Checkout destination repository
uses: actions/checkout@v3
with:
repository: AztecProtocol/dev-bb.js
path: ./dev-bb.js
token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
- name: Push to destination repository
run: |
cd ./dev-bb.js
cp -R ../ts/dest/* .
git config --global user.name AztecBot
git config --global user.email [email protected]
git checkout -b dev || git checkout dev
git add .
git commit -m "Tracking changes"
git push origin dev
- name: Tar and GZip barretenberg.wasm
run: tar -cvzf barretenberg.wasm.tar.gz cpp/build-wasm/bin/barretenberg.wasm
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "18"
registry-url: "https://registry.npmjs.org"
- name: Deploy Typescript to NPM
run: |
cd ts
yarn deploy
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Tar and GZip bb Binary (Ubuntu)
run: tar -cvzf bb-ubuntu.tar.gz cpp/build/bin/bb
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: release-linux-wasm
path: |
barretenberg.wasm.tar.gz
bb-ubuntu.tar.gz
build-mac:
name: Build on Mac
runs-on: macos-13
needs: [release-please]
if: ${{ needs.release-please.outputs.tag-name }}
steps:
- name: Checkout
uses: actions/checkout@v3
# We need clang 14.0.3 or higher, as lower versions do not seem
# to be spec conformant. In particular std::span does not seem
# to follow the specifications.
- name: Select Xcode version
run: |
sudo xcode-select -switch /Applications/Xcode_14.3.1.app
- name: Create Mac Build Environment
run: |
brew install cmake ninja
- name: Compile Barretenberg
working-directory: cpp
run: |
cmake --preset default -DCMAKE_BUILD_TYPE=RelWithAssert
cmake --build --preset default --target bb
- name: Package barretenberg artifact
working-directory: 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: ./cpp/build/bin/barretenberg-x86_64-apple-darwin.tar.gz
retention-days: 3
release:
name: Publish
needs: [build-linux, build-mac, release-please]
runs-on: ubuntu-latest
steps:
- name: Download files from Linux Runner
uses: actions/download-artifact@v2
with:
name: release-linux-wasm
- name: Download files from Mac Runner
uses: actions/download-artifact@v2
with:
name: barretenberg-x86_64-apple-darwin
- name: Publish to GitHub
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.release-please.outputs.tag-name }}
prerelease: true
files: |
barretenberg.wasm.tar.gz
bb-ubuntu.tar.gz
barretenberg-x86_64-apple-darwin.tar.gz