bring back portable linux builds

This commit is contained in:
DioEgizio 2022-03-25 13:13:50 +01:00
parent 92f3154e8f
commit 54d2c91320

View File

@ -19,6 +19,12 @@ jobs:
qt_version: 5.12.8 qt_version: 5.12.8
qt_host: linux qt_host: linux
- os: ubuntu-20.04
name: Linux-Portable
qt_version: 5.12.8
qt_host: linux
portable: true
- os: ubuntu-20.04 - os: ubuntu-20.04
qt_version: 5.15.2 qt_version: 5.15.2
qt_host: linux qt_host: linux
@ -140,7 +146,6 @@ jobs:
run: | run: |
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DLauncher_PORTABLE=OFF -G Ninja cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DLauncher_PORTABLE=OFF -G Ninja
- name: Configure CMake on Windows portable - name: Configure CMake on Windows portable
if: runner.os == 'Windows' && matrix.portable == true if: runner.os == 'Windows' && matrix.portable == true
shell: msys2 {0} shell: msys2 {0}
@ -148,10 +153,15 @@ jobs:
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -G Ninja cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -G Ninja
- name: Configure CMake on Linux - name: Configure CMake on Linux
if: runner.os == 'Linux' if: runner.os == 'Linux' && matrix.portable != true
run: | run: |
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DLauncher_PORTABLE=OFF -G Ninja cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DLauncher_PORTABLE=OFF -G Ninja
- name: Configure CMake on Linux Portable
if: runner.os == 'Linux' && matrix.portable == true
run: |
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -G Ninja
- name: Build - name: Build
if: runner.os != 'Windows' if: runner.os != 'Windows'
run: | run: |
@ -175,10 +185,15 @@ jobs:
cmake --install ${{ env.BUILD_DIR }} cmake --install ${{ env.BUILD_DIR }}
- name: Install on Linux - name: Install on Linux
if: runner.os == 'Linux' if: runner.os == 'Linux' && matrix.portable != true
run: | run: |
DESTDIR=${{ env.INSTALL_DIR }} cmake --install ${{ env.BUILD_DIR }} DESTDIR=${{ env.INSTALL_DIR }} cmake --install ${{ env.BUILD_DIR }}
- name: Install on Linux portable
if: runner.os == 'Linux' && matrix.portable == true
run: |
cmake --install ${{ env.BUILD_DIR }}
- name: Bundle AppImage - name: Bundle AppImage
if: matrix.app_image == true if: matrix.app_image == true
shell: bash shell: bash
@ -219,18 +234,31 @@ jobs:
tar -czf ../PolyMC.tar.gz * tar -czf ../PolyMC.tar.gz *
- name: tar on Linux - name: tar on Linux
if: runner.os == 'Linux' && matrix.app_image != true if: runner.os == 'Linux' && matrix.app_image != true && matrix.portable != true
run: | run: |
cd ${{ env.INSTALL_DIR }} cd ${{ env.INSTALL_DIR }}
tar -czf ../PolyMC.tar.gz * tar -czf ../PolyMC.tar.gz *
- name: tar on Linux portable
if: runner.os == 'Linux' && matrix.app_image != true && matrix.portable == true
run: |
cd ${{ env.INSTALL_DIR }}
tar -czf ../PolyMC-portable.tar.gz *
- name: Upload Linux tar.gz - name: Upload Linux tar.gz
if: runner.os == 'Linux' && matrix.app_image != true if: runner.os == 'Linux' && matrix.app_image != true && matrix.portable != true
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }} name: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}
path: PolyMC.tar.gz path: PolyMC.tar.gz
- name: Upload Linux Portable tar.gz
if: runner.os == 'Linux' && matrix.app_image != true && matrix.portable == true
uses: actions/upload-artifact@v3
with:
name: PolyMC-${{ runner.os }}-Portable-${{ env.VERSION }}-${{ inputs.build_type }}
path: PolyMC-portable.tar.gz
- name: Upload AppImage for Linux - name: Upload AppImage for Linux
if: matrix.app_image == true if: matrix.app_image == true
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3