-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Showing
89 changed files
with
1,630 additions
and
447 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 |
---|---|---|
@@ -1,62 +1,34 @@ | ||
name: PR Windows | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
env: | ||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | ||
BUILD_TYPE: Release | ||
VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite' | ||
VCPKG_FEATURE_FLAGS: 'manifests' | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
include: | ||
- DESCRIPTION: 'Skyrim Special Edition (1.5)' | ||
SKYRIM_SE_FLAG: ON | ||
SP_NEXUS_ARTIFACT_NAME: Skyrim Platform %SP_VERSION% (Special Edition) | ||
DEPLOY_BRANCH: "" | ||
ONLY_PUSH: false | ||
DIST_ARTIFACT_NAME: dist-1.5 | ||
- DESCRIPTION: 'Skyrim Anniversary Edition (1.6)' | ||
SKYRIM_SE_FLAG: OFF | ||
SP_NEXUS_ARTIFACT_NAME: Skyrim Platform %SP_VERSION% (Anniversary Edition) | ||
DEPLOY_BRANCH: "" | ||
ONLY_PUSH: false | ||
DIST_ARTIFACT_NAME: dist | ||
- DESCRIPTION: 'Skyrim Anniversary Edition (1.6) - Indev' | ||
SKYRIM_SE_FLAG: OFF | ||
SP_NEXUS_ARTIFACT_NAME: nope | ||
DEPLOY_BRANCH: "indev" | ||
ONLY_PUSH: true | ||
DIST_ARTIFACT_NAME: dist-indev | ||
- DESCRIPTION: 'Skyrim Anniversary Edition (1.6) - SweetPie' | ||
SKYRIM_SE_FLAG: OFF | ||
SP_NEXUS_ARTIFACT_NAME: nope | ||
DEPLOY_BRANCH: "sweetpie" | ||
ONLY_PUSH: true | ||
DIST_ARTIFACT_NAME: dist-sweetpie | ||
|
||
# VS 2019 is still supported, but GitHub windows-2019 runners have unsupported WinSDK version | ||
runs-on: windows-2022 | ||
name: PR Windows - ${{ matrix.DESCRIPTION }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
if: ${{ !matrix.ONLY_PUSH || github.event_name == 'push' }} | ||
with: | ||
fetch-depth: 1 | ||
submodules: 'true' | ||
|
||
name: PR Windows Base | ||
inputs: | ||
DESCRIPTION: | ||
description: "Will be used for artifact names" | ||
required: true | ||
SKYRIM_SE_FLAG: | ||
description: "Set to ON if building for Skyrim Special Edition" | ||
required: false | ||
default: OFF | ||
SP_NEXUS_ARTIFACT_NAME: | ||
description: "May be nope. Artifact name for Skyrim Platform Nexus artifact, %SP_VERSION% will be replaced with the version number" | ||
required: false | ||
default: "nope" | ||
DEPLOY_BRANCH: | ||
description: "May be empty. Branch here refers to indev/sweetpie" | ||
required: false | ||
default: "" | ||
DIST_ARTIFACT_NAME: | ||
description: "Artifact name for the dist folder" | ||
required: true | ||
SERVER_DIST_ARTIFACT_NAME: | ||
description: "Artifact name for the server dist folder" | ||
required: true | ||
SKYMP5_PATCHES_PAT: | ||
description: "PAT for skymp5-patches repository" | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Gather PRs | ||
if: ${{ matrix.DEPLOY_BRANCH != '' && (!matrix.ONLY_PUSH || github.event_name == 'push')}} | ||
if: ${{ inputs.DEPLOY_BRANCH != '' }} | ||
uses: Pospelove/auto-merge-action@main | ||
with: | ||
path: ${{github.workspace}} | ||
|
@@ -65,91 +37,85 @@ jobs: | |
{ | ||
"owner": "skyrim-multiplayer", | ||
"repo": "skymp", | ||
"labels": ["merge-to:${{matrix.DEPLOY_BRANCH}}"] | ||
"labels": ["merge-to:${{inputs.DEPLOY_BRANCH}}"] | ||
}, | ||
{ | ||
"owner": "skyrim-multiplayer", | ||
"repo": "skymp5-patches", | ||
"labels": ["merge-to:${{matrix.DEPLOY_BRANCH}}"], | ||
"token": "${{secrets.SKYMP5_PATCHES_PAT}}" | ||
"labels": ["merge-to:${{inputs.DEPLOY_BRANCH}}"], | ||
"token": "${{inputs.SKYMP5_PATCHES_PAT}}" | ||
} | ||
] | ||
- name: Commit gathered PRs | ||
if: ${{ matrix.DEPLOY_BRANCH != '' && (!matrix.ONLY_PUSH || github.event_name == 'push')}} | ||
if: ${{ inputs.DEPLOY_BRANCH != '' }} | ||
run: | | ||
# fake user for bot | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Skyrim Multiplayer Bot" | ||
git add . | ||
git commit -m "Merge PRs ${{matrix.DEPLOY_BRANCH}}" | ||
git commit -m "Merge PRs ${{inputs.DEPLOY_BRANCH}}" | ||
shell: powershell | ||
|
||
- name: Early build skymp5-client | ||
if: ${{ !matrix.ONLY_PUSH || github.event_name == 'push' }} | ||
run: | | ||
cd ${{github.workspace}}/skymp5-client | ||
yarn | ||
yarn build | ||
shell: powershell | ||
|
||
- name: Install tools | ||
if: ${{ !matrix.ONLY_PUSH || github.event_name == 'push' }} | ||
run: choco install opencppcoverage | ||
shell: powershell | ||
|
||
- name: Move vcpkg submodule to a larger drive | ||
if: ${{ !matrix.ONLY_PUSH || github.event_name == 'push' }} | ||
run: | | ||
Remove-Item -Recurse -Force C:/vcpkg | ||
Move-Item -Path ./vcpkg C:/vcpkg | ||
shell: powershell | ||
|
||
- name: Bootstrap vcpkg | ||
if: ${{ !matrix.ONLY_PUSH || github.event_name == 'push' }} | ||
run: C:/vcpkg/bootstrap-vcpkg.bat | ||
shell: powershell | ||
|
||
- name: Debug - free space | ||
if: ${{ !matrix.ONLY_PUSH || github.event_name == 'push' }} | ||
run: Get-PSDrive | ||
shell: powershell | ||
|
||
- uses: actions/github-script@v6 | ||
if: ${{ !matrix.ONLY_PUSH || github.event_name == 'push' }} | ||
with: | ||
script: | | ||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | ||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | ||
# Download Skyrim SE data files | ||
- uses: suisei-cn/actions-download-file@v1 | ||
if: ${{ !matrix.ONLY_PUSH || github.event_name == 'push' }} | ||
name: Download Skyrim.esm | ||
with: | ||
url: "https://gitlab.com/pospelov/se-data/-/raw/main/Skyrim.esm" | ||
target: ${{github.workspace}}/skyrim_data_files/ | ||
- uses: suisei-cn/actions-download-file@v1 | ||
if: ${{ !matrix.ONLY_PUSH || github.event_name == 'push' }} | ||
name: Download Update.esm | ||
with: | ||
url: "https://gitlab.com/pospelov/se-data/-/raw/main/Update.esm" | ||
target: ${{github.workspace}}/skyrim_data_files/ | ||
- uses: suisei-cn/actions-download-file@v1 | ||
if: ${{ !matrix.ONLY_PUSH || github.event_name == 'push' }} | ||
name: Download Dawnguard.esm | ||
with: | ||
url: "https://gitlab.com/pospelov/se-data/-/raw/main/Dawnguard.esm" | ||
target: ${{github.workspace}}/skyrim_data_files/ | ||
- uses: suisei-cn/actions-download-file@v1 | ||
if: ${{ !matrix.ONLY_PUSH || github.event_name == 'push' }} | ||
name: Download HearthFires.esm | ||
with: | ||
url: "https://gitlab.com/pospelov/se-data/-/raw/main/HearthFires.esm" | ||
target: ${{github.workspace}}/skyrim_data_files/ | ||
- uses: suisei-cn/actions-download-file@v1 | ||
if: ${{ !matrix.ONLY_PUSH || github.event_name == 'push' }} | ||
name: Download Dragonborn.esm | ||
with: | ||
url: "https://gitlab.com/pospelov/se-data/-/raw/main/Dragonborn.esm" | ||
target: ${{github.workspace}}/skyrim_data_files/ | ||
|
||
- name: Configure CMake | ||
if: ${{ !matrix.ONLY_PUSH || github.event_name == 'push' }} | ||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | ||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | ||
# Outputs profiling data in Google Trace Format, which can be parsed by the about:tracing tab of Google Chrome or using a plugin for a tool like Trace Compass. | ||
|
@@ -160,9 +126,10 @@ jobs: | |
-DUNIT_DATA_DIR="skyrim_data_files" | ||
-DPREPARE_NEXUS_ARCHIVES=ON | ||
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | ||
-DSKYRIM_SE=${{ matrix.SKYRIM_SE_FLAG }} | ||
-DSKYRIM_SE=${{ inputs.SKYRIM_SE_FLAG }} | ||
--profiling-output cmake-profiling-output | ||
--profiling-format google-trace | ||
shell: powershell | ||
|
||
- name: Upload vcpkg failure logs | ||
if: failure() | ||
|
@@ -172,76 +139,77 @@ jobs: | |
path: C:\vcpkg\buildtrees\spdlog\install-x64-windows-sp-dbg-out.log | ||
|
||
- uses: actions/upload-artifact@v4 | ||
if: ${{ !matrix.ONLY_PUSH || github.event_name == 'push' }} | ||
with: | ||
name: cmake-profiling-output (${{ matrix.DESCRIPTION }}) | ||
name: cmake-profiling-output (${{ inputs.DESCRIPTION }}) | ||
path: cmake-profiling-output | ||
|
||
- name: Build | ||
if: ${{ !matrix.ONLY_PUSH || github.event_name == 'push' }} | ||
# Build your program with the given configuration | ||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | ||
shell: powershell | ||
|
||
- name: Test | ||
if: ${{ !matrix.ONLY_PUSH || github.event_name == 'push' }} | ||
working-directory: ${{github.workspace}}/build | ||
# Execute tests defined by the CMake configuration. | ||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | ||
run: ctest -C ${{env.BUILD_TYPE}} --verbose # --output-on-failure | ||
shell: powershell | ||
|
||
- uses: actions/upload-artifact@v4 | ||
if: ${{ !matrix.ONLY_PUSH || github.event_name == 'push' }} | ||
with: | ||
name: ${{ matrix.DIST_ARTIFACT_NAME }} | ||
name: ${{ inputs.DIST_ARTIFACT_NAME }} | ||
path: ${{github.workspace}}/build/dist | ||
|
||
- uses: actions/upload-artifact@v4 | ||
if: ${{ !matrix.ONLY_PUSH || github.event_name == 'push' }} | ||
with: | ||
name: skymp5-client-js (${{ matrix.DESCRIPTION }}) | ||
name: skymp5-client-js (${{ inputs.DESCRIPTION }}) | ||
path: ${{github.workspace}}/build/dist/client/Data/Platform/Plugins/skymp5-client.js | ||
|
||
- uses: actions/upload-artifact@v4 | ||
if: ${{ !matrix.ONLY_PUSH || github.event_name == 'push' }} | ||
with: | ||
name: coverage (${{ matrix.DESCRIPTION }}) | ||
name: ${{ inputs.SERVER_DIST_ARTIFACT_NAME }} | ||
path: ${{github.workspace}}/build/dist/server | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage (${{ inputs.DESCRIPTION }}) | ||
path: ${{github.workspace}}/build/__coverage | ||
|
||
- name: Extract SP Version Number | ||
if: ${{ (!matrix.ONLY_PUSH || github.event_name == 'push') && matrix.SP_NEXUS_ARTIFACT_NAME != 'nope' }} | ||
if: ${{ inputs.SP_NEXUS_ARTIFACT_NAME != 'nope' }} | ||
run: | | ||
$version = (Get-Content ./skyrim-platform/package.json | ConvertFrom-Json).version | ||
echo "VERSION=$version" | Out-File -Append -FilePath $env:GITHUB_ENV | ||
shell: powershell | ||
|
||
- name: Replace %SP_VERSION% with actual version in artifact name | ||
if: ${{ (!matrix.ONLY_PUSH || github.event_name == 'push') && matrix.SP_NEXUS_ARTIFACT_NAME != 'nope' }} | ||
if: ${{ inputs.SP_NEXUS_ARTIFACT_NAME != 'nope' }} | ||
run: | | ||
$artifactName = "${{ matrix.SP_NEXUS_ARTIFACT_NAME }}" | ||
$artifactName = "${{ inputs.SP_NEXUS_ARTIFACT_NAME }}" | ||
$artifactName = $artifactName.Replace("%SP_VERSION%", "${{ env.VERSION }}") | ||
echo "SP_NEXUS_ARTIFACT_NAME=$artifactName" | Out-File -Append -FilePath $env:GITHUB_ENV | ||
shell: powershell | ||
|
||
- uses: actions/upload-artifact@v4 | ||
if: ${{ (!matrix.ONLY_PUSH || github.event_name == 'push') && matrix.SP_NEXUS_ARTIFACT_NAME != 'nope' }} | ||
if: ${{ inputs.SP_NEXUS_ARTIFACT_NAME != 'nope' }} | ||
with: | ||
name: ${{ env.SP_NEXUS_ARTIFACT_NAME }} | ||
# Data folder is skipped for mod managers | ||
path: ${{github.workspace}}/build/nexus/sp/data/* | ||
|
||
- uses: actions/upload-artifact@v4 | ||
if: ${{ !matrix.ONLY_PUSH || github.event_name == 'push' }} | ||
with: | ||
name: papyrus-vm-nexus (${{ matrix.DESCRIPTION }}) | ||
name: papyrus-vm-nexus (${{ inputs.DESCRIPTION }}) | ||
# Data folder is skipped for mod managers | ||
path: ${{github.workspace}}/build/nexus/papyrus-vm/* | ||
|
||
- name: Debug - free space | ||
if: ${{ !matrix.ONLY_PUSH || github.event_name == 'push' }} | ||
run: Get-PSDrive | ||
shell: powershell | ||
|
||
- uses: actions/upload-artifact@v4 | ||
if: ${{ !matrix.ONLY_PUSH || github.event_name == 'push' }} | ||
with: | ||
name: msbuild_files (${{ matrix.DESCRIPTION }}) | ||
name: msbuild_files (${{ inputs.DESCRIPTION }}) | ||
path: | | ||
${{github.workspace}}/build/**/*.sln | ||
${{github.workspace}}/build/**/*.vcxproj |
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,35 @@ | ||
name: Gather PRs test | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
description: 'Branch, meaning server instance' | ||
required: true | ||
type: choice | ||
options: | ||
- 'sweetpie' | ||
- 'indev' | ||
default: 'indev' | ||
jobs: | ||
gather_prs_test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Gather PRs | ||
uses: Pospelove/auto-merge-action@main | ||
with: | ||
path: ${{github.workspace}} | ||
repositories: | | ||
[ | ||
{ | ||
"owner": "skyrim-multiplayer", | ||
"repo": "skymp", | ||
"labels": ["merge-to:${{env.DEPLOY_BRANCH}}"] | ||
}, | ||
{ | ||
"owner": "skyrim-multiplayer", | ||
"repo": "skymp5-patches", | ||
"labels": ["merge-to:${{env.DEPLOY_BRANCH}}"], | ||
"token": "${{secrets.SKYMP5_PATCHES_PAT}}" | ||
} | ||
] |
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,31 @@ | ||
name: PR Windows Skyrim AE Indev | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
env: | ||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | ||
BUILD_TYPE: Release | ||
VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite' | ||
VCPKG_FEATURE_FLAGS: 'manifests' | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-2022 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
submodules: 'true' | ||
- uses: ./.github/actions/pr_windows_base | ||
with: | ||
DESCRIPTION: 'Skyrim Anniversary Edition (1.6) - Indev' | ||
SKYRIM_SE_FLAG: OFF | ||
SP_NEXUS_ARTIFACT_NAME: nope | ||
DEPLOY_BRANCH: "indev" | ||
DIST_ARTIFACT_NAME: dist-indev | ||
SERVER_DIST_ARTIFACT_NAME: server-dist-indev | ||
SKYMP5_PATCHES_PAT: ${{ secrets.SKYMP5_PATCHES_PAT }} |
Oops, something went wrong.