From 5bbb4f31dcc53b251b9f5836e73fff64abe91970 Mon Sep 17 00:00:00 2001 From: txtsd Date: Sun, 20 Feb 2022 01:16:43 +0530 Subject: [PATCH] Add generic Linux system builds --- .github/workflows/build.yml | 30 ++++++++++++++++++++++------ .github/workflows/trigger_builds.yml | 11 ++++++++++ 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3d0ce2a9..dbfcb82f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,9 +15,14 @@ jobs: matrix: include: + - os: ubuntu-20.04 + qt_version: 5.12.8 + qt_host: linux + - os: ubuntu-20.04 qt_version: 5.15.2 qt_host: linux + app_image: true - os: windows-2022 qt_version: 5.15.2 @@ -94,15 +99,15 @@ jobs: - name: Install Ninja uses: urkle/action-get-ninja@v1 - - name: Download linuxdeploy family - if: runner.os == 'Linux' + - name: Download linuxdeploy family for AppImage on Linux + if: matrix.app_image == true run: | wget "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" wget "https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage" wget "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage" - name: Download JREs for AppImage on Linux - if: runner.os == 'Linux' + if: matrix.app_image == true shell: bash run: | ${{ github.workspace }}/.github/scripts/prepare_JREs.sh @@ -126,13 +131,13 @@ jobs: run: | cmake --install ${{ env.BUILD_DIR }} - - name: Install for AppImage on Linux + - name: Install on Linux if: runner.os == 'Linux' run: | DESTDIR=${{ env.INSTALL_DIR }} cmake --install ${{ env.BUILD_DIR }} - name: Bundle AppImage - if: runner.os == 'Linux' + if: matrix.app_image == true shell: bash run: | export OUTPUT="PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage" @@ -175,8 +180,21 @@ jobs: cd ${{ env.INSTALL_DIR }} tar -czf ../PolyMC.tar.gz * + - name: tar on Linux + if: runner.os == 'Linux' && matrix.app_image != true + run: | + cd ${{ env.INSTALL_DIR }} + tar -czf ../PolyMC.tar.gz * + + - name: Upload Linux tar.gz + if: runner.os == 'Linux' && matrix.app_image != true + uses: actions/upload-artifact@v2 + with: + name: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }} + path: PolyMC.tar.gz + - name: Upload AppImage for Linux - if: runner.os == 'Linux' + if: matrix.app_image == true uses: actions/upload-artifact@v2 with: name: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage diff --git a/.github/workflows/trigger_builds.yml b/.github/workflows/trigger_builds.yml index 4a162665..3b9cec16 100644 --- a/.github/workflows/trigger_builds.yml +++ b/.github/workflows/trigger_builds.yml @@ -56,6 +56,7 @@ jobs: run: | rm -rf *Debug* + mv PolyMC-Linux*/PolyMC.tar.gz PolyMC-Linux-${{ env.VERSION }}.tar.gz mv PolyMC-*.AppImage/PolyMC-*.AppImage PolyMC-Linux-${{ env.VERSION }}-x86_64.AppImage mv PolyMC-Windows* PolyMC-Windows-${{ env.VERSION }} mv PolyMC-macOS*/PolyMC.tar.gz PolyMC-macOS-${{ env.VERSION }}.tar.gz @@ -64,6 +65,16 @@ jobs: zip -r -9 ../PolyMC-Windows-${{ env.VERSION }}.zip * cd .. + - name: Upload Linux asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.create_release.outputs.upload_url }} + asset_name: PolyMC-Linux-${{ env.VERSION }}.tar.gz + asset_path: PolyMC-Linux-${{ env.VERSION }}.tar.gz + asset_content_type: application/gzip + - name: Upload Linux AppImage asset uses: actions/upload-release-asset@v1 env: