forked from PCSX2/pcsx2
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2fc4d02
commit 75a81e9
Showing
7 changed files
with
474 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Merge from upstream | ||
on: | ||
schedule: | ||
# scheduled for 00:00 every day | ||
- cron: '0 0 * * *' | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
merge-from-upstream-repo: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.SYNC_TOKEN }} | ||
|
||
- name: Merge from upstream repo | ||
uses: aormsby/Fork-Sync-With-Upstream-action@main | ||
with: | ||
target_sync_branch: master | ||
upstream_sync_branch: master | ||
upstream_sync_repo: PCSX2/pcsx2 | ||
|
||
- name: New commits found | ||
if: steps.sync.outputs.has_new_commits == 'true' | ||
run: echo "New commits were found to sync." | ||
|
||
- name: No new commits | ||
if: steps.sync.outputs.has_new_commits == 'false' | ||
run: echo "There were no new commits." | ||
|
||
- name: Show value of 'has_new_commits' | ||
run: echo ${{ steps.sync.outputs.has_new_commits }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Fork Windows Builds | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
jobs: | ||
# MSBUILD | ||
lint_vs_proj_files: | ||
name: Lint VS Project Files | ||
runs-on: windows-2022 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
- name: Verify VS Project Files | ||
run: .github\workflows\scripts\windows\validate-vs-filters.ps1 | ||
|
||
build_qt_sse4: | ||
needs: lint_vs_proj_files | ||
name: "SSE4" | ||
uses: ./.github/workflows/windows_build_qt_fork.yml | ||
with: | ||
jobName: "MSVC-SSE4" | ||
artifactPrefixName: "PCSX2-windows-Qt-x64-sse4-msvc" | ||
configuration: Release | ||
simd: "SSE4" | ||
secrets: inherit | ||
|
||
build_qt_avx2: | ||
needs: lint_vs_proj_files | ||
name: "AVX2" | ||
uses: ./.github/workflows/windows_build_qt_fork.yml | ||
with: | ||
jobName: "MSVC-AVX2" | ||
artifactPrefixName: "PCSX2-windows-Qt-x64-avx2-msvc" | ||
configuration: Release AVX2 | ||
secrets: inherit | ||
|
||
build_qt_cmake: | ||
name: "CMake" | ||
uses: ./.github/workflows/windows_build_qt_fork.yml | ||
with: | ||
jobName: "CMake-MSVC" | ||
artifactPrefixName: "PCSX2-windows-Qt-x64-cmake-msvc" | ||
configuration: CMake | ||
buildSystem: cmake | ||
secrets: inherit | ||
|
||
build_qt_clang_sse4: | ||
needs: lint_vs_proj_files | ||
name: "Clang-SSE4" | ||
uses: ./.github/workflows/windows_build_qt_fork.yml | ||
with: | ||
jobName: "Clang-SSE4" | ||
artifactPrefixName: "PCSX2-windows-Qt-x64-sse4-clang" | ||
configuration: Release Clang | ||
simd: "SSE4" | ||
secrets: inherit | ||
|
||
build_qt_clang_avx2: | ||
needs: lint_vs_proj_files | ||
name: "Clang-AVX2" | ||
uses: ./.github/workflows/windows_build_qt_fork.yml | ||
with: | ||
jobName: "Clang-AVX2" | ||
artifactPrefixName: "PCSX2-windows-Qt-x64-avx2-clang" | ||
configuration: Release Clang AVX2 | ||
secrets: inherit | ||
|
||
build_qt_cmake_clang: | ||
name: "Clang-CMake" | ||
uses: ./.github/workflows/windows_build_qt_fork.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 | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
name: Fork Windows Build Steps - Qt | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
jobName: | ||
required: true | ||
type: string | ||
artifactPrefixName: | ||
required: true | ||
type: string | ||
os: | ||
required: false | ||
type: string | ||
default: windows-2022 | ||
platform: | ||
required: false | ||
type: string | ||
default: x64 | ||
configuration: | ||
required: true | ||
type: string | ||
simd: | ||
required: false | ||
type: string | ||
default: AVX2 | ||
buildSystem: | ||
required: false | ||
type: string | ||
default: msbuild | ||
cmakeFlags: | ||
required: false | ||
type: string | ||
default: "" | ||
patchesUrl: | ||
required: false | ||
type: string | ||
default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download | ||
fetchTags: | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
build_windows_qt: | ||
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: 90 | ||
env: | ||
POWERSHELL_TELEMETRY_OPTOUT: 1 | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
# actions/checkout elides tags, fetch them primarily for releases | ||
- name: Fetch Tags | ||
if: ${{ inputs.fetchTags }} | ||
run: git fetch --tags --no-recurse-submodules | ||
|
||
- name: Prepare Artifact Metadata | ||
id: artifact-metadata | ||
shell: bash | ||
env: | ||
PREFIX: ${{ inputs.artifactPrefixName }} | ||
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 | ||
|
||
- name: Setup msbuild | ||
if: inputs.configuration != 'CMake' | ||
uses: microsoft/setup-msbuild@v1 | ||
|
||
- name: Download patches | ||
shell: cmd | ||
run: | | ||
cd bin/resources | ||
aria2c -Z "${{ inputs.patchesUrl }}/patches.zip" | ||
- name: Cache Dependencies | ||
id: cache-deps | ||
uses: actions/cache@v3 | ||
with: | ||
path: deps | ||
key: ${{ inputs.os }} ${{ inputs.platform }} deps ${{ hashFiles('.github/workflows/scripts/windows/build-dependencies.bat') }} | ||
|
||
- name: Build Dependencies | ||
if: steps.cache-deps.outputs.cache-hit != 'true' | ||
env: | ||
DEBUG: 0 | ||
run: .github/workflows/scripts/windows/build-dependencies.bat | ||
|
||
- name: Generate CMake | ||
if: inputs.configuration == 'CMake' | ||
id: cmake | ||
shell: cmd | ||
run: | | ||
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | ||
cmake . -B build ${{ inputs.cmakeFlags }} "-DCMAKE_PREFIX_PATH=%cd%\deps" -DQT_BUILD=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DDISABLE_ADVANCE_SIMD=ON -G Ninja | ||
- name: Build PCSX2 | ||
shell: cmd | ||
run: | | ||
if "${{ inputs.configuration }}"=="CMake" ( | ||
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | ||
cmake --build build --config Release || exit /b | ||
cmake --install build --config Release || exit /b | ||
) else ( | ||
msbuild "PCSX2_qt.sln" /m /v:m /p:Configuration="${{ inputs.configuration }}" /p:Platform="${{ inputs.platform }}" | ||
) | ||
- name: Download Plugin Injector artifact | ||
uses: robinraju/[email protected] | ||
with: | ||
repository: "ThirteenAG/PCSX2PluginInjector" | ||
tag: "latest" | ||
fileName: "PCSX2PluginInjector.zip" | ||
- name: Unpack Plugin Injector | ||
run: | | ||
7z x PCSX2PluginInjector.zip -obin/ -y | ||
del PCSX2PluginInjector.zip | ||
- name: Pack binaries | ||
uses: TheDoctor0/[email protected] | ||
with: | ||
path: './bin/**' | ||
type: 'zip' | ||
filename: PCSX2Fork-Windows-${{ inputs.platform }}-${{ inputs.jobName }}.zip | ||
exclusions: '*.bsc *.exp *.ilk *.iobj *.ipdb *.pdb *.lib' | ||
- name: Get release info | ||
id: release_info | ||
uses: cardinalby/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag: latest | ||
- name: Upload Release | ||
uses: ncipollo/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
allowUpdates: true | ||
name: ${{ steps.release_info.outputs.name }} | ||
body: ${{ steps.release_info.outputs.body }} | ||
tag: ${{ steps.release_info.outputs.tag_name }} | ||
artifacts: "*.zip" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.