-
Notifications
You must be signed in to change notification settings - Fork 6
92 lines (87 loc) · 3.65 KB
/
nightly.yaml
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
name: nightly
on:
push:
tags:
- "*v*"
schedule:
- cron: "0 18 * * *"
concurrency:
group: nightly
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
lint:
name: lint
# if: ${{ contains(github.event.pull_request.labels.*.name, 'ready-for-testing') && github.event.pull_request.merged != true }}
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.sha }}
- uses: actions/checkout@v4
with:
clean: false
# - name: Check License Header
# uses: apache/skywalking-eyes/header@main
- name: Ensure clang-format is available
run: |
command -v clang-format-14 > /dev/null || (sudo apt-get update && sudo apt-get install -y clang-format-14)
- name: Format check
run: |
git diff -U0 --no-color ${{ github.event.pull_request.base.sha }} HEAD storage/rapid_engine ml | /usr/share/clang/clang-format-14/clang-format-diff.py -p1 | tee /tmp/.clang-format-diff
[ -s /tmp/.clang-format-diff ] && exit 1 || true
build:
needs: lint
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: install_lib
run: |
sudo apt update -y && sudo apt upgrade -y && sudo apt install -y libssl-dev libncurses-dev libudev-dev libbison-dev flex clang-format lcov pkg-config \
cmake zlib1g-dev wget build-essential libldap-dev libisl-dev libmpfr-dev patchelf libevent-dev openssl libssl-dev -y && sudo apt install libsasl2-dev libtirpc-dev -y
- name: install_boost
run: |
cd /tmp && wget https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.gz && \
tar zxvf boost_1_77_0.tar.gz && cd boost_1_77_0 && ./bootstrap.sh --prefix=/usr/local/boost && ./b2 -j$(nproc) && sudo ./b2 install && \
sudo rm /tmp/boost_1_77_0 -rf && sudo rm /tmp/boost_1_77_0.tar.gz
- name: build_shannon_and_install
run: |
cd ${{ github.workspace }}
mkdir cmake_build && cd cmake_build
git config --global --add safe.directory ${{ github.workspace }}
git fetch --tags -f
cmake ../ \
-DWITH_BOOST=/usr/local/boost/include \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/home/shannon-bin/ \
-DMYSQL_DATADIR=/home/shannon-bin/ \
-DSYSCONFDIR=/home/shannon-bin/ \
-DMYSQL_UNIX_ADDR=/home/shannon-bin/temp/mysql.sock \
-DWITH_EMBEDDED_SERVER=OFF \
-DWITH_MYISAM_STORAGE_ENGINE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DMYSQL_TCP_PORT=3306 \
-DENABLED_LOCAL_INFILE=1 \
-DWITH_LIBEVENT=bundled \
-DEXTRA_CHARSETS=all \
-DWITH_PROTOBUF=bundled \
-DDEFAULT_SET=community \
-DWITH_UNIT_TESTS=OFF \
-DWITH_HYPERGRAPH_OPTIMIZER=ON \
-DCOMPILATION_COMMENT="MySQL Community Server, and Shannon Data AI Alpha V.- (GPL)" && make -j5 && \
sudo make install
- name: clean_up_shannonbase_build
run: |
sudo rm /home/ShannonBase/ -rf
- name: run_mtr_test
run: |
sudo mkdir -p /home/shannon-bin/log
sudo chown -R $USER:$USER /home/shannon-bin/
cd /home/shannon-bin/mysql-test/
sudo chmod -R u+rwx mysql-test-run.pl
./mysql-test-run.pl --suite=main,innodb,binlog,binlog_gtid,binlog_nogtid,federated,secondary_engine,rpl,rpl_gtid,rpl_nogtid,funcs_1,funcs_2,\
information_schema,sys_vars,opt_trace \
--big-test --mysqld=--user=$USER --mysqld=--default-storage-engine=innodb --nowarnings --force --nocheck-testcases --retry=3 --parallel=$(nproc)