Add generic Linux system builds

This commit is contained in:
txtsd 2022-02-20 01:16:43 +05:30
parent 9b7cd029a7
commit 5bbb4f31dc
No known key found for this signature in database
GPG Key ID: 000F85679D4B6B53
2 changed files with 35 additions and 6 deletions

View File

@ -15,9 +15,14 @@ jobs:
matrix: matrix:
include: include:
- os: ubuntu-20.04
qt_version: 5.12.8
qt_host: linux
- os: ubuntu-20.04 - os: ubuntu-20.04
qt_version: 5.15.2 qt_version: 5.15.2
qt_host: linux qt_host: linux
app_image: true
- os: windows-2022 - os: windows-2022
qt_version: 5.15.2 qt_version: 5.15.2
@ -94,15 +99,15 @@ jobs:
- name: Install Ninja - name: Install Ninja
uses: urkle/action-get-ninja@v1 uses: urkle/action-get-ninja@v1
- name: Download linuxdeploy family - name: Download linuxdeploy family for AppImage on Linux
if: runner.os == 'Linux' if: matrix.app_image == true
run: | run: |
wget "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" 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-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" wget "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage"
- name: Download JREs for AppImage on Linux - name: Download JREs for AppImage on Linux
if: runner.os == 'Linux' if: matrix.app_image == true
shell: bash shell: bash
run: | run: |
${{ github.workspace }}/.github/scripts/prepare_JREs.sh ${{ github.workspace }}/.github/scripts/prepare_JREs.sh
@ -126,13 +131,13 @@ jobs:
run: | run: |
cmake --install ${{ env.BUILD_DIR }} cmake --install ${{ env.BUILD_DIR }}
- name: Install for AppImage on Linux - name: Install on Linux
if: runner.os == 'Linux' if: runner.os == 'Linux'
run: | run: |
DESTDIR=${{ env.INSTALL_DIR }} cmake --install ${{ env.BUILD_DIR }} DESTDIR=${{ env.INSTALL_DIR }} cmake --install ${{ env.BUILD_DIR }}
- name: Bundle AppImage - name: Bundle AppImage
if: runner.os == 'Linux' if: matrix.app_image == true
shell: bash shell: bash
run: | run: |
export OUTPUT="PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage" export OUTPUT="PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage"
@ -175,8 +180,21 @@ jobs:
cd ${{ env.INSTALL_DIR }} cd ${{ env.INSTALL_DIR }}
tar -czf ../PolyMC.tar.gz * 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 - name: Upload AppImage for Linux
if: runner.os == 'Linux' if: matrix.app_image == true
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage name: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage

View File

@ -56,6 +56,7 @@ jobs:
run: | run: |
rm -rf *Debug* 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-*.AppImage/PolyMC-*.AppImage PolyMC-Linux-${{ env.VERSION }}-x86_64.AppImage
mv PolyMC-Windows* PolyMC-Windows-${{ env.VERSION }} mv PolyMC-Windows* PolyMC-Windows-${{ env.VERSION }}
mv PolyMC-macOS*/PolyMC.tar.gz PolyMC-macOS-${{ env.VERSION }}.tar.gz 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 * zip -r -9 ../PolyMC-Windows-${{ env.VERSION }}.zip *
cd .. 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 - name: Upload Linux AppImage asset
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@v1
env: env: