Skip to content

Multiarch CI #27

Multiarch CI

Multiarch CI #27

Workflow file for this run

name: Compile secp256k1 native library
on:
pull_request:
branches:
- master
push:
branches:
- trying
- staging
jobs:
compile:
name: Compile secp256k1
strategy:
fail-fast: false
matrix:
include:
# Linux
- name: linux
os: ubuntu-22.04
arch: amd64
- name: linux
os: ubuntu-22.04
arch: aarch64
# MacOS
- name: macos
os: macos-11
arch: amd64
- name: macos
os: macos-11
arch: aarch64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Install dependencies ubuntu
if: matrix.name == 'linux'
run: |
uname -a
sudo apt-get update
sudo apt-get install -y build-essential libtool
sudo apt-get install -y gcc-aarch64-linux-gnu
export DEBIAN_FRONTEND=noninteractive
sudo apt-get install -y openjdk-17-jdk-headless
- name: Install dependencies macos
if: matrix.name == 'macos'
run: |
uname -a
brew install autoconf automake
brew install openjdk@17
echo 'export JAVA_PATH="/usr/local/opt/openjdk@17/libexec/openjdk.jdk:$PATH"' >> /Users/runner/.bash_profile
export CFLAGS="-I$JAVA_PATH/include -I$JAVA_PATH/include/darwin"
- name: Build native code
if: matrix.arch == 'amd64'
run: |
./compile.sh
- name: Build native code - Linux aarch64
if: matrix.name == 'linux' && matrix.arch == 'aarch64'
run: |
./compile.sh
- name: Build native code - MacOS aarch64
if: matrix.name == 'macos' && matrix.arch == 'aarch64'
run: |
./compile.sh
- name: Export artifacts linux
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.name }}-${{ matrix.arch }}
path: ./secp256k1-tmp/.libs/
# Job to notify bors when run is successful. Skipped and cancelled job is considered
# as failure. More info https://github.com/bors-ng/bors-ng/issues/1115.
bors_success:
name: bors build finished
if: ${{ success() }}
needs:
- compile
runs-on: ubuntu-latest
steps:
- run: exit 0