diff --git a/.github/workflows/ninja.yml b/.github/workflows/ninja.yml index bf407d16..47020f3c 100644 --- a/.github/workflows/ninja.yml +++ b/.github/workflows/ninja.yml @@ -8,24 +8,26 @@ jobs: os: [windows-latest,ubuntu-latest, macos-latest] mysql-distribution: [mysql, mariadb] runs-on: ${{ matrix.os }} - name: Test with ${{ matrix.mysql-distribution }} on ${{ matrix.os }} + name: Build and smoke test on ${{ matrix.mysql-distribution }} on ${{ matrix.os }} + env: + COMMON_SYSBENCH_PARAMS: --mysql-user=root --mysql-socket=/tmp/mysql.sock --time=60 --table-size=100000 --report-interval=1 --histogram steps: - name: Checkout uses: actions/checkout@v3 - uses: seanmiddleditch/gha-setup-ninja@master - - name: install client drivers (macOS only) + - name: install client drivers (macOS) if: contains(matrix.os, 'macos') run : | - HOMEBREW_NO_AUTO_UPDATE=1 brew install mysql-client libpq + HOMEBREW_NO_AUTO_UPDATE=1 brew install mysql-client brew link --force mysql-client - name: configure run: cmake . -GNinja - name: Build - run: cmake --build . + run: cmake --build . --config Release - name: test_install run: | cmake --install . --prefix install_dir - - name: update environment (Windows only) + - name: update environment (Windows) if: contains(matrix.os, 'windows') run: | echo "$pwd\install_dir\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append @@ -44,24 +46,24 @@ jobs: with: distribution: ${{ matrix.mysql-distribution }} my-cnf: | - ${{ matrix.mysql-distribution == 'mysql' && 'innodb_redo_log_capacity' || 'innodb_log_file_size' }}=4G + ${{ matrix.mysql-distribution == 'mysql' && 'innodb_redo_log_capacity' || 'innodb_log_file_size' }}=1G innodb_buffer_pool_size=512MB max_allowed_packet=16MB skip-log-bin loose-enable-named-pipe socket=/tmp/mysql.sock max_connections=1000 - ${{ matrix.mysql-distribution == 'mysql' && '#innodb_max_dirty_pages_pct_lwm' || 'innodb_max_dirty_pages_pct_lwm' }}=1 + innodb_max_dirty_pages_pct_lwm=10 - name: create database sbtest run: mysql -uroot -e "create database sbtest" - name: sysbench oltp_read_write prepare run: sysbench oltp_read_write --mysql-user=root --mysql-host=127.0.0.1 --mysql-port=3306 --table-size=100000 prepare - name: sysbench oltp_point_select run - run: sysbench oltp_point_select --mysql-user=root --mysql-socket=/tmp/mysql.sock --time=30 --table-size=100000 --threads=4 --report-interval=1 --histogram run + run: sysbench oltp_point_select ${{ env.COMMON_SYSBENCH_PARAMS }} --threads=100 run - name: sysbench oltp_update_index run single thread innodb_flush_log_at_trx_commit=1 run: | mysql -uroot -e "set global innodb_flush_log_at_trx_commit=1" - sysbench oltp_update_index --mysql-user=root --mysql-socket=/tmp/mysql.sock --time=60 --table-size=100000 --threads=1 --report-interval=1 --histogram run + sysbench oltp_update_index ${{ env.COMMON_SYSBENCH_PARAMS }} run - name: set global innodb_log_file_buffering=1 if: ${{ matrix.mysql-distribution == 'mariadb' && !contains(matrix.os, 'macos') }} run: | @@ -69,21 +71,21 @@ jobs: - name: sysbench oltp_update_index run single thread innodb_flush_log_at_trx_commit=2 run: | mysql -uroot -e "set global innodb_flush_log_at_trx_commit=2" - sysbench oltp_update_index --mysql-user=root --mysql-socket=/tmp/mysql.sock --time=60 --table-size=100000 --threads=1 --report-interval=1 --histogram run + sysbench oltp_update_index ${{ env.COMMON_SYSBENCH_PARAMS }} run mysql -uroot -e "set global innodb_flush_log_at_trx_commit=1" - name: set global innodb_log_file_buffering=0 if: ${{ matrix.mysql-distribution == 'mariadb' && !contains(matrix.os, 'macos') }} run: | mysql -uroot -e "set global innodb_log_file_buffering=0" - name: sysbench oltp_update_index run 40 threads - run: sysbench oltp_update_index --mysql-user=root --mysql-socket=/tmp/mysql.sock --time=60 --table-size=100000 --threads=40 --report-interval=1 --histogram run + run: sysbench oltp_update_index ${{ env.COMMON_SYSBENCH_PARAMS }} --threads=40 run - name: sysbench oltp cleanup - run: sysbench oltp_read_write --mysql-host=127.0.0.1 --mysql-port=3306 --mysql-user=root cleanup + run: sysbench oltp_read_write ${{ env.COMMON_SYSBENCH_PARAMS }} cleanup - name: fileio seqrewr prepare run: sysbench fileio --file-block-size=4096 --file-test-mode=seqrewr --file-num=1 prepare - name: fileio seqrewr run fdatasync if: ${{ !contains(matrix.os, 'macos') }} - run: sysbench fileio --file-block-size=4096 --file-test-mode=seqrewr --file-fsync-mode=fdatasync --file-fsync-all=on --file-num=1 --report-interval=1 --time=60 --histogram run + run: sysbench fileio --file-block-size=4096 --file-test-mode=seqrewr --file-fsync-mode=fdatasync --file-fsync-all=on --file-num=1 --report-interval=1 --time=30 --histogram run - name: fileio seqrewr run fsync - run: sysbench fileio --file-block-size=4096 --file-test-mode=seqrewr --file-fsync-mode=fsync --file-fsync-all=on --file-num=1 --report-interval=1 --time=60 --histogram run + run: sysbench fileio --file-block-size=4096 --file-test-mode=seqrewr --file-fsync-mode=fsync --file-fsync-all=on --file-num=1 --report-interval=1 --time=30 --histogram run