-
Notifications
You must be signed in to change notification settings - Fork 13
179 lines (157 loc) · 5.92 KB
/
build.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
name: build
on:
push:
branches:
- 26.x
paths-ignore:
- '**/*.md'
pull_request:
paths-ignore:
- 'doc/**'
- 'contrib/**'
- '**/*.md'
jobs:
build:
name: ${{ matrix.name }}
env:
MAKEJOBS: 4
SDK_URL: https://bitcoincore.org/depends-sources/sdks
strategy:
fail-fast: false
matrix:
name:
- linux-32-bit
- linux-64-bit
- windows-64-bit
- macos-64-bit
- linux-arm-32-bit
- linux-arm-64-bit
include:
- name: linux-32-bit
host: i686-pc-linux-gnu
os: ubuntu-20.04
packages: g++-multilib
check-security: false
check-symbols: false
dep-opts: ""
config-opts: "--enable-glibc-back-compat LDFLAGS=-static-libstdc++"
goal: install
- name: linux-64-bit
host: x86_64-pc-linux-gnu
os: ubuntu-20.04
packages: python3
check-security: false
check-symbols: false
dep-opts: ""
config-opts: "--enable-sse2 --enable-glibc-back-compat LDFLAGS=-static-libstdc++"
goal: install
- name: windows-64-bit
host: x86_64-w64-mingw32
arch: "i386"
os: ubuntu-22.04
packages: nsis g++-mingw-w64-x86-64 build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git wine-binfmt wine64 wine32
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
check-security: false
check-symbols: false
dep-opts: ""
config-opts: "--enable-sse2 LDFLAGS=-static-libgcc"
goal: install
- name: macos-64-bit
host: x86_64-apple-darwin
os: ubuntu-22.04
packages: curl bsdmainutils cmake libz-dev python3-setuptools libtinfo5 xorriso
check-security: false
check-symbols: false
dep-opts: ""
config-opts: "--enable-sse2"
goal: deploy
sdk: 12.2-12B45b
- name: linux-arm-32-bit
host: arm-linux-gnueabihf
os: ubuntu-20.04
packages: g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf
check-security: false
check-symbols: false
dep-opts: ""
config-opts: "--enable-glibc-back-compat LDFLAGS=-static-libstdc++"
goal: install
- name: linux-arm-64-bit
host: aarch64-linux-gnu
os: ubuntu-20.04
packages: g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
check-security: false
check-symbols: false
dep-opts: ""
config-opts: "--enable-glibc-back-compat LDFLAGS=-static-libstdc++"
goal: install
runs-on: ${{ matrix.os }}
steps:
- name: Add architecture
if: ${{ matrix.arch }}
run: |
sudo dpkg --add-architecture "${{ matrix.arch }}"
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update -qq
sudo apt-get remove -qq libmono* moby* mono* nginx* php* libgdiplus libpcre2-posix3 libzip4
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install make automake cmake curl g++-multilib libtool binutils-gold bsdmainutils pkg-config python3 patch bison
sudo apt-get install ${{ matrix.packages }}
- name: Post Install
if: ${{ matrix.postinstall }}
run: ${{ matrix.postinstall }}
- name: Checkout
uses: actions/[email protected]
- name: SDK cache
if: ${{ matrix.sdk }}
uses: actions/[email protected]
env:
cache-name: sdk
with:
path: ./depends/sdk-sources
key: ${{ matrix.name }}-${{ env.cache-name }}
- name: Install SDK
if: ${{ matrix.sdk }}
run: |
mkdir -p ./depends/sdk-sources
mkdir -p ./depends/SDKs
curl --location --fail $SDK_URL/Xcode-${{ matrix.sdk }}-extracted-SDK-with-libcxx-headers.tar.gz -o depends/sdk-sources/Xcode-${{ matrix.sdk }}-extracted-SDK-with-libcxx-headers.tar.gz
tar -C depends/SDKs -xzvf depends/sdk-sources/Xcode-${{ matrix.sdk }}-extracted-SDK-with-libcxx-headers.tar.gz
- name: Dependency cache
uses: actions/[email protected]
env:
cache-name: depends
with:
path: ./depends/built
key: ${{ matrix.name }}-${{ env.cache-name }}-${{ hashFiles('depends/packages/*') }}
- name: Build depends
run: |
make -j $MAKEJOBS -C depends HOST=${{ matrix.host }} ${{ matrix.dep-opts }}
- name: Build Blackcoin
run: |
./autogen.sh
./configure --prefix=`pwd`/depends/${{ matrix.host }} ${{ matrix.config-opts }} --enable-reduce-exports || ( cat config.log && false)
make -j $MAKEJOBS ${{ matrix.goal }} || ( echo "Build failure. Verbose build follows." && make ${{ matrix.goal }} V=1 ; false )
- name: Check security
if: ${{ matrix.check-security }}
run: make -C src check-security
- name: Check symbols
if: ${{ matrix.check-symbols }}
run: make -C src check-symbols
- name: Upload artifacts
uses: actions/[email protected]
with:
name: blackmore-${{ github.sha }}-${{ matrix.name }}
path: |
depends/${{ matrix.host }}/bin/blackmore*
dist/Blackmore-Qt.app
if-no-files-found: error
retention-days: 7
- name: Download artifacts
uses: actions/[email protected]
with:
name: blackmore-${{ github.sha }}-${{ matrix.name }}