-
Notifications
You must be signed in to change notification settings - Fork 285
171 lines (152 loc) · 5.6 KB
/
Copy pathci.yml
File metadata and controls
171 lines (152 loc) · 5.6 KB
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
---
name: Run CI Tests
on:
push:
branches: ['3.*']
pull_request:
workflow_dispatch:
schedule:
# Run weekly on Sundays at 2 AM UTC
- cron: '0 2 * * 0'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
setup:
runs-on: ubuntu-latest
if: |
github.event_name != 'schedule' ||
github.ref == 'refs/heads/3.4' ||
github.ref == 'refs/heads/3.1' ||
github.ref == 'refs/heads/3.2'
outputs:
matrix: ${{ steps.set-matrix.outputs.final-matrix }}
steps:
- uses: actions/checkout@v4
- id: set-matrix
name: build matrix
uses: mariadb-corporation/connector-ci-build-matrix@main
with:
additional-matrix: '[{"name": "MariaDB 11.4 (local) - windows 2025", "os": "windows-2025", "db-type": "community", "db-tag": "11.4"},{"name": "MariaDB 11.4 32bits (local) - windows 2025", "os": "windows-2025", "db-type": "community", "db-tag": "11.4", "arch": "32"}]'
ci-server:
name: server ${{ matrix.server.version }} test suite ${{ matrix.server.env && format(' {0}', matrix.server.env) || '' }}
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
server:
- version: '11.4'
- version: '11.8'
env: TEST_OPTION=--ps-protocol
steps:
- name: Retrieve server ${{ matrix.server.version }}
shell: bash
run: |
# get latest server
git clone -b ${server_branch} https://github.com/mariadb/server ./workdir-server --depth=1
env:
server_branch: ${{ matrix.server.version }}
- name: Update libmariadb submodule for PR
if: github.event_name == 'pull_request'
shell: bash
run: |
cd ./workdir-server
git submodule update --init --remote libmariadb
cd libmariadb
git fetch origin ${{ github.event.pull_request.head.sha }}
git checkout -qf FETCH_HEAD
- name: Update libmariadb submodule for non-PR
if: github.event_name != 'pull_request'
shell: bash
run: |
cd ./workdir-server
git submodule set-branch -b ${{ github.ref_name }} libmariadb
git submodule sync
git submodule update --init --remote libmariadb
cd libmariadb
git checkout ${{ github.sha }}
- name: install ubuntu/macos requirement
run: |
sudo apt install libio-socket-ssl-perl
- name: Make server
shell: bash
run: |
cd ./workdir-server
git add libmariadb
mkdir bld
cd bld
cmake .. -DPLUGIN_MROONGA=NO -DPLUGIN_ROCKSDB=NO -DPLUGIN_SPIDER=NO -DPLUGIN_TOKUDB=NO
make -j9
- name: Run test suite
shell: bash
run: |
ls -lrt
cd ./workdir-server/bld/mysql-test/
ls -lrt
./mysql-test-run.pl --suite=main,unit ${TEST_OPTION} --parallel=auto --skip-test=session_tracker_last_gtid
env:
TEST_OPTION: ${{ matrix.server.env.TEST_OPTION }}
MYSQL_TEST_HOST: 127.0.0.1
- name: Archive error logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
retention-days: 5
name: log-files-${{ matrix.server.version }}
path: |
${{ github.workspace }}/workdir-server/bld/mysql-test/var/**/log/*.err
ci:
name: ${{ matrix.name }}
needs: setup
timeout-minutes: 50
env:
MYSQL_TEST_HOST: mariadb.example.com
MYSQL_TEST_PORT: 3306
MYSQL_TEST_USER: root
MYSQL_TEST_PASSWD: "heyPassw-!*20oRd"
MYSQL_TEST_DB: testc
strategy:
matrix: ${{ fromJSON(needs.setup.outputs.matrix) }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.continue-on-error || matrix.os == 'macos-latest' }}
steps:
- uses: actions/checkout@v4
- name: Setup Test Environment
id: setup-env
uses: mariadb-corporation/connector-ci-setup@master
with:
node-version: ${{ matrix.node }}
db-type: ${{ matrix.db-type }}
db-tag: ${{ matrix.db-tag }}
test-db-password: ${{ env.MYSQL_TEST_PASSWD }}
test-db-database: ${{ env.MYSQL_TEST_DB }}
test-db-port: ${{ env.MYSQL_TEST_PORT }}
additional-conf: ${{ matrix.additional-conf || '' }}
registry-user: ${{ matrix.db-type == 'enterprise' && secrets.ENTERPRISE_USER || (secrets.DOCKER_TOKEN != '' && secrets.DOCKER_LOGIN || '') }}
registry-password: ${{ matrix.db-type == 'enterprise' && secrets.ENTERPRISE_TOKEN || secrets.DOCKER_TOKEN }}
os: ${{ matrix.os }}
- name: make ubuntu/macos
if: ${{ !startsWith(matrix.os, 'windows') }}
run: |
cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_EXTERNAL_ZLIB=On
make
- name: make windows 64bits
if: ${{ startsWith(matrix.os, 'windows') && (matrix.arch != '32' || !matrix.arch) }}
run: |
cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_CURL=ON -DWITH_MSI=ON
cmake --build . --config RelWithDebInfo
- name: make windows 32bits
if: ${{ startsWith(matrix.os, 'windows') && startsWith(matrix.arch, '32') }}
run: |
cmake -A Win32 . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_CURL=ON -DWITH_MSI=ON
cmake --build . --config RelWithDebInfo
- name: Run test suite
shell: bash
run: |
cd unittest/libmariadb
ctest -V
env:
MARIADB_CC_TEST: 1
MYSQL_TEST_TLS: 0
srv: ${{ matrix.db-type }}
MARIADB_PLUGIN_DIR: ${{ github.workspace }}