aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/ISSUE_TEMPLATE/rfc.yml69
-rw-r--r--.github/workflows/build.yml73
-rw-r--r--.github/workflows/trigger_builds.yml22
-rw-r--r--.github/workflows/trigger_release.yml99
4 files changed, 244 insertions, 19 deletions
diff --git a/.github/ISSUE_TEMPLATE/rfc.yml b/.github/ISSUE_TEMPLATE/rfc.yml
new file mode 100644
index 00000000..664430fe
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/rfc.yml
@@ -0,0 +1,69 @@
+# Template based on https://gitlab.archlinux.org/archlinux/rfcs/-/blob/0ba3b61e987e197f8d1901709409b8564958f78a/rfcs/0000-template.rst
+name: Request for Comment (RFC)
+description: Propose a larger change and start a discussion.
+labels: [RFC]
+body:
+- type: markdown
+ attributes:
+ value: |
+ ### Use this form to suggest a larger change for PolyMC.
+- type: textarea
+ attributes:
+ label: Goal
+ description: Short description, 1-2 sentences.
+ placeholder: Remove the cat from the launcher.
+ validations:
+ required: true
+- type: textarea
+ attributes:
+ label: Motivation
+ description: |
+ Introduce the topic. If this is a not-well-known section of PolyMC, a detailed explanation of the background is recommended.
+ Some example points of discussion:
+ - What specific problems are you facing right now that you're trying to address?
+ - Are there any previous discussions? Link to them and summarize them (don't
+ - force your readers to read them though!).
+ - Is there any precedent set by other software? If so, link to resources.
+ placeholder: I don't like cats. I think many users also don't like cats.
+ validations:
+ required: true
+- type: textarea
+ attributes:
+ label: Specification
+ description: A concrete, thorough explanation of what is being planned.
+ placeholder: Remove the cat button and all references to the cat from the codebase. Including resource files.
+ validations:
+ required: true
+- type: textarea
+ attributes:
+ label: Drawbacks
+ description: Carefully consider every possible objection and issue with your proposal. This section should be updated as feedback comes in from discussion.
+ placeholder: Some users might like cats.
+ validations:
+ required: true
+- type: textarea
+ attributes:
+ label: Unresolved Questions
+ description: |
+ Are there any portions of your proposal which need to be discussed with the community before the RFC can proceed?
+ Be careful here -- an RFC with a lot of remaining questions is likely to be stalled.
+ If your RFC is mostly unresolved questions and not too much substance, it may not be ready.
+ placeholder: Do a lot of users care about the cat?
+ validations:
+ required: true
+- type: textarea
+ attributes:
+ label: Alternatives Considered
+ description: A list of alternatives, that have been considered and offer equal or similar features to the proposed change.
+ placeholder: Maybe the cat could be replaced with an axolotl?
+ validations:
+ required: true
+- type: checkboxes
+ attributes:
+ label: This suggestion is unique
+ options:
+ - label: I have searched the issue tracker and did not find an issue describing my suggestion, especially not one that has been rejected.
+ required: true
+- type: textarea
+ attributes:
+ label: You may use the editor below to elaborate further.
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index d2ccc59e..793b081e 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,7 +1,12 @@
-name: build_portable
+name: Build
on:
- [push, pull_request, workflow_dispatch]
+ workflow_call:
+ inputs:
+ build_type:
+ description: Type of build (Debug, Release, RelWithDebInfo, MinSizeRel)
+ type: string
+ default: Debug
jobs:
build:
@@ -11,8 +16,13 @@ jobs:
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
@@ -59,6 +69,12 @@ jobs:
copy "${{ github.workspace }}\Qt\Tools\OpenSSL\Win_x86\bin\libssl-1_1.dll" "${{ github.workspace }}\${{ env.INSTALL_DIR }}\"
copy "${{ github.workspace }}\Qt\Tools\OpenSSL\Win_x86\bin\libcrypto-1_1.dll" "${{ github.workspace }}\${{ env.INSTALL_DIR }}\"
+ - name: Set short version
+ shell: bash
+ run: |
+ ver_short=`git rev-parse --short HEAD`
+ echo "VERSION=$ver_short" >> $GITHUB_ENV
+
- name: Install OpenJDK
uses: AdoptOpenJDK/install-jdk@v1
with:
@@ -72,6 +88,7 @@ jobs:
key: ${{ runner.os }}-${{ matrix.qt_version }}-${{ matrix.qt_arch }}-qt_cache
- name: Install Qt
+ if: runner.os != 'Linux' || matrix.app_image == true
uses: jurplel/install-qt-action@v2
with:
version: ${{ matrix.qt_version }}
@@ -80,18 +97,23 @@ jobs:
cached: ${{ steps.cache-qt.outputs.cache-hit }}
dir: "${{ github.workspace }}/Qt/"
+ - name: Install System Qt on Linux
+ if: runner.os == 'Linux' && matrix.app_image != true
+ run: |
+ sudo apt-get -y install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5core5a libqt5network5 libqt5gui5
+
- 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
@@ -99,12 +121,12 @@ jobs:
- name: Configure CMake
if: runner.os != 'Linux'
run: |
- cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=Debug -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
if: runner.os == 'Linux'
run: |
- cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug -DLauncher_LAYOUT=lin-system -G Ninja
+ cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DLauncher_LAYOUT=lin-system -G Ninja
- name: Build
run: |
@@ -115,16 +137,16 @@ 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-${{ github.sha }}-x86_64.AppImage"
+ export OUTPUT="PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage"
chmod +x linuxdeploy-*.AppImage
@@ -145,13 +167,13 @@ jobs:
- name: Run windeployqt
if: runner.os == 'Windows'
run: |
- windeployqt --no-translations "${{ env.INSTALL_DIR }}/polymc.exe"
+ windeployqt --no-translations --no-system-d3d-compiler --no-opengl-sw "${{ env.INSTALL_DIR }}/polymc.exe"
- name: Run macdeployqt
if: runner.os == 'macOS'
run: |
cd ${{ env.INSTALL_DIR }}
- macdeployqt "PolyMC.app" -executable="PolyMC.app/Contents/MacOS/polymc" -always-overwrite -use-debug-libs
+ macdeployqt "PolyMC.app" -executable="PolyMC.app/Contents/MacOS/polymc" -always-overwrite
- name: chmod binary on macOS
if: runner.os == 'macOS'
@@ -162,25 +184,38 @@ jobs:
if: runner.os == 'macOS'
run: |
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
- if: runner.os == 'Linux'
+ if: matrix.app_image == true
uses: actions/upload-artifact@v2
with:
- name: PolyMC-${{ github.sha }}-x86_64.AppImage
- path: PolyMC-${{ github.sha }}-x86_64.AppImage
+ name: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage
+ path: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage
- name: Upload package for Windows
if: runner.os == 'Windows'
uses: actions/upload-artifact@v2
with:
- name: polymc-${{ runner.os }}-${{ github.sha }}-portable
+ name: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}
path: ${{ env.INSTALL_DIR }}/**
- name: Upload package for macOS
if: runner.os == 'macOS'
uses: actions/upload-artifact@v2
with:
- name: polymc-${{ runner.os }}-${{ github.sha }}-portable
- path: polymc.tar.gz
+ name: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}
+ path: PolyMC.tar.gz
diff --git a/.github/workflows/trigger_builds.yml b/.github/workflows/trigger_builds.yml
new file mode 100644
index 00000000..1dfc728e
--- /dev/null
+++ b/.github/workflows/trigger_builds.yml
@@ -0,0 +1,22 @@
+name: Build Application
+
+on:
+ push:
+ branches-ignore:
+ - 'stable'
+ pull_request:
+ workflow_dispatch:
+
+jobs:
+
+ build_debug:
+ name: Build Debug
+ uses: ./.github/workflows/build.yml
+ with:
+ build_type: Debug
+
+ build_release:
+ name: Build Release
+ uses: ./.github/workflows/build.yml
+ with:
+ build_type: Release
diff --git a/.github/workflows/trigger_release.yml b/.github/workflows/trigger_release.yml
new file mode 100644
index 00000000..b487e731
--- /dev/null
+++ b/.github/workflows/trigger_release.yml
@@ -0,0 +1,99 @@
+name: Build Application and Make Release
+
+on:
+ push:
+ tags:
+ - '*'
+
+jobs:
+
+ build_release:
+ name: Build Release
+ uses: ./.github/workflows/build.yml
+ with:
+ build_type: Release
+
+ create_release:
+ needs: build_release
+ runs-on: ubuntu-latest
+ outputs:
+ upload_url: ${{ steps.create_release.outputs.upload_url }}
+ steps:
+ - name: Grab and store version
+ run: |
+ tag_name=$(echo ${{ github.ref }} | grep -oE "[^/]+$")
+ echo "VERSION=$tag_name" >> $GITHUB_ENV
+ - name: Create release
+ id: create_release
+ uses: softprops/action-gh-release@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ tag_name: ${{ github.ref }}
+ name: PolyMC ${{ env.VERSION }}
+ draft: true
+ prerelease: false
+
+ upload_release:
+ needs: create_release
+ runs-on: ubuntu-latest
+ steps:
+
+ - name: Download artifacts
+ uses: actions/download-artifact@v2
+
+ - name: Grab and store version
+ run: |
+ tag_name=$(echo ${{ github.ref }} | grep -oE "[^/]+$")
+ echo "VERSION=$tag_name" >> $GITHUB_ENV
+
+ - name: Package artifacts properly
+ run: |
+ 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
+
+ cd PolyMC-Windows-${{ env.VERSION }}
+ 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:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ needs.create_release.outputs.upload_url }}
+ asset_name: PolyMC-Linux-${{ env.VERSION }}-x86_64.AppImage
+ asset_path: PolyMC-Linux-${{ env.VERSION }}-x86_64.AppImage
+ asset_content_type: application/x-executable
+
+ - name: Upload Windows 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-Windows-${{ env.VERSION }}.zip
+ asset_path: PolyMC-Windows-${{ env.VERSION }}.zip
+ asset_content_type: application/zip
+
+ - name: Upload macOS 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-macOS-${{ env.VERSION }}.tar.gz
+ asset_path: PolyMC-macOS-${{ env.VERSION }}.tar.gz
+ asset_content_type: application/gzip