diff --git a/.github/workflows/linux_build_matrix.yml b/.github/workflows/linux_build_matrix.yml
index 1bd0e4ce3e..38c30b0b6b 100644
--- a/.github/workflows/linux_build_matrix.yml
+++ b/.github/workflows/linux_build_matrix.yml
@@ -11,7 +11,7 @@ on:
jobs:
build_gcc_lto:
name: "GCC"
- uses: ./.github/workflows/linux_build.yml
+ uses: ./.github/workflows/linux_build_wx.yml
with:
jobName: "with LTO"
compiler: gcc
@@ -22,7 +22,7 @@ jobs:
# (PCH conflicts with ccache, fixed by https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4400)
build_gcc_nopch:
name: "GCC"
- uses: ./.github/workflows/linux_build.yml
+ uses: ./.github/workflows/linux_build_wx.yml
with:
jobName: "No PCH"
compiler: gcc
@@ -32,7 +32,7 @@ jobs:
build_gcc_nopch_avx2:
name: "GCC"
- uses: ./.github/workflows/linux_build.yml
+ uses: ./.github/workflows/linux_build_wx.yml
with:
jobName: "AVX2 and No PCH"
compiler: gcc
@@ -42,10 +42,33 @@ jobs:
build_clang_nopch:
name: "Clang"
- uses: ./.github/workflows/linux_build.yml
+ uses: ./.github/workflows/linux_build_wx.yml
with:
jobName: "No PCH"
compiler: clang
cmakeflags: ""
detail: " nopch"
secrets: inherit
+
+ build_linux_qt_sse4:
+ name: "AppImage"
+ uses: ./.github/workflows/linux_build_qt.yml
+ with:
+ jobName: "Qt SSE4"
+ compiler: clang
+ cmakeflags: ""
+ simd: "SSE4"
+ buildAppImage: true
+ secrets: inherit
+
+ build_linux_qt_avx2:
+ name: "AppImage"
+ uses: ./.github/workflows/linux_build_qt.yml
+ with:
+ jobName: "Qt AVX2"
+ detail: ""
+ compiler: clang
+ cmakeflags: "-DARCH_FLAG=-march=haswell"
+ simd: "AVX2"
+ buildAppImage: true
+ secrets: inherit
diff --git a/.github/workflows/linux_build_qt.yml b/.github/workflows/linux_build_qt.yml
new file mode 100644
index 0000000000..769520e3ca
--- /dev/null
+++ b/.github/workflows/linux_build_qt.yml
@@ -0,0 +1,129 @@
+name: Linux Build Steps
+
+on:
+ workflow_call:
+ inputs:
+ jobName:
+ required: true
+ type: string
+ os:
+ required: false
+ type: string
+ default: ubuntu-20.04
+ platform:
+ required: false
+ type: string
+ default: x64
+ compiler:
+ required: true
+ type: string
+ cmakeflags:
+ required: true
+ type: string
+ buildAppImage:
+ required: false
+ type: boolean
+ default: false
+ detail:
+ required: false
+ type: string
+ default: ""
+ simd:
+ required: false
+ type: string
+ default: ""
+
+jobs:
+ build_linux:
+ name: ${{ inputs.jobName }}
+ runs-on: ${{ inputs.os }}
+ # Set some sort of timeout in the event of run-away builds. We are limited on concurrent jobs so, get rid of them.
+ timeout-minutes: 60
+ env:
+ CCACHE_BASEDIR: ${{ github.workspace }}
+ CCACHE_DIR: ${{ github.workspace }}/.ccache
+ CCACHE_COMPRESS: true
+ CCACHE_COMPRESSLEVEL: 9
+ CCACHE_MAXSIZE: 100M
+
+ steps:
+ - name: Checkout Repository
+ uses: actions/checkout@v3
+ with:
+ submodules: recursive
+
+ - name: Prepare Artifact Metadata
+ id: artifact-metadata
+ shell: bash
+ env:
+ OS: linux
+ GUI_FRAMEWORK: QT
+ ARCH: ${{ inputs.platform }}
+ SIMD: ${{ inputs.simd }}
+ EVENT_NAME: ${{ github.event_name }}
+ PR_TITLE: ${{ github.event.pull_request.title }}
+ PR_NUM: ${{ github.event.pull_request.number }}
+ PR_SHA: ${{ github.event.pull_request.head.sha }}
+ run: ./.github/workflows/scripts/common/name-artifacts.sh
+
+ # -- SETUP CCACHE - https://cristianadam.eu/20200113/speeding-up-c-plus-plus-github-actions-using-ccache/
+ - name: Prepare ccache timestamp
+ id: ccache_cache_timestamp
+ shell: cmake -P {0}
+ run: |
+ string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
+ message("::set-output name=timestamp::${current_date}")
+
+ - name: ccache cache files
+ uses: actions/cache@v3
+ with:
+ path: .ccache
+ key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.compiler }} ${{ inputs.simd }} ${{ inputs.detail }} ccache ${{ steps.ccache_cache_timestamp.outputs.timestamp }}
+ restore-keys: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.compiler }} ${{ inputs.simd }} ${{ inputs.detail }} ccache
+
+ - name: Install Packages
+ env:
+ COMPILER: ${{ inputs.compiler }}
+ run: .github/workflows/scripts/linux/install-packages-qt.sh
+
+ - name: Cache Dependencies
+ id: cache-deps
+ uses: actions/cache@v3
+ with:
+ path: ~/deps
+ key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.gui }} deps ${{ hashFiles('.github/workflows/scripts/linux/build-dependencies-qt.sh') }}
+
+ - name: Build Dependencies
+ if: steps.cache-deps.outputs.cache-hit != 'true'
+ run: .github/workflows/scripts/linux/build-dependencies-qt.sh
+
+ - name: Generate CMake
+ env:
+ COMPILER: ${{ inputs.compiler }}
+ ADDITIONAL_CMAKE_ARGS: ${{ inputs.cmakeflags }}
+ run: .github/workflows/scripts/linux/generate-cmake-qt.sh
+
+ - name: Build PCSX2
+ working-directory: build
+ run: ../.github/workflows/scripts/linux/compile.sh
+
+ - name: Run Tests
+ working-directory: ./build
+ run: ninja unittests
+
+ - name: Package AppImage
+ if: inputs.buildAppImage == true
+ env:
+ NAME: ${{ steps.artifact-metadata.outputs.artifact-name }}
+ run: |
+ ninja -C build install
+ .github/workflows/scripts/linux/appimage-qt.sh "$(realpath .)" "$HOME/deps" "$NAME"
+ mkdir -p "$GITHUB_WORKSPACE"/ci-artifacts/
+ mv "${NAME}.AppImage" "$GITHUB_WORKSPACE"/ci-artifacts/
+
+ - name: Upload artifact
+ if: inputs.buildAppImage == true
+ uses: actions/upload-artifact@v3
+ with:
+ name: ${{ steps.artifact-metadata.outputs.artifact-name }}
+ path: ci-artifacts
diff --git a/.github/workflows/linux_build.yml b/.github/workflows/linux_build_wx.yml
similarity index 100%
rename from .github/workflows/linux_build.yml
rename to .github/workflows/linux_build_wx.yml
diff --git a/.github/workflows/release_pipeline.yml b/.github/workflows/release_pipeline.yml
index 94bf7d9c9a..6ece4f6c59 100644
--- a/.github/workflows/release_pipeline.yml
+++ b/.github/workflows/release_pipeline.yml
@@ -11,7 +11,7 @@ jobs:
build_gcc_lto:
if: github.repository == 'PCSX2/pcsx2'
name: "Linux - AppImage"
- uses: ./.github/workflows/linux_build.yml
+ uses: ./.github/workflows/linux_build_wx.yml
with:
jobName: "wxWidgets"
compiler: gcc
@@ -19,6 +19,31 @@ jobs:
buildAppImage: true
secrets: inherit
+ build_linux_qt_sse4:
+ if: github.repository == 'PCSX2/pcsx2'
+ name: "Linux - AppImage SSE4"
+ uses: ./.github/workflows/linux_build_qt.yml
+ with:
+ jobName: "Qt"
+ compiler: clang
+ cmakeflags: ""
+ simd: "SSE4"
+ buildAppImage: true
+ secrets: inherit
+
+ build_linux_qt_avx2:
+ if: github.repository == 'PCSX2/pcsx2'
+ name: "Linux - AppImage AVX2"
+ uses: ./.github/workflows/linux_build_qt.yml
+ with:
+ jobName: "Qt"
+ detail: ""
+ compiler: clang
+ cmakeflags: "-DARCH_FLAG=-march=haswell"
+ simd: "AVX2"
+ buildAppImage: true
+ secrets: inherit
+
# Windows
build_wx_sse4:
if: github.repository == 'PCSX2/pcsx2'
@@ -82,6 +107,8 @@ jobs:
if: github.repository == 'PCSX2/pcsx2'
needs:
- build_gcc_lto
+ - build_linux_qt_sse4
+ - build_linux_qt_avx2
- build_wx_sse4
- build_wx_avx2
- build_qt_sse4
diff --git a/.github/workflows/scripts/common/name-artifacts.sh b/.github/workflows/scripts/common/name-artifacts.sh
index 4f823daf9f..dd2e6618ff 100755
--- a/.github/workflows/scripts/common/name-artifacts.sh
+++ b/.github/workflows/scripts/common/name-artifacts.sh
@@ -21,7 +21,7 @@ NAME=""
if [ "${OS}" == "macos" ]; then
NAME="PCSX2-${OS}-${GUI_FRAMEWORK}"
-elif [ "${OS}" == "windows" ]; then
+elif [[ "${OS}" == "windows" || ("$OS" == "linux" && "$GUI_FRAMEWORK" == "QT") ]]; then
NAME="PCSX2-${OS}-${GUI_FRAMEWORK}-${ARCH}-${SIMD}"
else
NAME="PCSX2-${OS}-${GUI_FRAMEWORK}-${ARCH}"
diff --git a/.github/workflows/scripts/linux/AppRun-qt b/.github/workflows/scripts/linux/AppRun-qt
new file mode 100755
index 0000000000..973b76be02
--- /dev/null
+++ b/.github/workflows/scripts/linux/AppRun-qt
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd "$(dirname "$0")"
+exec ./usr/bin/pcsx2-qt "$@"
diff --git a/.github/workflows/scripts/linux/appimage-qt.sh b/.github/workflows/scripts/linux/appimage-qt.sh
new file mode 100755
index 0000000000..72a471fa1f
--- /dev/null
+++ b/.github/workflows/scripts/linux/appimage-qt.sh
@@ -0,0 +1,253 @@
+#!/usr/bin/env bash
+
+# This is free and unencumbered software released into the public domain.
+#
+# Anyone is free to copy, modify, publish, use, compile, sell, or
+# distribute this software, either in source code form or as a compiled
+# binary, for any purpose, commercial or non-commercial, and by any
+# means.
+#
+# In jurisdictions that recognize copyright laws, the author or authors
+# of this software dedicate any and all copyright interest in the
+# software to the public domain. We make this dedication for the benefit
+# of the public at large and to the detriment of our heirs and
+# successors. We intend this dedication to be an overt act of
+# relinquishment in perpetuity of all present and future rights to this
+# software under copyright law.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+#
+# For more information, please refer to
+
+if [ "$#" -ne 3 ]; then
+ echo "Syntax: $0