From ee9b8039aceb6b228996d83dbea3b325ca8a7836 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Wed, 6 Sep 2023 19:24:30 +0200 Subject: [PATCH] update --- .github/workflows/ninja.yml | 66 ++++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ninja.yml b/.github/workflows/ninja.yml index bd6a71e1..ce57f7c1 100644 --- a/.github/workflows/ninja.yml +++ b/.github/workflows/ninja.yml @@ -17,10 +17,10 @@ jobs: - name: install client drivers (macOS) if: contains(matrix.os, 'macos') run : | - HOMEBREW_NO_AUTO_UPDATE=1 brew install mysql-client + HOMEBREW_NO_AUTO_UPDATE=1 brew install mysql-client libpq brew link --force mysql-client - name: configure - run: cmake . + run: cmake . -DWITH_PGSQL=1 - name: build package run: cmake --build . --config Release --target package @@ -50,6 +50,7 @@ jobs: uses: actions/download-artifact@v3 with: name: build-${{ matrix.os }} + - name: chmod +x bin/sysbench shell: bash if: ${{ !contains(matrix.os, 'windows') }} @@ -60,9 +61,8 @@ jobs: - name: install client drivers (macOS) if: contains(matrix.os, 'macos') run : | - HOMEBREW_NO_AUTO_UPDATE=1 brew install mysql-client - brew link --force mysql-client - + HOMEBREW_NO_AUTO_UPDATE=1 brew install pqsql + - name: update environment (Windows) if: contains(matrix.os, 'windows') run: | @@ -129,3 +129,59 @@ jobs: - 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=30 --histogram run + test-postgresql: + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + needs: build + runs-on: ${{ matrix.os }} + env: + COMMON_SYSBENCH_PARAMS: --db-driver=pgsql --pgsql-password=sbtest --time=60 --table-size=100000 --threads=1 --report-interval=1 --histogram + name: Test/${{ matrix.os }}/postgresql + steps: + - name: Download build + uses: actions/download-artifact@v3 + with: + name: build-${{ matrix.os }} + + - name: chmod +x bin/sysbench + shell: bash + if: ${{ !contains(matrix.os, 'windows') }} + run: | + ls -l bin + chmod +x bin/sysbench + + - name: install client drivers (macOS) + if: contains(matrix.os, 'macos') + run : | + HOMEBREW_NO_AUTO_UPDATE=1 brew install mysql-client libpq + + - name: update environment (Windows) + if: contains(matrix.os, 'windows') + run: | + echo "$pwd\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + cat $env:GITHUB_PATH + + - name: update environment (non-Windows) + if: ${{ !contains(matrix.os, 'windows') }} + run: | + echo "$PWD/bin" >> $GITHUB_PATH + cat $GITHUB_PATH + echo "LUA_PATH=$PWD/share/sysbench/?.lua" >> $GITHUB_ENV + + - name: actions-setup-pgsql + uses: ikalnytskyi/action-setup-postgres@v4 + with: + username: sbtest + password: sbtest + database: sbtest + - name: sysbench pgsql oltp_update_index prepare + run: sysbench oltp_update_index ${{ env.COMMON_SYSBENCH_PARAMS }} prepare + - name: sysbench pgsql oltp_point_select run + run: sysbench oltp_point_select ${{ env.COMMON_SYSBENCH_PARAMS }} --threads=10 run + - name: sysbench pgsql oltp_update_index run + run: sysbench oltp_update_index ${{ env.COMMON_SYSBENCH_PARAMS }} run + - name: sysbench pgsql oltp_update_index run 40 threads + run: sysbench oltp_update_index ${{ env.COMMON_SYSBENCH_PARAMS }} --threads=40 run + - name: sysbench oltp_update_index cleanup + run: sysbench oltp_update_index ${{ env.COMMON_SYSBENCH_PARAMS }} cleanup \ No newline at end of file