diff options
| author | Benson Muite <bkmgit@users.noreply.github.com> | 2024-11-26 19:32:06 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-26 17:32:06 +0100 |
| commit | df3e412e9b3defadc1f7d21810a88f270bb479ef (patch) | |
| tree | 1516e7367c0e307e88f6f6b97acae4dc52b90f2f | |
| parent | fd1c72ea02be4b5204bb41b84123c6db789a8424 (diff) | |
Add lmde6 32bit build (#3297) (#3298)
| -rw-r--r-- | .github/workflows/build.yml | 101 | ||||
| -rw-r--r-- | bin/build-distribution-archives | 2 | ||||
| -rw-r--r-- | bin/build-linux32-venv | 25 | ||||
| -rwxr-xr-x | bin/build-python | 5 |
4 files changed, 130 insertions, 3 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ae9c6f7..7e5bf341 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,7 +59,7 @@ jobs: # for networkx python -m pip install pandas python -m pip install pyarrow - + python -m pip install pyinstaller # scipy gives us a ELF error when stripped @@ -84,6 +84,98 @@ jobs: with: name: inkstitch-linux path: artifacts + linux32: + # Node required for actions, install follows + # https://github.com/actions/upload-artifact/issues/616 + runs-on: ubuntu-latest + container: + image: linuxmintd/lmde6-i386 + volumes: + - ${{ github.workspace }}:/__e/node20 + steps: + - name: Checkout repository + shell: bash + run: | + ls -lar /__e/node20 && + apt-get update && + apt-get install -y curl && + curl -Lo /tmp/node.tar.gz https://unofficial-builds.nodejs.org/download/release/v20.17.0/node-v20.17.0-linux-x86.tar.gz && + cd /__e/node20 && + tar -x --strip-components=1 -f /tmp/node.tar.gz + - uses: actions/checkout@v4 + with: + submodules: recursive + # Permissions problem that prevents caching + # https://github.com/actions/setup-python/issues/816 + - name: Change ownership of /github/home + run: sudo chown -R $(whoami) /github/home + - name: Replace `node` with an i386 version + shell: bash + run: | + ls -lar /__e/node20 && + curl -Lo /tmp/node.tar.gz https://unofficial-builds.nodejs.org/download/release/v20.17.0/node-v20.17.0-linux-x86.tar.gz && + cd /__e/node20 && + tar -x --strip-components=1 -f /tmp/node.tar.gz + - uses: actions/cache@v4 + id: build-venv-cache + with: + path: virtualenv + key: ${{ runner.os }}-latest-venv-${{ hashFiles('**/bin/build-linux32-venv') }} + restore-keys: | + ${{ runner.os }}-latest-venv- + - name: install os dependencies + shell: bash + run: | + apt-get install -y python3-dev python3-pip pipx ruby-full + gem install fpm + apt-get install -y python3-wheel + apt-get install -y gettext + + # for wxPython + apt-get install -y libnotify4 + apt-get install -y glib-networking libsdl2-dev libsdl2-2.0-0 + + # for PyGObject + apt-get install -y libgirepository1.0-dev libcairo2-dev + + # for shapely + apt-get install -y build-essential libgtk-3-dev libgeos-dev cmake + apt-get install -y gcc g++ gfortran libopenblas-dev liblapack-dev + + # for signing rpm + apt-get install -y rpm + - name: install/build python dependencies + if: steps.build-venv-cache.outputs.cache-hit != 'true' + shell: bash + run: | + bash bin/build-linux32-venv + - name: test + shell: bash + run: | + source virtualenv/bin/activate + echo "${{ env.pythonLocation }}\bin" >> $GITHUB_PATH + pytest + deactivate + - name: Package distributable + shell: bash + run: | + source virtualenv/bin/activate + make dist + deactivate + env: + BUILD: linux32 + INKSTITCH_GPG_KEY: ${{ secrets.INKSTITCH_GPG_KEY }} + - name: Upload artifact + shell: bash + run: | + ls -lar /__e/node20 && + curl -Lo /tmp/node.tar.gz https://unofficial-builds.nodejs.org/download/release/v20.17.0/node-v20.17.0-linux-x86.tar.gz && + cd /__e/node20 && + tar -x --strip-components=1 -f /tmp/node.tar.gz + - uses: actions/upload-artifact@v4 + with: + name: inkstitch-linux32 + path: artifacts windows32: runs-on: windows-2019 steps: @@ -353,7 +445,7 @@ jobs: release: runs-on: ubuntu-latest - needs: [linux, windows32, windows64, macx86, macarm64] + needs: [linux32, linux, windows32, windows64, macx86, macarm64] if: always() steps: - name: determine release info @@ -376,6 +468,11 @@ jobs: with: name: 'inkstitch-linux' path: 'artifacts/' + - name: download linux32 + uses: actions/download-artifact@v4 + with: + name: 'inkstitch-linux32' + path: 'artifacts/' - name: download windows32 uses: actions/download-artifact@v4 with: diff --git a/bin/build-distribution-archives b/bin/build-distribution-archives index 4f4484f3..eec3b011 100644 --- a/bin/build-distribution-archives +++ b/bin/build-distribution-archives @@ -104,7 +104,7 @@ if [ "$BUILD" = "windows" ]; then fi fi -if [ "$BUILD" = "linux" ]; then +if [ "$BUILD" = "linux" ] || [ "$BUILD" = "linux32" ]; then if [[ "$VERSION" =~ ^v[0-9][.0-9]+$ ]]; then VERSION=${VERSION#v} else diff --git a/bin/build-linux32-venv b/bin/build-linux32-venv new file mode 100644 index 00000000..d0b8385a --- /dev/null +++ b/bin/build-linux32-venv @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +set -e +uname -a +python3 --version +python3 -m pip --version +python3 -m pip debug + +python3 -m venv virtualenv +source virtualenv/bin/activate + +virtualenv/bin/pip debug +virtualenv/bin/pip install pycairo +virtualenv/bin/pip install PyGObject + +virtualenv/bin/pip install wxPython + +virtualenv/bin/pip install -r requirements.txt +# for networkx +virtualenv/bin/pip install pandas + +virtualenv/bin/pip install pyinstaller +# scipy gives us an ELF error when stripped +virtualenv/bin/pip uninstall --yes scipy +virtualenv/bin/pip install scipy --no-binary scipy +deactivate diff --git a/bin/build-python b/bin/build-python index 4df27e2d..52226630 100755 --- a/bin/build-python +++ b/bin/build-python @@ -31,6 +31,11 @@ if [ "$BUILD" = "linux" ]; then pyinstaller_args+="--add-binary /lib/x86_64-linux-gnu/libnsl.so.1:. " fi +if [ "$BUILD" = "linux32" ]; then + pyinstaller_args+="--hidden-import gi.repository.Gtk " + pyinstaller_args+="--add-binary /lib/i386-linux-gnu/libcrypt.so.1:. " + pyinstaller_args+="--add-binary /lib/i386-linux-gnu/libnsl.so.1:. " +fi if [ "$BUILD" = "windows" ]; then if [[ "$VERSION" =~ ^v[0-9][.0-9]+$ ]]; then |
