-
Notifications
You must be signed in to change notification settings - Fork 18
95 lines (95 loc) · 3.14 KB
/
ubuntu-2004.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
name: Ubuntu 20.04
on:
push:
branches:
- main
- "release/*"
pull_request:
types: [assigned, opened, synchronize, reopened, labeled]
env:
BUILDER_IMAGE: "guilledk/py-leap:cdt-4.0.1"
jobs:
ubuntu-2004-build:
name: Ubuntu 20.04 | Build
runs-on: ubuntu-20.04
steps:
- name: Download leap-dev
uses: AntelopeIO/asset-artifact-download-action@v3
env:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
owner: AntelopeIO
repo: leap
file: 'leap-dev.*ubuntu20\.04_amd64.deb'
target: 5
prereleases: false
artifact-name: leap-dev-ubuntu20-amd64
container-package: experimental-binaries
token: ${{github.token}}
- name: Install leap-dev
run: |
sudo apt install ./*.deb
rm ./*.deb
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: |
set -e
export DOCKER="docker run --rm -v $(pwd):/root/target ${BUILDER_IMAGE}"
docker pull ${BUILDER_IMAGE}
echo ${DOCKER}
echo =====
mkdir build
${DOCKER} bash -c "cd build && cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=yes .."
echo =====
${DOCKER} bash -c "cd build && make -j $(nproc) VERBOSE=1"
echo =====
tar -pczf build.tar.gz build
echo =====
mkdir built-contracts
cp \
build/contracts/eosio.bios/eosio.bios.abi \
build/contracts/eosio.bios/eosio.bios.wasm \
build/contracts/eosio.msig/eosio.msig.abi \
build/contracts/eosio.msig/eosio.msig.wasm \
build/contracts/eosio.system/.powerup/powup.results.abi \
build/contracts/eosio.system/.rex/rex.results.abi \
build/contracts/eosio.system/eosio.system.abi \
build/contracts/eosio.system/eosio.system.wasm \
build/contracts/eosio.token/eosio.token.abi \
build/contracts/eosio.token/eosio.token.wasm \
build/contracts/eosio.wrap/eosio.wrap.abi \
build/contracts/eosio.wrap/eosio.wrap.wasm \
built-contracts
ls -l built-contracts
- name: Upload build
uses: actions/upload-artifact@v1
with:
name: ubuntu-2004-build
path: build.tar.gz
- name: Upload built contracts
uses: actions/upload-artifact@v1
with:
name: built-contracts
path: built-contracts
ubuntu-2004-parallel-test:
name: Ubuntu 20.04 | Parallel Test
runs-on: ubuntu-20.04
needs: ubuntu-2004-build
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: Download build
uses: actions/download-artifact@v1
with:
name: ubuntu-2004-build
- name: Parallel Test
run: |
set -e
tar -xzf ubuntu-2004-build/build.tar.gz
export DOCKER="docker run --rm -v $(pwd):/root/target ${BUILDER_IMAGE}"
docker pull ${BUILDER_IMAGE}
${DOCKER} bash -c 'cd build/tests && ctest -j $(nproc)'