-
Notifications
You must be signed in to change notification settings - Fork 2.5k
93 lines (80 loc) · 2.42 KB
/
gm.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
name: CI GM
on:
push:
branches: [master]
paths-ignore:
- 'docs/**'
- '**/*.md'
pull_request:
branches: [master]
paths-ignore:
- 'docs/**'
- '**/*.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: false
matrix:
platform:
- ubuntu-20.04
os_name:
- linux_openresty_tongsuo
test_dir:
- t/gm
runs-on: ${{ matrix.platform }}
timeout-minutes: 90
env:
SERVER_NAME: ${{ matrix.os_name }}
OPENRESTY_VERSION: default
steps:
- name: Check out code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache deps
uses: actions/cache@v4
env:
cache-name: cache-deps
with:
path: deps
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.os_name }}-${{ hashFiles('apisix-master-0.rockspec') }}
- name: Cache Tongsuo compilation
id: cache-tongsuo
uses: actions/cache@v4
env:
cache-name: cache-tongsuo
with:
path: ./tongsuo
# TODO: use a fixed release once they have created one.
# See https://github.com/Tongsuo-Project/Tongsuo/issues/318
key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.os_name }}-tongsuo-ver
- name: Test SSL Env
id: test_ssl_env
shell: bash
if: steps.cache-tongsuo.outputs.cache-hit != 'true'
run: |
echo "compile_tongsuo=true" >>$GITHUB_OUTPUT
- name: Linux launch common services
run: |
make ci-env-up project_compose_ci=ci/pod/docker-compose.common.yml
sudo ./ci/init-common-test-service.sh
- name: Linux Before install
env:
COMPILE_TONGSUO: ${{ steps.test_ssl_env.outputs.compile_tongsuo }}
run: |
sudo --preserve-env=COMPILE_TONGSUO \
./ci/${{ matrix.os_name }}_runner.sh before_install
- name: Linux Do install
run: |
sudo --preserve-env=OPENRESTY_VERSION \
./ci/${{ matrix.os_name }}_runner.sh do_install
- name: Linux Script
env:
TEST_FILE_SUB_DIR: ${{ matrix.test_dir }}
run: |
sudo -E ./ci/${{ matrix.os_name }}_runner.sh script