forked from spaceexpanse/libspex
-
Notifications
You must be signed in to change notification settings - Fork 1
152 lines (147 loc) · 6.32 KB
/
Copy pathbuild-linux.yml
File metadata and controls
152 lines (147 loc) · 6.32 KB
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
name: Build Linux
on:
push:
# branches: [ build,06 ]
# pull_request:
# branches: [ $default-branch ]
branches:
- master
# - /^cirrus.*$/
- dev
# - 0.6.1
# - [0-9]+.[0-9]+*
- '[0-9].[0-9].[0-9]+'
tags:
# - v*
- build
# - v[0-9]+.[0-9]+*
- 'v[0-9].[0-9].[0-9]+'
pull_request:
branches:
- dev
jobs:
linux64:
runs-on: ubuntu-20.04
env:
APT_BASE: ccache
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_SIZE: 500M
CCACHE_COMPRESS: 1
PARAMS_DIR: ${{ github.workspace }}/.spacexpanse-params
defaults:
run:
shell: bash
steps:
- run: echo "NOW=$(date +'%Y%m%d-%H%M')" >> $GITHUB_ENV
#- run: echo $NOW
- uses: actions/cache@v3
with:
path: |
.ccache
.spacexpanse-params
key: x86_64-unknown-linux-gnu-ccache-${{ env.NOW }}
restore-keys: |
x86_64-unknown-linux-gnu-ccache-
- run: |
sudo apt-get update
sudo apt-get upgrade
sudo apt-get -y install build-essential libargtable2-dev libzmq3-dev zlib1g-dev libsqlite3-dev liblmdb-dev libgoogle-glog-dev libgflags-dev libprotobuf-dev protobuf-compiler python3 python-protobuf autoconf autoconf-archive automake cmake git libtool pkg-config libcurl4-openssl-dev libssl-dev libmicrohttpd-dev make
#sudo apt-get install --no-install-recommends --no-upgrade -qq "$APT_BASE" build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3 autoconf-archive
#sudo apt-get install software-properties-common
#sudo apt-add-repository "ppa:ondrej/php" -y
#sudo apt-add-repository "ppa:bitcoin/bitcoin" -y
#sudo apt-add-repository "ppa:deadsnakes/ppa" -y
#sudo apt-get update
#sudo apt-get install --no-install-recommends --no-upgrade -qq "$APT_BASE" git libdb4.8-dev libdb4.8++-dev libminiupnpc-dev libzmq3-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev libboost-program-options-dev
#sudo apt-get install --no-install-recommends --no-upgrade -qq "$APT_BASE" git libstdc++6=11.\* libjsonrpccpp-dev libjsonrpccpp-tools libzmq3-dev zlib1g-dev libsqlite3-dev liblmdb-dev libgoogle-glog-dev libgflags-dev python-protobuf libsecp256k1-dev python3-jsonrpclib-pelix
#curl -O http://archive.ubuntu.com/ubuntu/pool/main/libj/libjsoncpp/libjsoncpp25_1.9.5-3_amd64.deb
#curl -O http://archive.ubuntu.com/ubuntu/pool/main/libj/libjsoncpp/libjsoncpp-dev_1.9.5-3_amd64.deb
#sudo dpkg -i libjsoncpp25_1.9.5-3_amd64.deb
#sudo dpkg -i libjsoncpp-dev_1.9.5-3_amd64.deb
cd ..
git clone https://github.com/bitcoin-core/secp256k1.git
cd secp256k1
./autogen.sh
./configure --disable-tests --disable-benchmark \
--enable-module-recovery
make
sudo make install
cd ..
git clone https://github.com/google/googletest
cd googletest
cmake .
make -j4
sudo make install/strip
cd ..
git clone https://github.com/spacexpanse/eth-utils.git
cd eth-utils
./autogen.sh
./configure
make -j4
sudo make install
cd ..
mkdir jsoncpp && cd jsoncpp
git clone -b 1.9.4 https://github.com/open-source-parsers/jsoncpp .
git config user.email "test@example.com"
git config user.name "Cherry Picker"
git cherry-pick ac2870298ed5b5a96a688d9df07461b31f83e906
cmake . -DJSONCPP_WITH_PKGCONFIG_SUPPORT=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF
make -j4
sudo make install/strip
cd ..
git clone https://github.com/cinemast/libjson-rpc-cpp
cd libjson-rpc-cpp
cmake . -DREDIS_SERVER=NO -DREDIS_CLIENT=NO -DCOMPILE_TESTS=NO -DCOMPILE_EXAMPLES=NO -DWITH_COVERAGE=NO
make -j4
sudo make install/strip
cd ..
git clone -b v4.7.1 https://github.com/zeromq/cppzmq
cd cppzmq
sudo cp zmq.hpp /usr/local/include
sudo ldconfig
- uses: actions/checkout@v2
with:
ref: ${{ github.ref_name }}
- uses: actions/cache@v2
with:
path: |
depends/built
depends/work/build
depends/sdk-sources
depends/x86_64-unknown-linux-gnu
key: ubuntu-18.04-depends-x86_64-unknown-linux-gnu-${{ env.NOW }}
restore-keys: ubuntu-18.04-depends-x86_64-unknown-linux-gnu-
- run: ./autogen.sh
#- run: ./configure --enable-reduce-exports --enable-zmq --enable-glibc-back-compat --with-gui=qt5 LDFLAGS=-static-libstdc++ CPPFLAGS=-DDEBUG_LOCKORDER
- run: ./configure
- run: |
make -j2
#sudo make install # todo: make check /strip
- name: Build project # This would actually build your project, using zip for an example artifact
run: |
mkdir -p deploy
cp $GITHUB_WORKSPACE/ships/shipsd $GITHUB_WORKSPACE/ships/ships-channel $GITHUB_WORKSPACE/nonfungible/nonfungibled $GITHUB_WORKSPACE/mover/moverd $GITHUB_WORKSPACE/deploy
#strip $GITHUB_WORKSPACE/deploy/*
zip --junk-paths libspex-bin-${{ github.job }} $GITHUB_WORKSPACE/deploy/*
#zip --junk-paths libspex-bin-${{ github.job }} $GITHUB_WORKSPACE/*
ls -lh
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v.${{ github.ref_name }}.${{ github.run_number }}.rc1
release_name: libspex ${{ github.ref_name }}.${{ github.run_number }}-${{ github.job }}
draft: true
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./libspex-bin-${{ github.job }}.zip
asset_name: libspex-bin-${{ github.job }}.zip
asset_content_type: application/zip