Skip to content

disable blake tests on arm64 #186

disable blake tests on arm64

disable blake tests on arm64 #186

Workflow file for this run

name: Build and publish
on:
pull_request:
push:
branches:
- main
jobs:
native-build-linux-x86-64:
runs-on: ubuntu-20.04
env:
SKIP_GRADLE: true
steps:
- name: Prepare
run: |
# secp256k1 dependencies
sudo apt-get update
sudo apt upgrade -y
sudo apt-get install -y autoconf build-essential libtool automake patchelf
sudo apt autoremove -y
# golang dependencies
wget https://go.dev/dl/go1.20.2.linux-amd64.tar.gz
echo "4eaea32f59cde4dc635fbc42161031d13e1c780b87097f4b4234cfce671f1768 go1.20.2.linux-amd64.tar.gz" | sha256sum -c || exit 1
tar -xzf go1.20.2.linux-amd64.tar.gz
export GOROOT=$(pwd)/go
export PATH=$GOROOT/bin:$PATH
# rust dependencies
export CARGO_HOME="$HOME/.cargo"
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.68.2
- name: Checkout Repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build
run: ./build.sh
- uses: actions/[email protected]
with:
name: altbn128 native build artifacts
path: altbn128/build/
- uses: actions/[email protected]
with:
name: arithmetic native build artifacts
path: arithmetic/build/
- uses: actions/[email protected]
with:
name: blake2bf native build artifacts
path: blake2bf/build/
- uses: actions/[email protected]
with:
name: bls12-381 native build artifacts
path: bls12-381/build/
- uses: actions/[email protected]
with:
name: secp256k1 native build artifacts
path: secp256k1/build/
- uses: actions/[email protected]
with:
name: secp256r1 native build artifacts
path: secp256r1/besu-native-ec/release/
- uses: actions/[email protected]
with:
name: ipa-multipoint native build artifacts
path: ipa-multipoint/build/
- uses: actions/[email protected]
with:
name: gnark native build artifacts
path: gnark/build/
native-build-linux-arm64:
runs-on: [self-hosted, Linux, ARM64]
env:
SKIP_GRADLE: true
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build
run:
docker run -e SKIP_GRADLE=$SKIP_GRADLE -v $(pwd):/home/ubuntu ubuntu:20.04 /home/ubuntu/native-build.sh
- uses: actions/[email protected]
with:
name: altbn128 native build artifacts
path: altbn128/build/
- uses: actions/[email protected]
with:
name: arithmetic native build artifacts
path: arithmetic/build/
- uses: actions/[email protected]
with:
name: blake2bf native build artifacts
path: blake2bf/build/
- uses: actions/[email protected]
with:
name: bls12-381 native build artifacts
path: bls12-381/build/
- uses: actions/[email protected]
with:
name: secp256k1 native build artifacts
path: secp256k1/build/
- uses: actions/[email protected]
with:
name: secp256r1 native build artifacts
path: secp256r1/besu-native-ec/release/
- uses: actions/[email protected]
with:
name: ipa-multipoint native build artifacts
path: ipa-multipoint/build/
- uses: actions/[email protected]
with:
name: gnark native build artifacts
path: gnark/build/
native-build-macos:
runs-on: macos-11
env:
SKIP_GRADLE: true
steps:
- name: Prepare
run: |
if ! command -v brew &> /dev/null
then
# get pwd for homebrew:
export HOMEBREW_PREFIX=`pwd`/homebrew
# use local homebrew 4.0.26 release, as brew is not available on macstadium:
mkdir $HOMEBREW_PREFIX && curl -L https://github.com/Homebrew/brew/tarball/eff45ef570f265e226f14ce91da72d7a6e7d516a| tar xz --strip 1 -C homebrew
export PATH=$HOMEBREW_PREFIX/bin:$PATH
export HOMEBREW_CELLAR=$HOMEBREW_PREFIX/Cellar
fi
# secp256k1 dependencies
brew install autoconf automake libtool
export HOMEBREW_PATH=`echo $HOMEBREW_CELLAR/autoconf/*/bin/:$HOMEBREW_PATH`
export HOMEBREW_PATH=`echo $HOMEBREW_CELLAR/automake/*/bin/:$HOMEBREW_PATH`
export HOMEBREW_PATH=`echo $HOMEBREW_CELLAR/libtool/*/bin/:$HOMEBREW_PATH`
# gnark dependencies
brew install [email protected] || true
export HOMEBREW_PATH=`echo $HOMEBREW_CELLAR/Cellar/go/1.20.2/bin:$HOMEBREW_PATH`
# rust dependencies
export CARGO_HOME="$HOME/.cargo"
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.68.2
# install both x86 and arm64 toolchains
export PATH="$HOME/.cargo/bin:$PATH"
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-darwin
echo "HOMEBREW_PATH=$HOMEBREW_PATH" >> $GITHUB_ENV
- name: Checkout Repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build
run: |
export HOMEBREW_PATH=${{ env.HOMEBREW_PATH }}
echo $HOMEBREW_PATH
export PATH=$HOMEBREW_PATH:$PATH
echo $PATH
./build.sh
- uses: actions/[email protected]
with:
name: altbn128 native build artifacts
path: altbn128/build/
- uses: actions/[email protected]
with:
name: arithmetic native build artifacts
path: arithmetic/build/
- uses: actions/[email protected]
with:
name: blake2bf native build artifacts
path: blake2bf/build/
- uses: actions/[email protected]
with:
name: bls12-381 native build artifacts
path: bls12-381/build/
- uses: actions/[email protected]
with:
name: secp256k1 native build artifacts
path: secp256k1/build/
- uses: actions/[email protected]
with:
name: secp256r1 native build artifacts
path: secp256r1/besu-native-ec/release/
- uses: actions/[email protected]
with:
name: ipa-multipoint native build artifacts
path: ipa-multipoint/build/
- uses: actions/[email protected]
with:
name: gnark native build artifacts
path: gnark/build/
native-build-m1:
runs-on: [self-hosted, macOS, ARM64, MacStadium]
env:
SKIP_GRADLE: true
steps:
- name: Prepare
run: |
# check for homebrew and install from known sha if it is missing (like on macstadium)
if ! command -v brew &> /dev/null
then
# get pwd for homebrew:
export HOMEBREW_PREFIX=`pwd`/homebrew
# use local homebrew 4.0.26 release, as brew is not available on macstadium:
mkdir $HOMEBREW_PREFIX && curl -L https://github.com/Homebrew/brew/tarball/eff45ef570f265e226f14ce91da72d7a6e7d516a| tar xz --strip 1 -C homebrew
export PATH=$HOMEBREW_PREFIX/bin:$PATH
export HOMEBREW_CELLAR=$HOMEBREW_PREFIX/Cellar
fi
# secp256k1, gnark dependencies
brew install autoconf automake libtool
export HOMEBREW_PATH=`echo $HOMEBREW_CELLAR/autoconf/*/bin/:$HOMEBREW_PATH`
export HOMEBREW_PATH=`echo $HOMEBREW_CELLAR/automake/*/bin/:$HOMEBREW_PATH`
export HOMEBREW_PATH=`echo $HOMEBREW_CELLAR/libtool/*/bin/:$HOMEBREW_PATH`
# gnark dependencies
brew install [email protected] || true
export HOMEBREW_PATH=`echo $HOMEBREW_CELLAR/go/1.20.2/bin:$HOMEBREW_PATH`
# rust dependencies
export CARGO_HOME="$HOME/.cargo"
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.68.2
# install both x86 and arm64 toolchains
export PATH="$HOME/.cargo/bin:$PATH"
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-darwin
echo "HOMEBREW_PATH=$HOMEBREW_PATH" >> $GITHUB_ENV
- name: Checkout Repo
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build
run: |
export HOMEBREW_PATH=${{ env.HOMEBREW_PATH }}
echo $HOMEBREW_PATH
export PATH=$HOMEBREW_PATH:$PATH
echo $PATH
./build.sh
- uses: actions/[email protected]
with:
name: altbn128 native build artifacts
path: altbn128/build/
- uses: actions/[email protected]
with:
name: arithmetic native build artifacts
path: arithmetic/build/
- uses: actions/[email protected]
with:
name: blake2bf native build artifacts
path: blake2bf/build/
- uses: actions/[email protected]
with:
name: bls12-381 native build artifacts
path: bls12-381/build/
- uses: actions/[email protected]
with:
name: secp256k1 native build artifacts
path: secp256k1/build/
- uses: actions/[email protected]
with:
name: secp256r1 native build artifacts
path: secp256r1/besu-native-ec/release/
- uses: actions/[email protected]
with:
name: ipa-multipoint native build artifacts
path: ipa-multipoint/build/
- uses: actions/[email protected]
with:
name: gnark native build artifacts
path: gnark/build/
final-assembly:
runs-on: ubuntu-20.04
needs:
- native-build-macos
- native-build-m1
- native-build-linux-x86-64
- native-build-linux-arm64
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Download altbn128
uses: actions/download-artifact@v3
with:
name: altbn128 native build artifacts
path: altbn128/build/
- name: Download arithmetic
uses: actions/download-artifact@v3
with:
name: arithmetic native build artifacts
path: arithmetic/build/
- name: Download blake2bf
uses: actions/download-artifact@v3
with:
name: blake2bf native build artifacts
path: blake2bf/build/
- name: Download bls12-381
uses: actions/download-artifact@v3
with:
name: bls12-381 native build artifacts
path: bls12-381/build/
- name: Download secp256k1
uses: actions/download-artifact@v3
with:
name: secp256k1 native build artifacts
path: secp256k1/build/
- name: Download secp256r1
uses: actions/download-artifact@v3
with:
name: secp256r1 native build artifacts
path: secp256r1/besu-native-ec/release/
- name: Download ipa-multipoint
uses: actions/download-artifact@v3
with:
name: ipa-multipoint native build artifacts
path: ipa-multipoint/build/
- name: Download gnark
uses: actions/download-artifact@v3
with:
name: gnark native build artifacts
path: gnark/build/
- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 11
cache: gradle
- name: gradle build
uses: gradle/gradle-build-action@v2
with:
arguments: --no-daemon --parallel build --scan
- uses: actions/[email protected]
with:
name: jars
path: altbn128/build/libs
- uses: actions/[email protected]
with:
name: jars
path: arithmetic/build/libs
- uses: actions/[email protected]
with:
name: jars
path: blake2bf/build/libs
- uses: actions/[email protected]
with:
name: jars
path: bls12-381/build/libs
- uses: actions/[email protected]
with:
name: jars
path: secp256k1/build/libs
- uses: actions/[email protected]
with:
name: jars
path: secp256r1/build/libs
- uses: actions/[email protected]
with:
name: jars
path: ipa-multipoint/build/libs
- uses: actions/[email protected]
with:
name: jars
path: gnark/build/libs
- name: gradle publish
uses: gradle/gradle-build-action@v2
if: contains('refs/heads/release-', github.ref) || github.ref == 'refs/heads/main'
env:
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER}}
ARTIFACTORY_KEY: ${{ secrets.BESU_ARTIFACTORY }}
with:
arguments: --no-daemon --parallel publish artifactoryPublish --scan