diff options
| author | lambdcalculus <64238778+lambdcalculus@users.noreply.github.com> | 2024-07-07 17:26:56 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-07 22:26:56 +0200 |
| commit | f91be6b99cf113923f1c4ff1a7a60df81af15317 (patch) | |
| tree | 01a6e67bc353873f9bf65d4eb86ca4fe8adcb66a /.github | |
| parent | f59b41fe08b530e44889b1689de54e958ae3cdd2 (diff) | |
Add AppImage CI build (#1005)
* add AppImage CI build
* specify ubuntu 22.04 LTS in CI
* change +x bit
* use tar to preserve permissions
* make folder names nicer in the tar
* clone themes before making tar archive
---------
Co-authored-by: Salanto <62221668+Salanto@users.noreply.github.com>
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/build.yml | 72 |
1 files changed, 58 insertions, 14 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b0fd027e..228a76ff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -109,14 +109,14 @@ jobs: build-linux: needs: formatting-check - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@master with: submodules: recursive - name: Install Qt - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 with: aqtversion: '==3.1.*' version: '6.5.3' @@ -161,11 +161,26 @@ jobs: cmake . -D CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE="${{ github.workspace }}/bin/imageformats/" cmake --build . --config Release + # install plugin + cp plugins/imageformats/libqapng.so ${QT_ROOT_DIR}/plugins/imageformats + - name: Build run: | cmake . cmake --build . --config Release + - name: Clone Themes + uses: actions/checkout@master + with: + repository: AttorneyOnline/AO2-Themes + path: "bin/base/themes" + + - name: Cleanup Themes Checkout + run: | + rm ./bin/base/themes/.gitignore + rm ./bin/base/themes/.gitattributes + rm -r ./bin/base/themes/.git + - name: Deploy Linux shell: bash run: | @@ -173,23 +188,52 @@ jobs: mkdir ./imageformats cp ../qtapng/plugins/imageformats/libqapng.so ./imageformats cp ../scripts/launch.sh . + cp ../README_LINUX.md . chmod +x launch.sh chmod +x Attorney_Online - - name: Clone Themes - uses: actions/checkout@master - with: - repository: AttorneyOnline/AO2-Themes - path: "bin/base/themes" + cd .. + tar --transform='flags=r;s|bin|Attorney_Online|' -cvf Attorney_Online-Dynamic.tar bin - - name: Cleanup Themes Checkout + - name: Create AppImage + shell: bash run: | - rm ./bin/base/themes/.gitignore - rm ./bin/base/themes/.gitattributes - rm -r ./bin/base/themes/.git + # necessary, apparently + sudo apt install libxcb-cursor0 + # from https://github.com/probonopd/go-appimage/blob/master/src/appimagetool/README.md + wget -c https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases/expanded_assets/continuous -O - | grep "appimagetool-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2) + mv appimagetool-*-x86_64.AppImage appimagetool + chmod +x appimagetool + + mkdir -p AppDir/usr/bin + mkdir -p AppDir/usr/lib/plugins/imageformats + mkdir -p AppDir/usr/share/applications + + cp bin/Attorney_Online AppDir/usr/bin + cp bin/lib*.so AppDir/usr/lib + cp scripts/Attorney_Online.desktop AppDir/usr/share/applications + cp data/logo-client.png AppDir/Attorney_Online.png + + QTDIR=${QT_ROOT_DIR} ./appimagetool deploy AppDir/usr/share/applications/Attorney_Online.desktop + ARCH=x86_64 VERSION=2.11 ./appimagetool AppDir + + mkdir bin-appimage + cp -r bin/base bin-appimage + cp README_LINUX.md bin-appimage + cp Attorney_Online-*-x86_64.AppImage bin-appimage + chmod +x bin-appimage/Attorney_Online-*-x86_64.AppImage + + tar -cvf Attorney_Online-AppImage.tar bin-appimage/* + tar --transform='flags=r;s|bin-appimage|Attorney_Online|' -cvf Attorney_Online-AppImage.tar bin-appimage + + - name: Upload Dynamic Artifact + uses: actions/upload-artifact@master + with: + name: Attorney_Online-Linux-Dynamic + path: Attorney_Online-Dynamic.tar - - name: Upload Artifact + - name: Upload AppImage Artifact uses: actions/upload-artifact@master with: - name: Attorney_Online-Linux - path: ${{github.workspace}}/bin + name: Attorney_Online-Linux-AppImage + path: Attorney_Online-AppImage.tar |
