test(mtr): add mtrs #422
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ShannonBase Compile & MTR | |
on: | |
push: | |
branches-ignore: | |
- main | |
paths-ignore: | |
- 'Docs/**' | |
- 'docs/**' | |
- 'website/**' | |
- '**.md' | |
- 'scripts/setup/**' | |
- '.devcontainer/**' | |
- '.github/ISSUE_TEMPLATE/**' | |
pull_request: | |
# branches-ignore: | |
# - main | |
# wait for mergify to ignore | |
paths-ignore: | |
- 'Docs/**' | |
- 'docs/**' | |
- 'website/**' | |
- '**.md' | |
- '.github/ISSUE_TEMPLATE/**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
PROTOC: protoc | |
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 | |
#sed -i '61s/^/#/' cmake_install.cmake to disable can not find openssl_executeable error. removes it when it fixed. | |
- 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 \ | |
--mysqld=--user=$USER --mysqld=--default-storage-engine=innodb --nowarnings --force --nocheck-testcases --retry=3 --parallel=$(nproc) |