-
Notifications
You must be signed in to change notification settings - Fork 200
131 lines (127 loc) · 3.47 KB
/
ci.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
name: CI
on:
pull_request:
branches:
- trunk
push:
branches:
- trunk
defaults:
run:
shell: bash
env:
BUILD_DIR: x86_64
jobs:
build-release:
name: Build Release Candidate
runs-on: ubuntu-22.04
env:
BUILD_RELEASE: 1
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Build Tools
run: sudo ./scripts/install-build-tools.sh
- name: Setup Local Dependencies
run: ./scripts/setup-dependencies.sh
- name: Build
run: ./scripts/build.sh
lint:
name: Lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Build Tools
run: sudo ./scripts/install-build-tools.sh
- name: Setup Local Dependencies
run: ./scripts/setup-dependencies.sh
- name: Build
run: ./scripts/build.sh
- name: Lint
run: ./scripts/lint.sh
pylint:
name: Pylint
runs-on: ubuntu-22.04
continue-on-error: true
timeout-minutes: 5
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Build Tools
run: sudo ./scripts/install-build-tools.sh
- name: Lint with Pylint
run: ./scripts/pylint.sh
shellcheck:
name: Shellcheck
runs-on: ubuntu-22.04
continue-on-error: true
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install shellcheck
run: |
sudo apt-get update
sudo apt-get install -y shellcheck
- name: Lint with Shellcheck
run: ./scripts/shellcheck.sh -S error --color=auto
unit-and-integration-test:
name: Unit and Integration Tests
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Build Tools
run: sudo ./scripts/install-build-tools.sh
- name: Setup Local Dependencies
run: ./scripts/setup-dependencies.sh
- name: Build
run: ./scripts/build.sh
- name: Run Unit Tests
run: ./scripts/test.sh
- name: Shorten SHA
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- uses: actions/upload-artifact@v4
if: ${{ !env.ACT }}
name: Archive Test Results
with:
name: Test Results for ${{ steps.vars.outputs.sha_short }}
path: |
${{env.BUILD_DIR}}/unit_tests_coverage/output/*
${{env.BUILD_DIR}}/integration_tests_coverage/output/*
retention-days: 7
doxygen:
name: doxygen
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Doxygen
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz
- name: Run Doxygen
run: doxygen Doxyfile
- name: Upload Docs artifacts
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4
with:
name: OpenCBDC Transaction Processor docs for ${{ steps.vars.outputs.sha_short }}
path: ./doxygen_generated/html/*
retention-days: 7