CI: fix branch name and PR number
Some checks are pending
Build RPCS3 / RPCS3 Linux ubuntu-24.04 gcc (push) Waiting to run
Build RPCS3 / RPCS3 Linux ubuntu-24.04-arm clang (push) Waiting to run
Build RPCS3 / RPCS3 Linux ubuntu-24.04 clang (push) Waiting to run
Build RPCS3 / RPCS3 Mac Intel (push) Waiting to run
Build RPCS3 / RPCS3 Mac Apple Silicon (push) Waiting to run
Build RPCS3 / RPCS3 Windows (push) Waiting to run
Build RPCS3 / RPCS3 FreeBSD (push) Waiting to run

This commit is contained in:
Megamouse 2025-06-14 23:07:54 +02:00
parent 9610d45ebf
commit 9634e58f0a
3 changed files with 6 additions and 8 deletions

View file

@ -2,8 +2,8 @@
# These are Azure specific, so we wrap them for portability # These are Azure specific, so we wrap them for portability
REPO_NAME="$BUILD_REPOSITORY_NAME" REPO_NAME="$BUILD_REPOSITORY_NAME"
REPO_BRANCH="$SYSTEM_PULLREQUEST_SOURCEBRANCH" REPO_BRANCH="$BUILD_SOURCEBRANCHNAME"
PR_NUMBER="$SYSTEM_PULLREQUEST_PULLREQUESTID" PR_NUMBER="$BUILD_PR_NUMBER"
# Resource/dependency URLs # Resource/dependency URLs
# Qt mirrors can be volatile and slow, so we list 2 # Qt mirrors can be volatile and slow, so we list 2

View file

@ -17,6 +17,7 @@ concurrency:
env: env:
BUILD_REPOSITORY_NAME: ${{ github.repository }} BUILD_REPOSITORY_NAME: ${{ github.repository }}
BUILD_SOURCEBRANCHNAME: ${{ github.ref_name }} BUILD_SOURCEBRANCHNAME: ${{ github.ref_name }}
BUILD_PR_NUMBER: ${{ github.event.pull_request.number }}
BUILD_SOURCEVERSION: ${{ github.sha }} BUILD_SOURCEVERSION: ${{ github.sha }}
BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ github.workspace }}/artifacts/ BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ github.workspace }}/artifacts/

View file

@ -94,8 +94,6 @@ if defined BUILD_SOURCEBRANCHNAME (
rem // This must be a CI build rem // This must be a CI build
echo SYSTEM_PULLREQUEST_SOURCEBRANCH: %SYSTEM_PULLREQUEST_SOURCEBRANCH%
if defined BUILD_REPOSITORY_NAME ( if defined BUILD_REPOSITORY_NAME (
echo BUILD_REPOSITORY_NAME: %BUILD_REPOSITORY_NAME% echo BUILD_REPOSITORY_NAME: %BUILD_REPOSITORY_NAME%
) else ( ) else (
@ -110,7 +108,6 @@ if defined BUILD_SOURCEBRANCHNAME (
rem // These environment variables are defined by CI rem // These environment variables are defined by CI
rem // BUILD_REPOSITORY_NAME will look like "RPCS3/rpcs3" rem // BUILD_REPOSITORY_NAME will look like "RPCS3/rpcs3"
rem // SYSTEM_PULLREQUEST_SOURCEBRANCH will look like "master"
rem // BUILD_SOURCEBRANCHNAME will look like "master" rem // BUILD_SOURCEBRANCHNAME will look like "master"
set GIT_FULL_BRANCH=%BUILD_REPOSITORY_NAME%/%BUILD_SOURCEBRANCHNAME% set GIT_FULL_BRANCH=%BUILD_REPOSITORY_NAME%/%BUILD_SOURCEBRANCHNAME%
echo GIT_FULL_BRANCH: !GIT_FULL_BRANCH! echo GIT_FULL_BRANCH: !GIT_FULL_BRANCH!
@ -128,12 +125,12 @@ if defined BUILD_SOURCEBRANCHNAME (
rem // This must be a pull request or a build from a fork. rem // This must be a pull request or a build from a fork.
echo Assuming pull request build echo Assuming pull request build
if "%SYSTEM_PULLREQUEST_SOURCEBRANCH%"=="master" ( if "%BUILD_SOURCEBRANCHNAME%"=="master" (
rem // If pull request comes from a master branch, GIT_BRANCH = username/branch in order to distinguish from upstream/master rem // If pull request comes from a master branch, GIT_BRANCH = username/branch in order to distinguish from upstream/master
for /f "tokens=1* delims=/" %%a in ("%BUILD_REPOSITORY_NAME%") do set user=%%a for /f "tokens=1* delims=/" %%a in ("%BUILD_REPOSITORY_NAME%") do set user=%%a
set "GIT_BRANCH=!user!/%SYSTEM_PULLREQUEST_SOURCEBRANCH%" set "GIT_BRANCH=!user!/%BUILD_SOURCEBRANCHNAME%"
) else ( ) else (
set GIT_BRANCH=%SYSTEM_PULLREQUEST_SOURCEBRANCH% set GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%
) )
rem // Make GIT_VERSION the last commit (shortened); Don't include commit count on non-release builds rem // Make GIT_VERSION the last commit (shortened); Don't include commit count on non-release builds