forked from Chia-Network/bls-signatures
-
Notifications
You must be signed in to change notification settings - Fork 15
106 lines (91 loc) · 3.18 KB
/
build-autotools.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Autotools build for bls-signatures
on: [push, pull_request]
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
config:
- name: ARM 32-bit
os: ubuntu-20.04
host: arm-linux-gnueabihf
arch: armhf
apt_get: gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
arch_packages: libgmp-dev:armhf libsodium-dev:armhf
- name: ARM 64-bit
os: ubuntu-20.04
host: aarch64-linux-gnu
arch: arm64
apt_get: gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
arch_packages: libgmp-dev:arm64 libsodium-dev:arm64
#- name: i686 Linux
# os: ubuntu-20.04
# host: i686-pc-linux-gnu
# arch: armhf
# apt_get: gcc-multilib g++-multilib
# arch_packages: libgmp-dev:i386 libsodium-dev:i386
- name: x86_64 Linux
os: ubuntu-20.04
host: x86_64-unknown-linux-gnu
arch: armhf # dummy arch
apt_get: gcc-multilib g++-multilib
arch_packages: libgmp-dev libsodium-dev
unit_tests: true
- name: x86_64 Linux-latest
os: ubuntu-latest
host: x86_64-unknown-linux-gnu
arch: armhf # dummy arch
apt_get: gcc-multilib g++-multilib
arch_packages: libgmp-dev libsodium-dev
unit_tests: true
- name: x86_64 MacOS
os: macos-11
host: x86_64-apple-darwin20.6.0
brew_install: autoconf automake libtool gmp libsodium
cc: clang
cxx: clang++
unit_tests: true
- name: x86_64 MacOS-latest
os: macos-latest
host: x86_64-apple-darwin20.6.0
brew_install: autoconf automake libtool gmp libsodium
cc: clang
cxx: clang++
unit_tests: true
steps:
- name: Get Source
uses: actions/checkout@v3
- name: Setup Arches
if: matrix.config.arch
uses: ryankurte/action-apt@master
with:
arch: ${{ matrix.config.arch }}
packages: ${{ matrix.config.arch_packages }}
- name: Setup Environment
run: |
if [[ ${{ matrix.config.os }} = ubuntu* ]]; then
sudo apt-get --yes update
sudo apt-get install --no-install-recommends --no-upgrade -qq ${{ matrix.config.apt_get }}
fi
if [[ ${{ matrix.config.os }} = macos* ]]; then
brew install ${{ matrix.config.brew_install }}
fi
- name: Build
run: |
if [[ ${{ matrix.config.os }} = macos* ]]; then
CC=${{ matrix.config.cc }}
CXX=${{ matrix.config.cxx }}
export CC
export CXX
fi
./autogen.sh
./configure --host=${{ matrix.config.host }} || ( cat config.log && false)
make -j2 || ( echo "Build failure. Verbose build follows." && make V=1 ; false )
if [ "${{ matrix.config.unit_tests }}" = "true" ]; then
make -j2 check
fi