Switch Windows and Linux x64 builds and deployments to GitHub Actions

This commit is contained in:
Zion Nimchuk 2025-03-01 11:06:41 -08:00 committed by Megamouse
parent 1dc3ebf891
commit b3d28e2309
2 changed files with 126 additions and 119 deletions

View file

@ -1,5 +1,8 @@
name: Build RPCS3 name: Build RPCS3
defaults:
run:
shell: bash
on: on:
push: push:
paths-ignore: paths-ignore:
@ -33,6 +36,8 @@ jobs:
docker_img: "rpcs3/rpcs3-ci-jammy:1.1" docker_img: "rpcs3/rpcs3-ci-jammy:1.1"
build_sh: "/rpcs3/.ci/build-linux.sh" build_sh: "/rpcs3/.ci/build-linux.sh"
compiler: clang compiler: clang
UPLOAD_COMMIT_HASH: d812f1254a1157c80fd402f94446310560f54e5f
UPLOAD_REPO_FULL_NAME: "rpcs3/rpcs3-binaries-linux"
- os: ubuntu-24.04 - os: ubuntu-24.04
docker_img: "rpcs3/rpcs3-ci-jammy:1.1" docker_img: "rpcs3/rpcs3-ci-jammy:1.1"
build_sh: "/rpcs3/.ci/build-linux.sh" build_sh: "/rpcs3/.ci/build-linux.sh"
@ -92,8 +97,7 @@ jobs:
github.event_name != 'pull_request' && github.event_name != 'pull_request' &&
github.repository == 'RPCS3/rpcs3' && github.repository == 'RPCS3/rpcs3' &&
github.ref == 'refs/heads/master' && github.ref == 'refs/heads/master' &&
matrix.compiler == 'clang' && matrix.compiler == 'clang'
runner.arch == 'ARM64'
env: env:
RPCS3_TOKEN: ${{ secrets.RPCS3_TOKEN }} RPCS3_TOKEN: ${{ secrets.RPCS3_TOKEN }}
run: | run: |
@ -120,6 +124,8 @@ jobs:
CCACHE_INODECACHE: 'true' CCACHE_INODECACHE: 'true'
CCACHE_SLOPPINESS: 'time_macros' CCACHE_SLOPPINESS: 'time_macros'
DEPS_CACHE_DIR: ./dependency_cache DEPS_CACHE_DIR: ./dependency_cache
UPLOAD_COMMIT_HASH: 7d09e3be30805911226241afbb14f8cdc2eb054e
UPLOAD_REPO_FULL_NAME: "RPCS3/rpcs3-binaries-win"
steps: steps:
- name: Checkout repository - name: Checkout repository
@ -128,12 +134,12 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- name: Setup env - name: Setup env
shell: pwsh
run: | run: |
echo "QTDIR=C:\Qt\${{ env.QT_VER }}\${{ env.QT_VER_MSVC }}_64" >> ${{ github.env }} echo "QTDIR=C:\Qt\${{ env.QT_VER }}\${{ env.QT_VER_MSVC }}_64" >> ${{ github.env }}
echo "VULKAN_SDK=C:\VulkanSDK\${{ env.VULKAN_VER }}" >> ${{ github.env }} echo "VULKAN_SDK=C:\VulkanSDK\${{ env.VULKAN_VER }}" >> ${{ github.env }}
- name: Get Cache Keys - name: Get Cache Keys
shell: bash
run: .ci/get_keys-windows.sh run: .ci/get_keys-windows.sh
- name: Setup Build Ccache - name: Setup Build Ccache
@ -151,11 +157,9 @@ jobs:
restore-keys: ${{ runner.os }}-${{ env.COMPILER }}- restore-keys: ${{ runner.os }}-${{ env.COMPILER }}-
- name: Download and unpack dependencies - name: Download and unpack dependencies
shell: bash
run: .ci/setup-windows.sh run: .ci/setup-windows.sh
- name: Export Variables - name: Export Variables
shell: bash
run: | run: |
while IFS='=' read -r key val; do while IFS='=' read -r key val; do
# Skip lines that are empty or start with '#' # Skip lines that are empty or start with '#'
@ -167,24 +171,27 @@ jobs:
uses: microsoft/setup-msbuild@main uses: microsoft/setup-msbuild@main
- name: Compile RPCS3 - name: Compile RPCS3
shell: pwsh
run: msbuild rpcs3.sln /p:Configuration=Release /p:Platform=x64 /p:CLToolPath=${{ env.CCACHE_BIN_DIR }} /p:UseMultiToolTask=true /p:CustomAfterMicrosoftCommonTargets="${{ github.workspace }}\buildfiles\msvc\ci_no_debug_info.targets" run: msbuild rpcs3.sln /p:Configuration=Release /p:Platform=x64 /p:CLToolPath=${{ env.CCACHE_BIN_DIR }} /p:UseMultiToolTask=true /p:CustomAfterMicrosoftCommonTargets="${{ github.workspace }}\buildfiles\msvc\ci_no_debug_info.targets"
- name: Pack up build artifacts - name: Pack up build artifacts
shell: bash
run: | run: |
mkdir -p "${{ env.BUILD_ARTIFACTSTAGINGDIRECTORY }}" mkdir -p "${{ env.BUILD_ARTIFACTSTAGINGDIRECTORY }}"
.ci/deploy-windows.sh .ci/deploy-windows.sh
- name: Upload artifacts (7z) - name: Upload artifacts (7z)
#TODO: Upload artifact to release repository
#condition for release
#if: |
# github.event_name != 'pull_request' &&
# github.repository == 'RPCS3/rpcs3' &&
# github.ref == 'refs/heads/master'
uses: actions/upload-artifact@main uses: actions/upload-artifact@main
with: with:
name: RPCS3 for Windows (MSVC) name: RPCS3 for Windows (MSVC)
path: ${{ env.BUILD_ARTIFACTSTAGINGDIRECTORY }} path: ${{ env.BUILD_ARTIFACTSTAGINGDIRECTORY }}
compression-level: 0 compression-level: 0
if-no-files-found: error if-no-files-found: error
- name: Deploy master build to GitHub Releases
if: |
github.event_name != 'pull_request' &&
github.repository == 'RPCS3/rpcs3' &&
github.ref == 'refs/heads/master'
env:
RPCS3_TOKEN: ${{ secrets.RPCS3_TOKEN }}
run: .ci/github-upload.sh

