-
Notifications
You must be signed in to change notification settings - Fork 8
133 lines (123 loc) · 4.04 KB
/
check_pre-merge_master.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
name: master pre-merge check
on:
push:
branches:
- master
- stable_v*
pull_request:
branches:
- master
- stable_v*
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
GITHUB_ELEMENTS_VERSION: v0.2.3
GITHUB_BITCOIN_VERSION: v0.2.3
GITHUB_DOCKER_IMAGE: ghcr.io/cryptogarageinc/elements-testing
ELEMENTS_ENTRYPOINT_PATH: /github/workspace/.github/workflows/docker/test_entrypoint.sh
BITCOIN_ENTRYPOINT_PATH: /github/workspace/.github/workflows/docker/test_bitcoin_entrypoint.sh
jobs:
cmake-js-build:
name: cmake-js build
timeout-minutes: 50
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, windows-2022, ubuntu-22.04]
node: [20, 22]
exclude:
- os: macos-13
node: 20
- os: macos-13
node: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
timeout-minutes: 2
with:
node-version: ${{ matrix.node }}
cache: 'npm'
cache-dependency-path: package-lock.json
- name: update to npm v8
run: npm i -g npm@8
- name: dump node version
id: node_ver
run: |
export node_ver="$(node --version)"
echo "node_version=$node_ver" >> $GITHUB_OUTPUT
echo "node_version=$node_ver"
shell: bash
- name: node_modules-useCache
uses: actions/cache@v3
id: node_cache
with:
path: node_modules
key: node-${{ runner.os }}-${{ matrix.node }}-${{ steps.node_ver.outputs.node_version }}-${{ hashFiles('**/package-lock.json') }}-0
restore-keys: node-${{ runner.os }}-${{ matrix.node }}-${{ steps.node_ver.outputs.node_version }}-${{ hashFiles('package-lock.json') }}-
- name: npm info
if: steps.node_cache.outputs.cache-hit != 'true'
id: npm_info
run: |
npm --version
echo "temp_npm_cachedir=$(npm config get cache)" >> $GITHUB_OUTPUT
- name: npm_install
if: steps.node_cache.outputs.cache-hit != 'true'
env:
CFDJS_UNUSE_ASSET: true
run: |
npm set progress=false
npm ci
- name: build
if: steps.node_cache.outputs.cache-hit == 'true'
run: npm run cmake_release_parallel
- name: test_all
run: npm run test
- name: example
run: npm run example
- name: elements_example
run: npm run elements_example
- name: lint_check
if: runner.os != 'macOS'
run: npm run lint_all
- name: after_job
run: rm -rf node_modules/cfd-js
shell: bash
continue-on-error: true
bitcoin-e2e-test:
name: bitcoin e2e test
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- name: checkout
uses: actions/checkout@v3
- name: Login GitHub Registry
run: docker login docker.pkg.github.com -u owner -p ${{ secrets.GITHUB_TOKEN }}
- name: Pull image from GitHub Registry
run: docker pull ${{ env.GITHUB_DOCKER_IMAGE }}:${{ env.GITHUB_BITCOIN_VERSION }}
- name: integration test
run: |
docker run -u root -v ${{ github.workspace }}:/github/workspace --entrypoint ${{ env.BITCOIN_ENTRYPOINT_PATH }} ${{ env.GITHUB_DOCKER_IMAGE }}:${{ env.GITHUB_BITCOIN_VERSION }}
elements-e2e-test:
name: elements e2e test
runs-on: ubuntu-22.04
timeout-minutes: 40
steps:
- name: checkout
uses: actions/checkout@v3
- name: Login GitHub Registry
run: docker login docker.pkg.github.com -u owner -p ${{ secrets.GITHUB_TOKEN }}
- name: Pull image from GitHub Registry
run: docker pull ${{ env.GITHUB_DOCKER_IMAGE }}:${{ env.GITHUB_ELEMENTS_VERSION }}
- name: integration test
run: |
docker run -u root -v ${{ github.workspace }}:/github/workspace --entrypoint ${{ env.ELEMENTS_ENTRYPOINT_PATH }} ${{ env.GITHUB_DOCKER_IMAGE }}:${{ env.GITHUB_ELEMENTS_VERSION }}
doxygen-ubuntu:
name: doxygen-ubuntu
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: install_doxygen
run: sudo apt install doxygen graphviz
- name: doxygen_check
run: |
cd doc
doxygen Doxyfile_quiet_all