forked from dogecoinfoundation/libdogecoin
-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (107 loc) · 3.69 KB
/
ci.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# this ci pipeline will build, test and publish (can but currently does not) artifacts for linux, win, macosx
name: CI
on:
push:
branches: [ main, "*-dev*" ]
pull_request:
branches: [ main, "*-dev*" ]
jobs:
build:
name: ${{ matrix.name }}
env:
CHECK_DOC: "0"
CCACHE_SIZE: "100M"
CCACHE_TEMPDIR: /tmp/.ccache-temp
CCACHE_COMPRESS: "1"
strategy:
fail-fast: false
matrix:
name:
- armhf-linux
- aarch64-linux
- x86_64-linux-dbg
- x86_64-macos
- x86_64-win
- i686-win
- i686-linux
include:
- name: armhf-linux
host: arm-linux-gnueabihf
os: ubuntu-20.04
packages: g++-arm-linux-gnueabihf
run-tests: true
goal: install
- name: aarch64-linux
host: aarch64-linux-gnu
os: ubuntu-20.04
packages: g++-aarch64-linux-gnu
run-tests: true
goal: install
- name: x86_64-linux-dbg
host: x86_64-unknown-linux-gnu
os: ubuntu-20.04
run-tests: true
dep-opts: "DEBUG=1"
config-opts: "CPPFLAGS=-DDEBUG_LOCKORDER"
goal: install
- name: x86_64-macos
host: x86_64-apple-darwin11
os: ubuntu-20.04
run-tests: true
goal: install
- name: x86_64-win
host: x86_64-w64-mingw32
arch: "i386"
os: ubuntu-20.04
packages: python3 nsis g++-mingw-w64-x86-64 wine64 bc wine-binfmt
postinstall: |
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
sudo update-binfmts --import /usr/share/binfmts/wine
run-tests: true
goal: install
- name: i686-win
host: i686-w64-mingw32
arch: "i386"
os: ubuntu-20.04
packages: python3 nsis g++-mingw-w64-i686 wine-stable bc wine-binfmt
postinstall: |
sudo update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix
sudo update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix
sudo update-binfmts --import /usr/share/binfmts/wine
run-tests: true
goal: install
- name: i686-linux
host: i686-pc-linux-gnu
os: ubuntu-18.04
packages: g++-multilib
run-tests: true
config-opts: "LDFLAGS=-static-libstdc++"
goal: install
runs-on: ${{ matrix.os }}
steps:
- name: add architecture
if: ${{ matrix.arch }}
run: |
sudo dpkg --add-architecture "${{ matrix.arch }}"
- name: install packages
run: |
sudo apt-get update
sudo apt-get install autoconf automake libtool build-essential libevent-dev python3 valgrind
sudo apt-get install ${{ matrix.packages }}
- name: post install
if: ${{ matrix.postinstall }}
run: ${{ matrix.postinstall }}
- name: checkout
uses: actions/checkout@v2
- name: configure libdogecoin
run: |
./autogen.sh
./configure ${{ matrix.config-opts }}
- name: build libdogecoin & test
if: ${{ matrix.run-tests }}
run: |
make check -j"$(getconf _NPROCESSORS_ONLN)" VERBOSE=1 && python3 tooltests.py
- name: python unit tests
run: |
python3 -m unittest bindings/py_wrappers/pytest/address_test.py