CI: migrate to upload-artifact@v4, download-artifact@v4 and labeler@v5 (#10431)

* Bump actions/upload-artifact from 3 to 4

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump actions/download-artifact from 3 to 4

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* github: group github actions updates going forward

* ci: update to labeler@v5

* ci: properly differentiate between windows build artifacts on PRs

* ci: workaround flatpak-builder temporarily as well as test fix

* ci: simplify things, just explicitly specify the artifact names in the workflows

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
This commit is contained in:
dependabot[bot] 2024-01-06 15:44:44 -05:00 committed by GitHub
parent eef53f1b54
commit 7207681485
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 210 additions and 125 deletions

View File

@ -6,3 +6,7 @@ updates:
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
groups:
ci-deps:
patterns:
- "*"

60
.github/labeler.yml vendored
View File

@ -2,6 +2,8 @@
# General Labels
'Build | Project System':
- changed-files:
- any-glob-to-any-file:
- '.github/*'
- '.github/**/*'
- '*.sln'
@ -14,52 +16,78 @@
- '**/CMakeLists.txt'
- 'build.sh'
'Dependencies':
- changed-files:
- any-glob-to-any-file:
- '3rdparty/*'
- '3rdparty/**/*'
- '**/3rdpartyDeps.props'
- '.gitmodules'
'Documentation':
- changed-files:
- any-glob-to-any-file:
- '*.md'
- '**/*.md'
- '*.pdf'
- '**/*.pdf'
'GUI/Qt':
- changed-files:
- any-glob-to-any-file:
- 'pcsx2-qt/*'
- 'pcsx2-qt/**/*'
- '3rdparty/Qt/*'
- '3rdparty/Qt/**/*'
'GameDB':
- changed-files:
- any-glob-to-any-file:
- '**/GameIndex.*'
'Installer | Package':
- changed-files:
- any-glob-to-any-file:
- 'build.sh'
'Translations':
- changed-files:
- any-glob-to-any-file:
- 'pcsx2-qt/Translations/*'
# Tools / Features
'Debugger':
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/DebugTools/*'
- 'pcsx2/DebugTools/**/*'
- 'pcsx2-qt/Debugger/*'
- 'pcsx2-qt/Debugger/**/*'
'IPC':
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/IPC*'
- 'pcsx2/**/IPC*'
'TAS Functionality':
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/Recording/*'
- 'pcsx2/Recording/**/*'
'RetroAchievements':
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/Frontend/Achievements.*'
- 'pcsx2/Achievements.*'
# Emulation Components
'Counters':
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/Counters.*'
'Vector Units':
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/VU*'
- 'pcsx2/**/VU*'
- 'pcsx2/*VU*'
- 'pcsx2/**/*VU*'
'VIF':
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/Vif*'
- 'pcsx2/**/Vif*'
- 'pcsx2/VIF*'
@ -67,62 +95,94 @@
# GS Related Labels
'GS':
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/GS/*'
- 'pcsx2/GS/**/*'
- 'bin/resources/shaders/*'
- 'bin/resources/shaders/**/*'
'GS: Direct3D 11':
- 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':
- 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':
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/GS/Renderers/HW/*'
- 'pcsx2/GS/Renderers/HW/**/*'
'GS: 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':
- 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':
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/GS/Renderers/Metal/*'
- 'pcsx2/GS/Renderers/Metal/**/*'
'GS: Texture Cache':
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/GS/Renderers/*TextureCache*.*'
- 'pcsx2/GS/Renderers/**/*TextureCache*.*'
'GS: Software':
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/GS/Renderers/SW/*'
- 'pcsx2/GS/Renderers/SW/**/*'
# Other Core Components
'CDVD':
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/CDVD/*'
- 'pcsx2/CDVD/**/*'
'DEV9':
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/DEV9/*'
- 'pcsx2/DEV9/**/*'
'IPU':
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/IPU/*'
- 'pcsx2/IPU/**/*'
'Memory Card':
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/SIO/Memcard/*'
- 'pcsx2/SIO/Memcard/**/*'
'PAD':
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/SIO/Pad/*'
- 'pcsx2/SIO/Pad/**/*'
'SPU2':
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/SPU2/*'
- 'pcsx2/SPU2/**/*'
'USB':
- changed-files:
- any-glob-to-any-file:
- 'pcsx2/USB/*'
- 'pcsx2/USB/**/*'

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -15,4 +15,5 @@ jobs:
uses: ./.github/workflows/macos_build.yml
with:
jobName: "MacOS Build"
artifactPrefixName: "PCSX2-macos-Qt"
secrets: inherit

View File

@ -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/

View File

@ -1,39 +1,26 @@
#!/bin/bash
# Artifact Naming Scheme:
# PCSX2-<OS>-Qt-[ARCH]-[SIMD]-[pr\[PR_NUM\]]-[title|sha\[SHA|PR_TITLE\]
# PCSX2-<OS>-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

View File

@ -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 }}

View File

@ -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

View File

@ -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