aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/build.yml')
-rw-r--r--.github/workflows/build.yml50
1 files changed, 39 insertions, 11 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 4aa316f4..b011a779 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -20,6 +20,12 @@ jobs:
qt_host: linux
- os: ubuntu-20.04
+ name: Linux-Portable
+ qt_version: 5.12.8
+ qt_host: linux
+ portable: true
+
+ - os: ubuntu-20.04
qt_version: 5.15.2
qt_host: linux
app_image: true
@@ -58,7 +64,7 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
submodules: 'true'
@@ -91,7 +97,7 @@ jobs:
- name: Cache Qt
if: runner.os != 'Windows'
id: cache-qt
- uses: actions/cache@v2
+ uses: actions/cache@v3
with:
path: "${{ github.workspace }}/Qt/"
key: ${{ runner.os }}-${{ matrix.qt_version }}-${{ matrix.qt_arch }}-qt_cache
@@ -140,7 +146,6 @@ jobs:
run: |
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
if: runner.os == 'Windows' && matrix.portable == true
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
- name: Configure CMake on Linux
- if: runner.os == 'Linux'
+ if: runner.os == 'Linux' && matrix.portable != true
run: |
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
if: runner.os != 'Windows'
run: |
@@ -175,10 +185,15 @@ jobs:
cmake --install ${{ env.BUILD_DIR }}
- name: Install on Linux
- if: runner.os == 'Linux'
+ if: runner.os == 'Linux' && matrix.portable != true
run: |
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
if: matrix.app_image == true
shell: bash
@@ -219,21 +234,34 @@ jobs:
tar -czf ../PolyMC.tar.gz *
- name: tar on Linux
- if: runner.os == 'Linux' && matrix.app_image != true
+ if: runner.os == 'Linux' && matrix.app_image != true && matrix.portable != true
run: |
cd ${{ env.INSTALL_DIR }}
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
- if: runner.os == 'Linux' && matrix.app_image != true
- uses: actions/upload-artifact@v2
+ if: runner.os == 'Linux' && matrix.app_image != true && matrix.portable != true
+ uses: actions/upload-artifact@v3
with:
name: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}
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
if: matrix.app_image == true
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage
path: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage
@@ -254,14 +282,14 @@ jobs:
- name: Upload package for Windows
if: runner.os == 'Windows'
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: PolyMC-${{ matrix.name }}-${{ env.VERSION }}-${{ inputs.build_type }}
path: ${{ env.INSTALL_DIR }}/**
- name: Upload package for macOS
if: runner.os == 'macOS'
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}
path: PolyMC.tar.gz