summaryrefslogtreecommitdiffstats
path: root/.github/workflows/lin_release.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/lin_release.yml')
-rw-r--r--.github/workflows/lin_release.yml169
1 files changed, 143 insertions, 26 deletions
diff --git a/.github/workflows/lin_release.yml b/.github/workflows/lin_release.yml
index b95453c..2f6145a 100644
--- a/.github/workflows/lin_release.yml
+++ b/.github/workflows/lin_release.yml
@@ -1,42 +1,86 @@
env:
QT_VERSION: '5.15.2'
TCL_VERSION: '8.6'
- SQLITE_VERSION: '3350400'
- SQLITE_RELEASE_YEAR: '2021'
+ SQLITE_VERSION: '3410200'
+ SQLITE_RELEASE_YEAR: '2023'
+ PYTHON_VERSION: '3.9'
PORTABLE_DIR: ${{ github.workspace }}/output/portable/SQLiteStudio
+ INSTALLBUILDER_DIR: ../ib
+ INSTALLBUILDER_URL: https://releases.bitrock.com/installbuilder/installbuilder-enterprise-23.1.0-linux-x64-installer.run
name: Linux release build
on:
+ workflow_dispatch:
+ inputs:
+ use_ccache:
+ description: 'Use ccache (for workflow debugging only!)'
+ required: false
+ type: boolean
+ schedule:
+ - cron: '30 3 * * 1' # run at 3:30 AM UTC every Monday
repository_dispatch:
types: [lin_release]
jobs:
build:
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-20.04
steps:
- - name: Cache Qt
- id: cache-qt
- uses: actions/cache@v1
+ - uses: actions/setup-python@v4
with:
- path: ${{ github.workspace }}/../Qt
- key: ${{ runner.os }}-Qt-${{ env.QT_VERSION }}-Linux-Cache
-
+ python-version: ${{ env.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@v2
+ uses: jurplel/install-qt-action@v3
with:
- cached: ${{ steps.cache-qt.outputs.cache-hit }}
+ cache: true
version: ${{ env.QT_VERSION }}
host: 'linux'
- dir: '${{ github.workspace }}/..'
- modules: 'qtscript'
-
+ dir: '${{ steps.qt-installation-dir.DIR }}'
+ aqtversion: '==3.0.*'
+ py7zrversion: '==0.20.*'
+ setup-python: 'false'
+ extra: '--external 7z'
+
+ - name: Install the InstalBuilder
+ shell: bash
+ run: |
+ curl -L ${{ env.INSTALLBUILDER_URL }} --output ib.run
+ chmod +x ib.run
+ ./ib.run --mode unattended --prefix ${{ env.INSTALLBUILDER_DIR }}
+ ${{ env.INSTALLBUILDER_DIR }}/bin/builder --version
+ echo "INSTALLER_SRC_PREFIX=$(pwd)" >> $GITHUB_ENV
+ echo "INSTALLER_BIN_PREFIX=${{ env.PORTABLE_DIR }}" >> $GITHUB_ENV
+
- name: Clone repo
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
ref: ${{ github.event.client_payload.branch }}
+ - name: Pre-download SQLite vanilla sourcecode
+ shell: bash
+ run: |
+ cd ..
+ curl -L http://sqlite.org/$SQLITE_RELEASE_YEAR/sqlite-src-$SQLITE_VERSION.zip --output sqlite-src-$SQLITE_VERSION.zip
+
+ - name: Prepare ccache
+ if: inputs.use_ccache || false
+ uses: hendrikmuhs/ccache-action@v1.2.8
+ with:
+ key: lin_release
+ max-size: "24M"
+
+ - name: Configure ccache
+ if: inputs.use_ccache || false
+ run: |
+ echo "PATH=/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" >> $GITHUB_ENV
+
- name: Install SQLite3
run: |
sudo rm -f /usr/lib/libsqlite* /usr/local/lib/libsqlite* /usr/include/sqlite* /usr/local/include/sqlite* /usr/lib/x86_64-linux-gnu/libsqlite*
@@ -60,29 +104,63 @@ jobs:
sudo cp -P libsqlite3.so* /usr/local/lib/
sudo cp *.h /usr/local/include/
+ - name: Compile additional SQLite3 extensions
+ shell: bash
+ run: |
+ cd ..
+ mkdir ext
+ unzip sqlite-src-$SQLITE_VERSION.zip
+ cd sqlite-src-$SQLITE_VERSION/ext
+ FLAGS="-ldl -Os -fpic -shared -Imisc -I/usr/local/include -L/usr/local/lib -lsqlite3"
+ for f in compress; do
+ echo "gcc misc/$f.c $FLAGS -lz -o ../../ext/$f.so"
+ gcc misc/$f.c $FLAGS -lz -o ../../ext/$f.so
+ done
+ for f in csv decimal eval ieee754 percentile rot13 series sqlar uint uuid zorder; do
+ echo "gcc misc/$f.c $FLAGS -o ../../ext/$f.so"
+ gcc misc/$f.c $FLAGS -o ../../ext/$f.so
+ done
+ for f in icu; do
+ echo "gcc icu/$f.c $FLAGS $(pkg-config --libs --cflags icu-uc icu-io) -o ../../ext/$f.so"
+ gcc icu/$f.c $FLAGS `pkg-config --libs --cflags icu-uc icu-io` -o ../../ext/$f.so
+ done
+ ls -l ../../ext/
+
- 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 patchelf
+ sudo apt install libreadline-dev libncurses5-dev patchelf chrpath
echo "${{ github.workspace }}/../Qt/${{ env.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: |
- qmake CONFIG+=portable ../../SQLiteStudio3
+ qmake \
+ $([ ${{ inputs.use_ccache || false }} = false ] || echo "CONFIG+=ccache") \
+ CONFIG+=portable \
+ ../../SQLiteStudio3
make -j 2
-
+
- name: Compile Plugins
working-directory: output/build/Plugins
run: |
- qmake CONFIG+=portable ../../../Plugins
- make -j 2
-
+ qmake \
+ $([ ${{ inputs.use_ccache || false }} = false ] || echo "CONFIG+=ccache") \
+ CONFIG+=portable \
+ "INCLUDEPATH+=$pythonLocation/include/python$PYTHON_VERSION" "LIBS += -L$pythonLocation/lib" \
+ ../../../Plugins
+ make -j 1
+
+ - name: Copy SQLite extensions to output dir
+ shell: bash
+ run: |
+ cp -R ../ext output/SQLiteStudio/extensions
+
- name: Prepare portable dir
working-directory: output
run: |
@@ -93,6 +171,20 @@ jobs:
working-directory: ${{ env.PORTABLE_DIR }}
run: cp -P /usr/local/lib/libsqlite3.so* lib/
+ - name: Copy SQLCipher's libcrypto to portable dir
+ working-directory: ${{ env.PORTABLE_DIR }}
+ run: |
+ LIBCRYPTO=$(ldd plugins/libDbSqliteCipher.so | grep crypto | awk '{print $3}')
+ REAL_LIBCRYPTO=$(readlink -e $LIBCRYPTO)
+ cp -P $REAL_LIBCRYPTO lib/$(basename -- $LIBCRYPTO)
+
+ - name: Copy Qt's libcrypto and libssl to portable dir (#4577)
+ run: |
+ wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb
+ dpkg-deb -xv libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb .
+ cp ./usr/lib/x86_64-linux-gnu/libssl.so.1.1 ${{ env.PORTABLE_DIR }}/lib/
+ cp ./usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 ${{ env.PORTABLE_DIR }}/lib/
+
- name: Copy Qt to portable dir
working-directory: ${{ env.PORTABLE_DIR }}
run: |
@@ -102,7 +194,7 @@ jobs:
cp -P ${{ env.Qt5_Dir }}/lib/libQt5Gui.so* lib/
cp -P ${{ env.Qt5_Dir }}/lib/libQt5Network.so* lib/
cp -P ${{ env.Qt5_Dir }}/lib/libQt5PrintSupport.so* lib/
- cp -P ${{ env.Qt5_Dir }}/lib/libQt5Script.so* lib/
+ cp -P ${{ env.Qt5_Dir }}/lib/libQt5Qml.so* lib/
cp -P ${{ env.Qt5_Dir }}/lib/libQt5Widgets.so* lib/
cp -P ${{ env.Qt5_Dir }}/lib/libQt5Xml.so* lib/
cp -P ${{ env.Qt5_Dir }}/lib/libQt5Svg.so* lib/
@@ -114,7 +206,7 @@ jobs:
- name: Copy Qt plugins to portable dir
working-directory: ${{ env.PORTABLE_DIR }}
run: |
- mkdir platforms imageformats iconengines printsupport platformthemes
+ mkdir platforms imageformats iconengines printsupport platformthemes platforminputcontexts
cp -P ${{ env.Qt5_Dir }}/plugins/platforms/libqxcb.so platforms/libqxcb.so
cp -P ${{ env.Qt5_Dir }}/plugins/imageformats/libqgif.so imageformats/libqgif.so
cp -P ${{ env.Qt5_Dir }}/plugins/imageformats/libqicns.so imageformats/libqicns.so
@@ -126,6 +218,7 @@ jobs:
cp -P ${{ env.Qt5_Dir }}/plugins/iconengines/libqsvgicon.so iconengines/libqsvgicon.so
cp -P ${{ env.Qt5_Dir }}/plugins/printsupport/libcupsprintersupport.so printsupport/libcupsprintersupport.so
cp -P ${{ env.Qt5_Dir }}/plugins/platformthemes/libqgtk3.so platformthemes/libqgtk3.so
+ cp -P ${{ env.Qt5_Dir }}/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so platforminputcontexts/libcomposeplatforminputcontextplugin.so
- name: Fix dependency paths
working-directory: ${{ env.PORTABLE_DIR }}
@@ -140,6 +233,12 @@ jobs:
chrpath -l sqlitestudiocli
- name: Final preparations for packaging
+ run: |
+ mkdir "${{ env.PORTABLE_DIR }}"/assets
+ cp SQLiteStudio3/guiSQLiteStudio/img/sqlitestudio_256.png "${{ env.PORTABLE_DIR }}"/assets/appicon.png
+ cp SQLiteStudio3/guiSQLiteStudio/img/sqlitestudio.svg "${{ env.PORTABLE_DIR }}"/assets/appicon.svg
+
+ - name: Final preparations for packaging
working-directory: ${{ env.PORTABLE_DIR }}
run: |
cp `ldd sqlitestudiocli | grep readline | awk '{print $3}'` lib/
@@ -160,8 +259,26 @@ jobs:
pwd
ls -l
+ - name: Create installer package
+ shell: bash
+ env:
+ IB_LICENSE: ${{ secrets.INSTALLER_LICENSE }}
+ run: |
+ echo "$IB_LICENSE" > lic.xml
+ ${{ env.INSTALLBUILDER_DIR }}/bin/builder build SQLiteStudio-installer.xml \
+ --license lic.xml \
+ --setvars project.outputDirectory=$(pwd) \
+ --setvars project.version=$SQLITESTUDIO_VERSION
+ ls -l
+
- name: Upload package artifact
uses: actions/upload-artifact@v1
with:
name: sqlitestudio-${{ env.SQLITESTUDIO_VERSION }}.tar.xz
path: output/portable/sqlitestudio-${{ env.SQLITESTUDIO_VERSION }}.tar.xz
+
+ - name: Upload installer artifact
+ uses: actions/upload-artifact@v1
+ with:
+ name: SQLiteStudio-${{ env.SQLITESTUDIO_VERSION }}-linux-x64-installer.run
+ path: SQLiteStudio-${{ env.SQLITESTUDIO_VERSION }}-linux-x64-installer.run