-
Notifications
You must be signed in to change notification settings - Fork 9
88 lines (79 loc) · 2.21 KB
/
compile.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
76
77
78
79
80
81
82
83
84
85
86
87
88
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-13
arch: amd64
- name: macos
os: macos-13
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