#3539 File extension in Export Dialog file input is now updated whene… #956
This file contains hidden or 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
| env: | |
| TCL_VERSION: '8.6' | |
| SQLITE_VERSION: '3510200' | |
| PORTABLE_DIR: ${{ github.workspace }}/output/portable/SQLiteStudio | |
| name: Unit tests | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - 3.4 | |
| paths: | |
| - '**.cpp' | |
| - '**.hpp' | |
| - '**.c' | |
| - '**.h' | |
| - '**.pro' | |
| - '**.pri' | |
| - '**.ui' | |
| - '**.qrc' | |
| - '**/tests.yml' | |
| workflow_dispatch: | |
| inputs: | |
| debug_ssh: | |
| description: "Open SSH tunnel at the end" | |
| type: boolean | |
| default: false | |
| debug_on_failure: | |
| description: "Open SSH tunnel if job fails" | |
| type: boolean | |
| default: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| include: | |
| - QT_VERSION: '6.2.4' | |
| PYTHON_VERSION: '3.9' | |
| - QT_VERSION: '6.5.3' | |
| PYTHON_VERSION: '3.9' | |
| - QT_VERSION: '6.8.3' | |
| PYTHON_VERSION: '3.12' | |
| - QT_VERSION: '6.10.2' | |
| PYTHON_VERSION: '3.12' | |
| steps: | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.PYTHON_VERSION }} | |
| architecture: 'x64' | |
| - name: Qt installation dir | |
| id: qt-installation-dir | |
| run: echo "DIR=$(readlink -f ${{ github.workspace }}/..)" >> $GITHUB_OUTPUT | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| cache: true | |
| version: ${{ matrix.QT_VERSION }} | |
| host: 'linux' | |
| dir: '${{ steps.qt-installation-dir.DIR }}' | |
| py7zrversion: '==0.20.*' | |
| setup-python: 'false' | |
| extra: '--external 7z' | |
| - name: Clone GH scripts | |
| uses: actions/checkout@v3 | |
| with: | |
| repository: pawelsalawa/gh-action-scripts | |
| ref: main | |
| path: gh-scripts | |
| - name: Setup GH scripts path | |
| shell: bash | |
| run: | | |
| mv gh-scripts .. | |
| cd .. | |
| chmod +x gh-scripts/scripts/*.sh | |
| echo "GH_SCRIPTS=$(pwd)/gh-scripts/scripts" >> $GITHUB_ENV | |
| echo "DEBUG=${{ inputs.DEBUG }}" >> $GITHUB_ENV | |
| - name: Clone repo | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ env.GITHUB_REF }} | |
| - name: Install SQLite3 | |
| run: | | |
| cd .. | |
| SQLITE_DOT_VERSION=$($GH_SCRIPTS/convert_int_ver.sh $SQLITE_VERSION) | |
| SQLITE3_ZIP=sqlite3-linux-x64-$SQLITE_VERSION.zip | |
| curl -L https://github.com/pawelsalawa/sqlite3-sqls/releases/download/v$SQLITE_DOT_VERSION/$SQLITE3_ZIP --output $SQLITE3_ZIP | |
| sudo rm -f /usr/lib/libsqlite* /usr/local/lib/libsqlite* /usr/include/sqlite* /usr/local/include/sqlite* /usr/lib/x86_64-linux-gnu/libsqlite* | |
| sudo unzip $SQLITE3_ZIP libsqlite3.so -d /usr/local/lib | |
| sudo unzip $SQLITE3_ZIP sqlite3.h sqlite3ext.h -d /usr/local/include | |
| sudo ln -s /usr/local/lib/libsqlite3.so /usr/local/lib/libsqlite3.so.0 | |
| sudo ln -s /usr/local/lib/libsqlite3.so /usr/local/lib/libsqlite3.so.0.8.6 | |
| ls -l /usr/local/lib/libsqlite3* | |
| ls -l /usr/local/include/sqlite* | |
| - name: Install Tcl | |
| run: sudo apt-get install -qq libtcl$TCL_VERSION tcl$TCL_VERSION-dev | |
| - name: Install other tools/dependencies | |
| run: | | |
| sudo apt install libreadline-dev libncurses5-dev | |
| echo "${{ github.workspace }}/../Qt/${{ matrix.QT_VERSION }}/gcc_64/bin" >> $GITHUB_PATH | |
| - name: Prepare output dir | |
| run: mkdir output output/build output/build-plugins | |
| - name: Compile SQLiteStudio3 | |
| working-directory: output/build | |
| run: | | |
| cmake ../../SQLiteStudio3 -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=Debug \ | |
| -DCMAKE_PREFIX_PATH="${{ env.QT_ROOT_DIR }}" \ | |
| -DCMAKE_INSTALL_PREFIX=../SQLiteStudio \ | |
| -DWITH_PORTABLE=1 \ | |
| -DWITH_UPDATER=1 \ | |
| -DBUILD_TESTING=1 | |
| cmake --build . --verbose | |
| cmake --install . --verbose | |
| - name: Compile Plugins | |
| working-directory: output/build-plugins | |
| run: | | |
| cmake ../../Plugins -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=Debug \ | |
| -DCMAKE_PREFIX_PATH="${{ env.QT_ROOT_DIR }}:${{ env.Python3_ROOT_DIR }}" \ | |
| -DCMAKE_INSTALL_PREFIX=../SQLiteStudio \ | |
| -DWITH_PORTABLE=1 \ | |
| -DWITH_DYNAMIC_PYTHON=1 \ | |
| -DWITH_ALL_PLUGINS=1 | |
| cmake --build . --verbose | |
| cmake --install . --verbose | |
| - name: Run tests | |
| working-directory: output/build | |
| run: | | |
| set -x | |
| export LD_LIBRARY_PATH=./lib:${{ env.QT_ROOT_DIR }}/lib:/usr/local/lib | |
| export SQLITESTUDIO_PLUGINS="${{ github.workspace }}/output/build-plugins/SqlEnterpriseFormatter" | |
| ctest --verbose | |
| - name: Install Midnight Commander | |
| if: > | |
| ${{ | |
| github.repository_owner == 'pawelsalawa' | |
| && (inputs.debug_ssh || (failure() && inputs.debug_on_failure)) | |
| }} | |
| run: sudo apt install mc | |
| - name: Setup debugging SSH | |
| if: > | |
| ${{ | |
| github.repository_owner == 'pawelsalawa' | |
| && (inputs.debug_ssh || (failure() && inputs.debug_on_failure)) | |
| }} | |
| uses: owenthereal/action-upterm@v1 | |
| with: | |
| wait-timeout-minutes: 10 |