View file

@ -10,131 +10,131 @@ pr:
include: include:
- master - master
jobs: jobs:
- job: Linux_Build # - job: Linux_Build
strategy: # strategy:
matrix: # matrix:
Clang: # Clang:
COMPILER: clang # COMPILER: clang
GCC: # GCC:
COMPILER: gcc # COMPILER: gcc
variables: # variables:
CCACHE_DIR: $(Pipeline.Workspace)/ccache # CCACHE_DIR: $(Pipeline.Workspace)/ccache
CI_HAS_ARTIFACTS: true # CI_HAS_ARTIFACTS: true
UPLOAD_COMMIT_HASH: d812f1254a1157c80fd402f94446310560f54e5f # UPLOAD_COMMIT_HASH: d812f1254a1157c80fd402f94446310560f54e5f
UPLOAD_REPO_FULL_NAME: "RPCS3/rpcs3-binaries-linux" # UPLOAD_REPO_FULL_NAME: "RPCS3/rpcs3-binaries-linux"
DEPLOY_APPIMAGE: true # DEPLOY_APPIMAGE: true
APPDIR: "/rpcs3/build/appdir" # APPDIR: "/rpcs3/build/appdir"
ARTDIR: "/root/artifacts" # ARTDIR: "/root/artifacts"
RELEASE_MESSAGE: "/rpcs3/GitHubReleaseMessage.txt" # RELEASE_MESSAGE: "/rpcs3/GitHubReleaseMessage.txt"
pool: # pool:
vmImage: 'ubuntu-latest' # vmImage: 'ubuntu-latest'
steps: # steps:
- task: Cache@2 # - task: Cache@2
inputs: # inputs:
key: ccache | $(Agent.OS) | $(COMPILER) | $(Build.SourceVersion) # key: ccache | $(Agent.OS) | $(COMPILER) | $(Build.SourceVersion)
restoreKeys: | # restoreKeys: |
ccache | $(Agent.OS) | $(COMPILER) # ccache | $(Agent.OS) | $(COMPILER)
path: $(CCACHE_DIR) # path: $(CCACHE_DIR)
displayName: ccache # displayName: ccache
- bash: | # - bash: |
docker pull --quiet rpcs3/rpcs3-ci-jammy:1.1 # docker pull --quiet rpcs3/rpcs3-ci-jammy:1.1
docker run \ # docker run \
-v $(pwd):/rpcs3 \ # -v $(pwd):/rpcs3 \
--env-file .ci/docker.env \ # --env-file .ci/docker.env \
-v $CCACHE_DIR:/root/.ccache \ # -v $CCACHE_DIR:/root/.ccache \
-v $BUILD_ARTIFACTSTAGINGDIRECTORY:/root/artifacts \ # -v $BUILD_ARTIFACTSTAGINGDIRECTORY:/root/artifacts \
rpcs3/rpcs3-ci-jammy:1.1 \ # rpcs3/rpcs3-ci-jammy:1.1 \
/rpcs3/.ci/build-linux.sh # /rpcs3/.ci/build-linux.sh
displayName: Docker setup and build # displayName: Docker setup and build
- publish: $(Build.ArtifactStagingDirectory) # - publish: $(Build.ArtifactStagingDirectory)
condition: succeeded() # condition: succeeded()
artifact: RPCS3 for Linux ($(COMPILER)) # artifact: RPCS3 for Linux ($(COMPILER))
- bash: | # - bash: |
COMM_TAG=$(awk '/version{.*}/ { printf("%d.%d.%d", $5, $6, $7) }' ./rpcs3/rpcs3_version.cpp) # COMM_TAG=$(awk '/version{.*}/ { printf("%d.%d.%d", $5, $6, $7) }' ./rpcs3/rpcs3_version.cpp)
COMM_COUNT=$(git rev-list --count HEAD) # COMM_COUNT=$(git rev-list --count HEAD)
COMM_HASH=$(git rev-parse --short=8 HEAD) # COMM_HASH=$(git rev-parse --short=8 HEAD)
export AVVER="${COMM_TAG}-${COMM_COUNT}" # export AVVER="${COMM_TAG}-${COMM_COUNT}"
.ci/github-upload.sh # .ci/github-upload.sh
condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.Repository.Name'], 'RPCS3/rpcs3'), eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['COMPILER'], 'clang')) # condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.Repository.Name'], 'RPCS3/rpcs3'), eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['COMPILER'], 'clang'))
displayName: Push build to GitHub # displayName: Push build to GitHub
env: # env:
RPCS3_TOKEN: $(RPCS3-Token) # RPCS3_TOKEN: $(RPCS3-Token)
- job: Windows_Build # - job: Windows_Build
variables: # variables:
COMPILER: msvc # COMPILER: msvc
QT_VER_MAIN: '6' # QT_VER_MAIN: '6'
QT_VER: '6.8.2' # QT_VER: '6.8.2'
QT_VER_MSVC: 'msvc2022' # QT_VER_MSVC: 'msvc2022'
QT_DATE: '202501260838' # QT_DATE: '202501260838'
QTDIR: C:\Qt\$(QT_VER)\$(QT_VER_MSVC)_64 # QTDIR: C:\Qt\$(QT_VER)\$(QT_VER_MSVC)_64
VULKAN_VER: '1.3.268.0' # VULKAN_VER: '1.3.268.0'
VULKAN_SDK_SHA: '8459ef49bd06b697115ddd3d97c9aec729e849cd775f5be70897718a9b3b9db5' # VULKAN_SDK_SHA: '8459ef49bd06b697115ddd3d97c9aec729e849cd775f5be70897718a9b3b9db5'
VULKAN_SDK: C:\VulkanSDK\$(VULKAN_VER) # VULKAN_SDK: C:\VulkanSDK\$(VULKAN_VER)
CCACHE_SHA: '6252f081876a9a9f700fae13a5aec5d0d486b28261d7f1f72ac11c7ad9df4da9' # CCACHE_SHA: '6252f081876a9a9f700fae13a5aec5d0d486b28261d7f1f72ac11c7ad9df4da9'
CCACHE_BIN_DIR: 'C:\ccache_bin' # CCACHE_BIN_DIR: 'C:\ccache_bin'
CCACHE_DIR: 'C:\ccache' # CCACHE_DIR: 'C:\ccache'
CCACHE_INODECACHE: 'true' # CCACHE_INODECACHE: 'true'
CCACHE_SLOPPINESS: 'time_macros' # CCACHE_SLOPPINESS: 'time_macros'
DEPS_CACHE_DIR: ./dependency_cache # DEPS_CACHE_DIR: ./dependency_cache
UPLOAD_COMMIT_HASH: 7d09e3be30805911226241afbb14f8cdc2eb054e # UPLOAD_COMMIT_HASH: 7d09e3be30805911226241afbb14f8cdc2eb054e
UPLOAD_REPO_FULL_NAME: "RPCS3/rpcs3-binaries-win" # UPLOAD_REPO_FULL_NAME: "RPCS3/rpcs3-binaries-win"
pool: # pool:
vmImage: "windows-latest" # vmImage: "windows-latest"
steps: # steps:
- bash: .ci/get_keys-windows.sh # - bash: .ci/get_keys-windows.sh
displayName: Get Cache Keys # displayName: Get Cache Keys
- task: Cache@2 # - task: Cache@2
inputs: # inputs:
key: ccache | $(Agent.OS) | $(COMPILER) | "$(Build.SourceVersion)" # key: ccache | $(Agent.OS) | $(COMPILER) | "$(Build.SourceVersion)"
path: $(CCACHE_DIR) # path: $(CCACHE_DIR)
restoreKeys: # restoreKeys:
ccache | $(Agent.OS) | $(COMPILER) # ccache | $(Agent.OS) | $(COMPILER)
displayName: Build Ccache # displayName: Build Ccache
- task: Cache@2 # - task: Cache@2
inputs: # inputs:
key: $(Agent.OS) | $(COMPILER) | "$(QT_VER)" | $(VULKAN_SDK_SHA) | $(CCACHE_SHA) | llvm.lock | glslang.lock # key: $(Agent.OS) | $(COMPILER) | "$(QT_VER)" | $(VULKAN_SDK_SHA) | $(CCACHE_SHA) | llvm.lock | glslang.lock
path: $(DEPS_CACHE_DIR) # path: $(DEPS_CACHE_DIR)
displayName: Dependencies Cache # displayName: Dependencies Cache
- bash: .ci/setup-windows.sh # - bash: .ci/setup-windows.sh
displayName: Download and unpack dependencies # displayName: Download and unpack dependencies
- bash: .ci/export-azure-vars.sh # - bash: .ci/export-azure-vars.sh
displayName: Export Variables # displayName: Export Variables
- task: VSBuild@1 # - task: VSBuild@1
inputs: # inputs:
solution: 'rpcs3.sln' # solution: 'rpcs3.sln'
maximumCpuCount: true # maximumCpuCount: true
platform: x64 # platform: x64
configuration: 'Release' # configuration: 'Release'
msbuildArgs: /p:CLToolPath=$(CCACHE_BIN_DIR) /p:UseMultiToolTask=true /p:CustomAfterMicrosoftCommonTargets="$(Build.SourcesDirectory)\buildfiles\msvc\ci_no_debug_info.targets" # msbuildArgs: /p:CLToolPath=$(CCACHE_BIN_DIR) /p:UseMultiToolTask=true /p:CustomAfterMicrosoftCommonTargets="$(Build.SourcesDirectory)\buildfiles\msvc\ci_no_debug_info.targets"
displayName: Compile RPCS3 # displayName: Compile RPCS3
- bash: .ci/deploy-windows.sh # - bash: .ci/deploy-windows.sh
displayName: Pack up build artifacts # displayName: Pack up build artifacts
- publish: $(Build.ArtifactStagingDirectory) # - publish: $(Build.ArtifactStagingDirectory)
condition: succeeded() # condition: succeeded()
artifact: RPCS3 for Windows # artifact: RPCS3 for Windows
- bash: .ci/github-upload.sh # - bash: .ci/github-upload.sh
condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.Repository.Name'], 'RPCS3/rpcs3'), eq(variables['Build.SourceBranch'], 'refs/heads/master')) # condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.Repository.Name'], 'RPCS3/rpcs3'), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
displayName: Push build to GitHub # displayName: Push build to GitHub
env: # env:
RPCS3_TOKEN: $(RPCS3-Token) # RPCS3_TOKEN: $(RPCS3-Token)
- job: Mac_Build_x86_64 - job: Mac_Build_x86_64
timeoutInMinutes: 180 timeoutInMinutes: 180