diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 453228e1c2..08e3e80f32 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,3 +6,7 @@ updates: schedule: # Check for updates to GitHub Actions every week interval: "weekly" + groups: + ci-deps: + patterns: + - "*" diff --git a/.github/labeler.yml b/.github/labeler.yml index 01c2407baf..43b79f8252 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -2,127 +2,187 @@ # General Labels 'Build | Project System': - - '.github/*' - - '.github/**/*' - - '*.sln' - - '**/*.sln' - - '*.vcxproj*' - - '**/*.vcxproj*' - - 'cmake/*' - - 'cmake/**/*' - - 'CMakeLists.txt' - - '**/CMakeLists.txt' - - 'build.sh' + - changed-files: + - any-glob-to-any-file: + - '.github/*' + - '.github/**/*' + - '*.sln' + - '**/*.sln' + - '*.vcxproj*' + - '**/*.vcxproj*' + - 'cmake/*' + - 'cmake/**/*' + - 'CMakeLists.txt' + - '**/CMakeLists.txt' + - 'build.sh' 'Dependencies': - - '3rdparty/*' - - '3rdparty/**/*' - - '**/3rdpartyDeps.props' - - '.gitmodules' + - changed-files: + - any-glob-to-any-file: + - '3rdparty/*' + - '3rdparty/**/*' + - '**/3rdpartyDeps.props' + - '.gitmodules' 'Documentation': - - '*.md' - - '**/*.md' - - '*.pdf' - - '**/*.pdf' + - changed-files: + - any-glob-to-any-file: + - '*.md' + - '**/*.md' + - '*.pdf' + - '**/*.pdf' 'GUI/Qt': - - 'pcsx2-qt/*' - - 'pcsx2-qt/**/*' - - '3rdparty/Qt/*' - - '3rdparty/Qt/**/*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2-qt/*' + - 'pcsx2-qt/**/*' + - '3rdparty/Qt/*' + - '3rdparty/Qt/**/*' 'GameDB': - - '**/GameIndex.*' + - changed-files: + - any-glob-to-any-file: + - '**/GameIndex.*' 'Installer | Package': - - 'build.sh' + - changed-files: + - any-glob-to-any-file: + - 'build.sh' 'Translations': - - 'pcsx2-qt/Translations/*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2-qt/Translations/*' # Tools / Features 'Debugger': - - 'pcsx2/DebugTools/*' - - 'pcsx2/DebugTools/**/*' - - 'pcsx2-qt/Debugger/*' - - 'pcsx2-qt/Debugger/**/*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/DebugTools/*' + - 'pcsx2/DebugTools/**/*' + - 'pcsx2-qt/Debugger/*' + - 'pcsx2-qt/Debugger/**/*' 'IPC': - - 'pcsx2/IPC*' - - 'pcsx2/**/IPC*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/IPC*' + - 'pcsx2/**/IPC*' 'TAS Functionality': - - 'pcsx2/Recording/*' - - 'pcsx2/Recording/**/*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/Recording/*' + - 'pcsx2/Recording/**/*' 'RetroAchievements': - - 'pcsx2/Frontend/Achievements.*' - - 'pcsx2/Achievements.*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/Frontend/Achievements.*' + - 'pcsx2/Achievements.*' # Emulation Components 'Counters': - - 'pcsx2/Counters.*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/Counters.*' 'Vector Units': - - 'pcsx2/VU*' - - 'pcsx2/**/VU*' - - 'pcsx2/*VU*' - - 'pcsx2/**/*VU*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/VU*' + - 'pcsx2/**/VU*' + - 'pcsx2/*VU*' + - 'pcsx2/**/*VU*' 'VIF': - - 'pcsx2/Vif*' - - 'pcsx2/**/Vif*' - - 'pcsx2/VIF*' - - 'pcsx2/**/VIF*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/Vif*' + - 'pcsx2/**/Vif*' + - 'pcsx2/VIF*' + - 'pcsx2/**/VIF*' # GS Related Labels 'GS': - - 'pcsx2/GS/*' - - 'pcsx2/GS/**/*' - - 'bin/resources/shaders/*' - - 'bin/resources/shaders/**/*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/GS/*' + - 'pcsx2/GS/**/*' + - 'bin/resources/shaders/*' + - 'bin/resources/shaders/**/*' 'GS: Direct3D 11': - - 'pcsx2/GS/Renderers/DX11/*' - - 'pcsx2/GS/Renderers/DX11/**/*' - - 'bin/resources/shaders/dx11/*' - - 'bin/resources/shaders/dx11/**/*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/GS/Renderers/DX11/*' + - 'pcsx2/GS/Renderers/DX11/**/*' + - 'bin/resources/shaders/dx11/*' + - 'bin/resources/shaders/dx11/**/*' 'GS: Direct3D 12': - - 'pcsx2/GS/Renderers/DX12/*' - - 'pcsx2/GS/Renderers/DX12/**/*' - - 'bin/resources/shaders/dx11/*' - - 'bin/resources/shaders/dx11/**/*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/GS/Renderers/DX12/*' + - 'pcsx2/GS/Renderers/DX12/**/*' + - 'bin/resources/shaders/dx11/*' + - 'bin/resources/shaders/dx11/**/*' 'GS: Hardware': - - 'pcsx2/GS/Renderers/HW/*' - - 'pcsx2/GS/Renderers/HW/**/*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/GS/Renderers/HW/*' + - 'pcsx2/GS/Renderers/HW/**/*' 'GS: OpenGL': - - 'pcsx2/GS/Renderers/OpenGL/*' - - 'pcsx2/GS/Renderers/OpenGL/**/*' - - 'bin/resources/shaders/opengl/*' - - 'bin/resources/shaders/opengl/**/*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/GS/Renderers/OpenGL/*' + - 'pcsx2/GS/Renderers/OpenGL/**/*' + - 'bin/resources/shaders/opengl/*' + - 'bin/resources/shaders/opengl/**/*' 'GS: Vulkan': - - 'pcsx2/GS/Renderers/Vulkan/*' - - 'pcsx2/GS/Renderers/Vulkan/**/*' - - 'bin/resources/shaders/vulkan/*' - - 'bin/resources/shaders/vulkan/**/*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/GS/Renderers/Vulkan/*' + - 'pcsx2/GS/Renderers/Vulkan/**/*' + - 'bin/resources/shaders/vulkan/*' + - 'bin/resources/shaders/vulkan/**/*' 'GS: Metal': - - 'pcsx2/GS/Renderers/Metal/*' - - 'pcsx2/GS/Renderers/Metal/**/*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/GS/Renderers/Metal/*' + - 'pcsx2/GS/Renderers/Metal/**/*' 'GS: Texture Cache': - - 'pcsx2/GS/Renderers/*TextureCache*.*' - - 'pcsx2/GS/Renderers/**/*TextureCache*.*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/GS/Renderers/*TextureCache*.*' + - 'pcsx2/GS/Renderers/**/*TextureCache*.*' 'GS: Software': - - 'pcsx2/GS/Renderers/SW/*' - - 'pcsx2/GS/Renderers/SW/**/*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/GS/Renderers/SW/*' + - 'pcsx2/GS/Renderers/SW/**/*' # Other Core Components 'CDVD': - - 'pcsx2/CDVD/*' - - 'pcsx2/CDVD/**/*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/CDVD/*' + - 'pcsx2/CDVD/**/*' 'DEV9': - - 'pcsx2/DEV9/*' - - 'pcsx2/DEV9/**/*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/DEV9/*' + - 'pcsx2/DEV9/**/*' 'IPU': - - 'pcsx2/IPU/*' - - 'pcsx2/IPU/**/*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/IPU/*' + - 'pcsx2/IPU/**/*' 'Memory Card': - - 'pcsx2/SIO/Memcard/*' - - 'pcsx2/SIO/Memcard/**/*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/SIO/Memcard/*' + - 'pcsx2/SIO/Memcard/**/*' 'PAD': - - 'pcsx2/SIO/Pad/*' - - 'pcsx2/SIO/Pad/**/*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/SIO/Pad/*' + - 'pcsx2/SIO/Pad/**/*' 'SPU2': - - 'pcsx2/SPU2/*' - - 'pcsx2/SPU2/**/*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/SPU2/*' + - 'pcsx2/SPU2/**/*' 'USB': - - 'pcsx2/USB/*' - - 'pcsx2/USB/**/*' + - changed-files: + - any-glob-to-any-file: + - 'pcsx2/USB/*' + - 'pcsx2/USB/**/*' diff --git a/.github/workflows/linux_build_flatpak.yml b/.github/workflows/linux_build_flatpak.yml index 8472f00165..2f2aff9fdc 100644 --- a/.github/workflows/linux_build_flatpak.yml +++ b/.github/workflows/linux_build_flatpak.yml @@ -6,6 +6,9 @@ on: jobName: required: true type: string + artifactPrefixName: + required: true + type: string os: required: false type: string @@ -60,9 +63,7 @@ jobs: id: artifact-metadata shell: bash env: - OS: linux - BUILD_SYSTEM: flatpak - ARCH: ${{ inputs.platform }} + PREFIX: ${{ inputs.artifactPrefixName }} EVENT_NAME: ${{ github.event_name }} PR_TITLE: ${{ github.event.pull_request.title }} PR_NUM: ${{ github.event.pull_request.number }} @@ -90,9 +91,11 @@ jobs: flatpak run --command=flatpak-builder-lint org.flatpak.Builder manifest .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.json - name: Build Flatpak - uses: flatpak/flatpak-github-actions/flatpak-builder@v6.3 + # TODO - based on v6.3, switch back to the main action once change is accepted (or they release a breaking change that uses upload-artifact@v4) + uses: xTVaser/flatpak-github-actions/flatpak-builder@64267d4cf01f7955a40128039d0abab17bb48aac with: bundle: ${{ steps.artifact-metadata.outputs.artifact-name }}.flatpak + upload-artifact: false manifest-path: .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.json arch: x86_64 build-bundle: true @@ -131,3 +134,16 @@ jobs: repository: stable token: ${{ secrets.FLATHUB_TOKEN }} + # NOTE - this is done after on purpose so the flatpak file is wherever it needs to be for the previous pushes + - name: Prepare artifacts folder + # NOTE - 'flatpak-builder' dumps the artifact out into the current directory + run: | + mkdir -p "$GITHUB_WORKSPACE"/ci-artifacts/ + mv "./${{ steps.artifact-metadata.outputs.artifact-name }}.flatpak" "$GITHUB_WORKSPACE"/ci-artifacts/ + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ steps.artifact-metadata.outputs.artifact-name }} + path: ci-artifacts + diff --git a/.github/workflows/linux_build_matrix.yml b/.github/workflows/linux_build_matrix.yml index 6c49a93778..37988f3836 100644 --- a/.github/workflows/linux_build_matrix.yml +++ b/.github/workflows/linux_build_matrix.yml @@ -15,6 +15,7 @@ jobs: uses: ./.github/workflows/linux_build_qt.yml with: jobName: "AppImage Build" + artifactPrefixName: "PCSX2-linux-Qt-x64-appimage-sse4" compiler: clang cmakeflags: "" buildAppImage: true @@ -25,6 +26,7 @@ jobs: uses: ./.github/workflows/linux_build_flatpak.yml with: jobName: "Flatpak Build" + artifactPrefixName: "PCSX2-linux-Qt-x64-flatpak-sse4" compiler: clang cmakeflags: "" publish: false diff --git a/.github/workflows/linux_build_qt.yml b/.github/workflows/linux_build_qt.yml index f3f70123e0..8dbb565cbe 100644 --- a/.github/workflows/linux_build_qt.yml +++ b/.github/workflows/linux_build_qt.yml @@ -6,6 +6,9 @@ on: jobName: required: true type: string + artifactPrefixName: + required: true + type: string os: required: false type: string @@ -73,8 +76,7 @@ jobs: id: artifact-metadata shell: bash env: - OS: linux - ARCH: ${{ inputs.platform }} + PREFIX: ${{ inputs.artifactPrefixName }} EVENT_NAME: ${{ github.event_name }} PR_TITLE: ${{ github.event.pull_request.title }} PR_NUM: ${{ github.event.pull_request.number }} @@ -142,7 +144,7 @@ jobs: - name: Upload artifact if: inputs.buildAppImage == true - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ steps.artifact-metadata.outputs.artifact-name }} path: ci-artifacts diff --git a/.github/workflows/macos_build.yml b/.github/workflows/macos_build.yml index 7d56457486..0a773987de 100644 --- a/.github/workflows/macos_build.yml +++ b/.github/workflows/macos_build.yml @@ -6,6 +6,9 @@ on: jobName: required: true type: string + artifactPrefixName: + required: true + type: string os: required: false type: string @@ -51,7 +54,7 @@ jobs: id: artifact-metadata shell: bash env: - OS: macos + PREFIX: ${{ inputs.artifactPrefixName }} EVENT_NAME: ${{ github.event_name }} PR_TITLE: ${{ github.event.pull_request.title }} PR_NUM: ${{ github.event.pull_request.number }} @@ -149,7 +152,7 @@ jobs: cp "${{ steps.artifact-metadata.outputs.artifact-name }}.tar.xz" ci-artifacts/macOS.tar.xz - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ steps.artifact-metadata.outputs.artifact-name }} path: "*.tar.xz" diff --git a/.github/workflows/macos_build_matrix.yml b/.github/workflows/macos_build_matrix.yml index 6b060fd658..b620a3c1f6 100644 --- a/.github/workflows/macos_build_matrix.yml +++ b/.github/workflows/macos_build_matrix.yml @@ -15,4 +15,5 @@ jobs: uses: ./.github/workflows/macos_build.yml with: jobName: "MacOS Build" + artifactPrefixName: "PCSX2-macos-Qt" secrets: inherit diff --git a/.github/workflows/release_cut_new.yml b/.github/workflows/release_cut_new.yml index 2ecaf94dff..d6803f2666 100644 --- a/.github/workflows/release_cut_new.yml +++ b/.github/workflows/release_cut_new.yml @@ -81,6 +81,7 @@ jobs: uses: ./.github/workflows/linux_build_qt.yml with: jobName: "AppImage Build" + artifactPrefixName: "PCSX2-linux-Qt-x64-appimage" compiler: clang cmakeflags: "" buildAppImage: true @@ -95,6 +96,7 @@ jobs: uses: ./.github/workflows/linux_build_flatpak.yml with: jobName: "Flatpak Build" + artifactPrefixName: "PCSX2-linux-Qt-x64-flatpak" compiler: clang cmakeflags: "" branch: "stable" @@ -111,6 +113,7 @@ jobs: uses: ./.github/workflows/windows_build_qt.yml with: jobName: "Windows Build" + artifactPrefixName: "PCSX2-windows-Qt-x64" configuration: CMake buildSystem: cmake cmakeFlags: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl @@ -126,6 +129,7 @@ jobs: uses: ./.github/workflows/macos_build.yml with: jobName: "MacOS Build" + artifactPrefixName: "PCSX2-macos-Qt" fetchTags: true secrets: inherit @@ -146,7 +150,7 @@ jobs: - name: Prepare Artifact Folder run: mkdir ./ci-artifacts/ - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 name: Download all Artifacts with: path: ./ci-artifacts/ diff --git a/.github/workflows/scripts/common/name-artifacts.sh b/.github/workflows/scripts/common/name-artifacts.sh index f803be285c..8af0dc2a78 100755 --- a/.github/workflows/scripts/common/name-artifacts.sh +++ b/.github/workflows/scripts/common/name-artifacts.sh @@ -1,39 +1,26 @@ #!/bin/bash # Artifact Naming Scheme: -# PCSX2--Qt-[ARCH]-[SIMD]-[pr\[PR_NUM\]]-[title|sha\[SHA|PR_TITLE\] +# PCSX2--Qt-[BUILD_SYSTEM]-[ARCH]-[SIMD]-[pr\[PR_NUM\]]-[title|sha\[SHA|PR_TITLE\] # -- limited to 200 chars # Outputs: # - artifact-name +# Example - PCSX2-linux-Qt-x64-flatpak-sse4-sha[e880a2749] + # Inputs as env-vars -# OS -# BUILD_SYSTEM -# ARCH -# SIMD +# PREFIX # EVENT_NAME # PR_TITLE # PR_NUM # PR_SHA -NAME="" - -if [ "${OS}" == "macos" ]; then - # MacOS has combined binaries for x64 and ARM64. - NAME="PCSX2-${OS}-Qt" -elif [[ ("${OS}" == "windows" && "$BUILD_SYSTEM" != "cmake") ]]; then - NAME="PCSX2-${OS}-Qt-${ARCH}-${SIMD}" -else - NAME="PCSX2-${OS}-Qt-${ARCH}" +if [[ -z "${PREFIX}" ]]; then + echo "PREFIX is not set, can't name artifact without it!" + exit 1 fi -# Add cmake if used to differentate it from msbuild builds -# Else the two artifacts will have the same name and the files will be merged -if [[ ! -z "${BUILD_SYSTEM}" ]]; then - if [[ "${BUILD_SYSTEM}" == "cmake" ]] || [[ "${BUILD_SYSTEM}" == "flatpak" ]]; then - NAME="${NAME}-${BUILD_SYSTEM}" - fi -fi +NAME="${PREFIX}" # Add PR / Commit Metadata if [ "$EVENT_NAME" == "pull_request" ]; then diff --git a/.github/workflows/triage_pr.yml b/.github/workflows/triage_pr.yml index 00f1f49212..62a93ec4bc 100644 --- a/.github/workflows/triage_pr.yml +++ b/.github/workflows/triage_pr.yml @@ -8,7 +8,7 @@ jobs: if: github.repository == 'PCSX2/pcsx2' runs-on: ubuntu-latest steps: - - uses: actions/labeler@v4.3.0 + - uses: actions/labeler@v5 with: repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/windows_build_matrix.yml b/.github/workflows/windows_build_matrix.yml index d12a9b5d3d..eb82582891 100644 --- a/.github/workflows/windows_build_matrix.yml +++ b/.github/workflows/windows_build_matrix.yml @@ -27,6 +27,7 @@ jobs: uses: ./.github/workflows/windows_build_qt.yml with: jobName: "MSVC SSE4" + artifactPrefixName: "PCSX2-windows-Qt-x64-sse4-msvc" configuration: Release simd: "SSE4" secrets: inherit @@ -38,6 +39,7 @@ jobs: uses: ./.github/workflows/windows_build_qt.yml with: jobName: "MSVC AVX2" + artifactPrefixName: "PCSX2-windows-Qt-x64-avx2-msvc" configuration: Release AVX2 secrets: inherit @@ -47,6 +49,7 @@ jobs: uses: ./.github/workflows/windows_build_qt.yml with: jobName: "CMake MSVC" + artifactPrefixName: "PCSX2-windows-Qt-x64-cmake-msvc" configuration: CMake buildSystem: cmake secrets: inherit @@ -58,6 +61,7 @@ jobs: uses: ./.github/workflows/windows_build_qt.yml with: jobName: "Clang SSE4" + artifactPrefixName: "PCSX2-windows-Qt-x64-sse4-clang" configuration: Release Clang simd: "SSE4" secrets: inherit @@ -69,6 +73,7 @@ jobs: uses: ./.github/workflows/windows_build_qt.yml with: jobName: "Clang AVX2" + artifactPrefixName: "PCSX2-windows-Qt-x64-avx2-clang" configuration: Release Clang AVX2 secrets: inherit @@ -78,6 +83,7 @@ jobs: uses: ./.github/workflows/windows_build_qt.yml with: jobName: "CMake Clang" + artifactPrefixName: "PCSX2-windows-Qt-x64-cmake-clang" configuration: CMake buildSystem: cmake cmakeFlags: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DPCSX2_EXE_NAME=pcsx2-qt-clang diff --git a/.github/workflows/windows_build_qt.yml b/.github/workflows/windows_build_qt.yml index 85d4407fc6..3f16d49d1a 100644 --- a/.github/workflows/windows_build_qt.yml +++ b/.github/workflows/windows_build_qt.yml @@ -6,6 +6,9 @@ on: jobName: required: true type: string + artifactPrefixName: + required: true + type: string os: required: false type: string @@ -62,10 +65,7 @@ jobs: id: artifact-metadata shell: bash env: - OS: windows - BUILD_SYSTEM: ${{ inputs.buildSystem }} - ARCH: ${{ inputs.platform }} - SIMD: ${{ inputs.simd }} + PREFIX: ${{ inputs.artifactPrefixName }} EVENT_NAME: ${{ github.event_name }} PR_TITLE: ${{ github.event.pull_request.title }} PR_NUM: ${{ github.event.pull_request.number }} @@ -122,7 +122,7 @@ jobs: cmake --build build --config Release --target unittests - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ steps.artifact-metadata.outputs.artifact-name }} path: | @@ -136,7 +136,7 @@ jobs: !./bin/**/*.lib - name: Upload artifact - with symbols - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ steps.artifact-metadata.outputs.artifact-name }}-symbols path: ./bin/**/*.pdb