-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.cirrus.yml
168 lines (154 loc) · 7.38 KB
/
.cirrus.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
# Attention: if you submit an improvement for a Namecoin Cirrus config, please
# file a GitHub issue about it at the namecoin/meta repo, so that we can make
# sure it propagates to all the other Namecoin repos. Thanks!
task:
name: Lint
container:
image: fedora:latest
cpu: 1
memory: 1G
lint_script:
./testdata/lint.sh
# TODO: Maybe cross-compile for Win32 targets too?
task:
name: Cross-Compile $DISTRO
matrix:
- container:
image: fedora:latest
cpu: 1
memory: 1G
install_script:
- dnf install -y git jq make mingw32-nsis unzip wget
env:
DISTRO: Fedora
NCDNS_LOGGING: "1"
- container:
image: debian:latest
cpu: 1
memory: 1G
install_script:
- apt-get update
- apt-get install -y curl git jq make nsis unzip wget
env:
DISTRO: Debian
# TODO: fetch latest versions of everything
fetch_script:
# TODO: remove this, download ConsensusJ-Namecoin, certinject, Encaya, and generate_nmc_cert like we do everything else.
- mkdir -p build64/artifacts/
- cd build64/artifacts/
# Namecoin Core
- LATEST_NAMECOIN_CORE_VERSION=$(curl https://www.namecoin.org/download/ | grep --only-matching -E 'namecoin-core-[0-9\.]+' | head --lines=1 | grep --only-matching -E '[0-9\.]+')
- curl -o namecoin-win64-setup-unsigned.exe https://www.namecoin.org/files/namecoin-core/namecoin-core-$LATEST_NAMECOIN_CORE_VERSION/namecoin-nc$LATEST_NAMECOIN_CORE_VERSION-win64-setup-unsigned.exe
# ConsensusJ
- curl -o bitcoinj-daemon.jar https://www.namecoin.org/files/ConsensusJ-Namecoin/0.3.2.1/namecoinj-daemon-0.3.2-SNAPSHOT.jar
# Electrum-NMC
- LATEST_ELECTRUM_NMC_VERSION=$(curl https://www.namecoin.org/download/electrum-nmc/version | jq --raw-output .version)
- curl -o electrum-nmc-setup.exe https://www.namecoin.org/files/electrum-nmc/electrum-nmc-$LATEST_ELECTRUM_NMC_VERSION/electrum-nmc-nc$LATEST_ELECTRUM_NMC_VERSION-setup.exe
# certinject
- curl -o certinject--windows_amd64.tar.gz https://api.cirrus-ci.com/v1/artifact/github/namecoin/certinject/Cross-Compile%20Go%20latest/binaries/dist/certinject--windows_amd64.tar.gz
- tar -xaf certinject--windows_amd64.tar.gz
- mv certinject--windows_amd64/bin/certinject.exe ./
- rm -rf certinject--windows_amd64/
# coredns-utils
- curl -o coredns-utils-zsk--windows_amd64.tar.gz https://api.cirrus-ci.com/v1/artifact/github/namecoin/coredns-utils-zsk/Cross-Compile%20Go%20latest%20Modules%20Off/binaries/dist/coredns-utils-zsk--windows_amd64.tar.gz
- tar -xaf coredns-utils-zsk--windows_amd64.tar.gz
- mv coredns-utils-zsk--windows_amd64/bin/coredns-keygen.exe ./
- rm -rf coredns-utils-zsk--windows_amd64/
# Encaya
- curl -o encaya--windows_amd64.tar.gz https://api.cirrus-ci.com/v1/artifact/github/namecoin/encaya/Cross-Compile%20Go%20latest/binaries/dist/encaya--windows_amd64.tar.gz
- tar -xaf encaya--windows_amd64.tar.gz
- mv encaya--windows_amd64/bin/*.exe ./
- rm -rf encaya--windows_amd64/
# generate_nmc_cert
- curl -o generate_nmc_cert--windows_amd64.tar.gz https://api.cirrus-ci.com/v1/artifact/github/namecoin/generate_nmc_cert/Cross-Compile%20Go%20latest/binaries/dist/generate_nmc_cert--windows_amd64.tar.gz
- tar -xaf generate_nmc_cert--windows_amd64.tar.gz
- mv generate_nmc_cert--windows_amd64/bin/*.exe ./
- rm -rf generate_nmc_cert--windows_amd64/
# qlib
- curl -o qlib--windows_amd64.tar.gz https://api.cirrus-ci.com/v1/artifact/github/namecoin/qlib/Cross-Compile%20Go%20latest/binaries/dist/qlib--windows_amd64.tar.gz
- tar -xaf qlib--windows_amd64.tar.gz
- mv qlib--windows_amd64/bin/*.exe ./
- rm -rf qlib--windows_amd64/
# ncdns
- curl -o ncdns--windows_amd64.tar.gz https://api.cirrus-ci.com/v1/artifact/github/namecoin/ncdns/Cross-Compile%20Go%20latest/binaries/dist/ncdns--windows_amd64.tar.gz
- tar -xaf ncdns--windows_amd64.tar.gz
- mv ncdns--windows_amd64/bin/*.exe ./
- rm -rf ncdns--windows_amd64/
# ncp11
- curl -o ncp11.tar.gz https://api.cirrus-ci.com/v1/artifact/github/namecoin/ncp11/Compile%20Go%20latest%20windows%20amd64/binaries/dist/ncp11.tar.gz
- tar -xaf ncp11.tar.gz
# ncprop279
- curl -o ncprop279--windows_amd64.tar.gz https://api.cirrus-ci.com/v1/artifact/github/namecoin/ncprop279/Cross-Compile%20Go%20latest/binaries/dist/ncprop279--windows_amd64.tar.gz
- tar -xaf ncprop279--windows_amd64.tar.gz
- mv ncprop279--windows_amd64/bin/*.exe ./
- rm -rf ncprop279--windows_amd64/
# winsvcwrap
- curl -o winsvcwrap--windows_amd64.tar.gz https://api.cirrus-ci.com/v1/artifact/github/namecoin/winsvcwrap/Cross-Compile%20Go%20latest/binaries/dist/winsvcwrap--windows_amd64.tar.gz
- tar -xaf winsvcwrap--windows_amd64.tar.gz
- mv winsvcwrap--windows_amd64/bin/*.exe ./
- rm -rf winsvcwrap--windows_amd64/
# Python
- LATEST_PYTHON_VERSION=$(curl https://www.python.org/downloads/windows/ | grep "Latest Python 3 Release" | grep --only-matching -E '[0-9]+\.[0-9\.]+')
- mkdir python
- cd python
- curl -o python-embed.zip https://www.python.org/ftp/python/$LATEST_PYTHON_VERSION/python-$LATEST_PYTHON_VERSION-embed-amd64.zip
- unzip python-embed.zip
- rm python-embed.zip
- cd ../
- cd ../../
# Stem
- cd ./artifacts
- git clone -b 1.8.0 https://git.torproject.org/stem.git ./stem-git
- mv ./stem-git/stem ./stem
- rm -rf ./stem-git
# StemNS
- git clone https://github.com/namecoin/stemns.git ./stemns-git
- mv ./stemns-git/stemns.py ./stemns-git/config ./stemns/
- rm -rf ./stemns-git
- cd ../
build_script:
# Tag detection from ncdns-repro
- NCDNS_TAG=$(git ls-remote --tags "https://github.com/namecoin/ncdns.git" | grep -v '\^{}' | awk '{print $2}' | awk -F"/" '{print $3}' | sort -V | tail --lines=1)
# TODO: check for NSIS warnings
- make NCDNS_64BIT=1 NCDNS_PRODVER=$NCDNS_TAG
- mv build64/bin/ncdns-*-win64-install.exe ./ncdns--win64-install.exe
upload_script:
- curl -s -X POST --data-binary @ncdns--win64-install.exe http://$CIRRUS_HTTP_CACHE_HOST/cross_compile_bin_$DISTRO
binaries_artifacts:
path: "ncdns--win64-install.exe"
task:
name: Installation Tests $BUILD_DISTRO
windows_container:
image: cirrusci/windowsservercore:2019
# Don't use minimal CPU/memory since Namecoin Core may eat some.
matrix:
- env:
INSTALL_VCPP: "0"
- env:
INSTALL_VCPP: "1"
vcpp_script:
- choco install -y vcredist140
install_script:
- curl -o ncdns--win64-install.exe http://%CIRRUS_HTTP_CACHE_HOST%/cross_compile_bin_%BUILD_DISTRO%
- SET PATH=%PATH%;%cd%
- powershell -ExecutionPolicy Unrestricted -File "testdata/install.ps1"
matrix:
- env:
BUILD_DISTRO: Fedora
depends_on:
- "Cross-Compile Fedora"
- env:
BUILD_DISTRO: Debian
depends_on:
- "Cross-Compile Debian"
# TODO: GitHub Release Upload
# TODO: Add Windows unit tests
# TODO: "Testing config parsing" from travis.bash
# TODO: Add multiple Go versions to Gox builds and unit tests
# TODO: Add debug stripping and path stripping to Gox for repro builds
# TODO: Re-add darwin/386 for old Go versions where it was supported
# TODO: Fix upload repo for tagged commits (don't use Nightly repo for this)
# TODO: Skip Signify and Release if it's not applicable
# TODO: Signify Nightlies
# TODO: IRC notifications on failure
# TODO: Cron