-
Notifications
You must be signed in to change notification settings - Fork 3
141 lines (137 loc) · 6.04 KB
/
test-pr.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
name: 'Run Tests'
on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
simple-tests:
runs-on: [self-hosted, linux, normal]
name: 'Simple Tests'
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.JENKINS_GITHUB_PAT }}
- name: Checkout submodules
env:
GITHUB_TOKEN: ${{ secrets.JENKINS_GITHUB_PAT }}
run: |
# https://gist.github.com/taoyuan/bfa3ff87e4b5611b5cbe ; for a repository we don't control the submodules over.
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://
git submodule update --init --recursive
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
container-name: elrond-semantics-ci-${{ github.sha }}
- name: 'Build'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make build RELEASE=true -j4'
- name: 'Run Python Unit Tests'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make TEST_CONCRETE_BACKEND=llvm unittest-python'
- name: 'Run Simple Test'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make TEST_CONCRETE_BACKEND=llvm test-simple -j6'
- name: 'Run Mandos Tests'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make TEST_CONCRETE_BACKEND=llvm mandos-test -j6'
- name: 'Tear down Docker'
if: always()
run: |
docker stop --time=0 elrond-semantics-ci-${GITHUB_SHA}
feature-tests:
runs-on: [self-hosted, linux, normal]
name: 'Feature Tests'
needs: [simple-tests]
timeout-minutes: 120
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.JENKINS_GITHUB_PAT }}
- name: Checkout submodules
env:
GITHUB_TOKEN: ${{ secrets.JENKINS_GITHUB_PAT }}
run: |
# https://gist.github.com/taoyuan/bfa3ff87e4b5611b5cbe ; for a repository we don't control the submodules over.
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://
git submodule update --init --recursive
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
container-name: elrond-semantics-ci-${{ github.sha }}
- name: 'Build'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make build RELEASE=true -j4'
- name: 'Run Basic Feature Test'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make TEST_CONCRETE_BACKEND=llvm test-elrond-basic-features -j6'
- name: 'Run Alloc Feature Test'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make TEST_CONCRETE_BACKEND=llvm test-elrond-alloc-features -j6'
- name: 'Tear down Docker'
if: always()
run: |
docker stop --time=0 elrond-semantics-ci-${GITHUB_SHA}
example-contract-tests:
runs-on: [self-hosted, linux, normal]
name: 'Example Contract Tests'
needs: [feature-tests]
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.JENKINS_GITHUB_PAT }}
- name: Checkout submodules
env:
GITHUB_TOKEN: ${{ secrets.JENKINS_GITHUB_PAT }}
run: |
# https://gist.github.com/taoyuan/bfa3ff87e4b5611b5cbe ; for a repository we don't control the submodules over.
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://
git submodule update --init --recursive
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
container-name: elrond-semantics-ci-${{ github.sha }}
- name: 'Build'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make build RELEASE=true -j4'
- name: 'Run Adder Contract Test'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make TEST_CONCRETE_BACKEND=llvm test-elrond-adder'
- name: 'Run Crowdfunding ESDT Contract Test'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make TEST_CONCRETE_BACKEND=llvm test-elrond-crowdfunding-esdt'
- name: 'Run Multisig Contract Test'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make TEST_CONCRETE_BACKEND=llvm test-elrond-multisig'
- name: 'Tear down Docker'
if: always()
run: |
docker stop --time=0 elrond-semantics-ci-${GITHUB_SHA}
custom-contract-tests:
runs-on: [self-hosted, linux, normal]
name: 'Custom Contract Tests'
needs: [feature-tests]
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.JENKINS_GITHUB_PAT }}
- name: Checkout submodules
env:
GITHUB_TOKEN: ${{ secrets.JENKINS_GITHUB_PAT }}
run: |
# https://gist.github.com/taoyuan/bfa3ff87e4b5611b5cbe ; for a repository we don't control the submodules over.
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://
git submodule update --init --recursive
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
container-name: elrond-semantics-ci-${{ github.sha }}
- name: 'Build'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make build RELEASE=true -j4'
- name: 'Run Custom Contract Tests'
run: docker exec -t elrond-semantics-ci-${GITHUB_SHA} /bin/bash -c 'make TEST_CONCRETE_BACKEND=llvm test-custom-contracts'
- name: 'Tear down Docker'
if: always()
run: |
docker stop --time=0 elrond-semantics-ci-${GITHUB_SHA}