Skip to content

Commit

Permalink
vcpkg: Bump baseline and ports
Browse files Browse the repository at this point in the history
- Remove D3D9, backend is officially dead upstream on bgfx
- Migrate CI to Github Actions
  • Loading branch information
julianxhokaxhiu committed Jan 27, 2024
1 parent 608e117 commit 5e70574
Show file tree
Hide file tree
Showing 22 changed files with 164 additions and 195 deletions.
115 changes: 0 additions & 115 deletions .ci/azure.yml

This file was deleted.

File renamed without changes.
34 changes: 29 additions & 5 deletions .ci/build.ps1 → .github/workflows/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ Write-Output "VCPKG BRANCH: $vcpkgBranchName"
Write-Output "VCPKG BASELINE: $vcpkgBaseline"
Write-Output "--------------------------------------------------"

Write-Host "##vso[task.setvariable variable=_BUILD_VERSION;]${env:_BUILD_VERSION}"
Write-Host "##vso[task.setvariable variable=_RELEASE_VERSION;]${env:_RELEASE_VERSION}"
Write-Host "##vso[task.setvariable variable=_IS_BUILD_CANARY;]${env:_IS_BUILD_CANARY}"
Write-Host "##vso[task.setvariable variable=_IS_GITHUB_RELEASE;]${env:_IS_GITHUB_RELEASE}"
Write-Host "##vso[task.setvariable variable=_CHANGELOG_VERSION;]${env:_CHANGELOG_VERSION}"
Write-Output "_BUILD_VERSION=${env:_BUILD_VERSION}" >> ${env:GITHUB_ENV}
Write-Output "_RELEASE_VERSION=${env:_RELEASE_VERSION}" >> ${env:GITHUB_ENV}
Write-Output "_IS_BUILD_CANARY=${env:_IS_BUILD_CANARY}" >> ${env:GITHUB_ENV}
Write-Output "_IS_GITHUB_RELEASE=${env:_IS_GITHUB_RELEASE}" >> ${env:GITHUB_ENV}
Write-Output "_CHANGELOG_VERSION=${env:_CHANGELOG_VERSION}" >> ${env:GITHUB_ENV}

# Load vcvarsall environment for x86
$vcvarspath = &"${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -prerelease -latest -property InstallationPath
Expand All @@ -64,6 +64,28 @@ Get-Content "$env:temp\vcvars.txt" | Foreach-Object {
}
}

# Unset VCPKG_ROOT if set
[Environment]::SetEnvironmentVariable('VCPKG_ROOT','')

# Add Github Packages registry
nuget sources add -Name github -Source "https://nuget.pkg.github.com/${env:GITHUB_REPOSITORY_OWNER}/index.json" -Username ${env:GITHUB_REPOSITORY_OWNER} -Password ${env:GITHUB_PACKAGES_PAT} -StorePasswordInClearText
nuget sources list

# Install Scoop
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-Expression "& {$(Invoke-RestMethod get.scoop.sh)} -RunAsAdmin"

# Install CMake
scoop bucket add main
scoop install main/cmake@3.28.1

cmake --version

# Install Powershell
scoop install main/pwsh@7.4.1
pwsh --version

# Vcpkg setup
git -C $vcpkgRoot pull --all
git -C $vcpkgRoot checkout $vcpkgBaseline
git -C $vcpkgRoot clean -fxd
Expand All @@ -72,9 +94,11 @@ cmd.exe /c "call $vcpkgRoot\bootstrap-vcpkg.bat"

vcpkg integrate install

# Start the build
cmake --preset "${env:_RELEASE_CONFIGURATION}" -D_DLL_VERSION="$env:_BUILD_VERSION"
cmake --build --preset "${env:_RELEASE_CONFIGURATION}"

# Start the packaging
mkdir .dist\pkg\FF7_1998 | Out-Null
mkdir .dist\pkg\FF8_2000 | Out-Null
mkdir .dist\pkg\FFNx_Steam | Out-Null
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: FFNx

run-name: 1.17.1.${{ github.run_number }}

on:
workflow_dispatch:
push:
branches:
- master
tags:
- "*"
pull_request:
branches:
- master

env:
_IS_BUILD_CANARY: false
_IS_GITHUB_RELEASE: false
_RELEASE_NAME: FFNx
_RELEASE_VERSION: v0
_RELEASE_CONFIGURATION: Release
_BUILD_BRANCH: "${{ github.ref }}"
_BUILD_VERSION: "1.17.1.${{ github.run_number }}"
_CHANGELOG_VERSION: "0"
# Force concurrency to 4 threads
VCPKG_MAX_CONCURRENCY: 4
# GIT: Fix reporting from stderr to stdout
GIT_REDIRECT_STDERR: 2>&1

jobs:
FFNx:
runs-on: windows-latest
timeout-minutes: 1440
strategy:
max-parallel: 1
steps:
- name: Set Git Config
run: |
git config --global core.autocrlf false
git config --global core.filemode false
git config --global core.longpaths true
- name: Checkout
uses: actions/[email protected]
- name: Build FFNx
run: ".github/workflows/build.ps1"
shell: pwsh
env:
GITHUB_PACKAGES_PAT: ${{ secrets._GITHUB_PACKAGES_PAT }}
- name: Publish PR FFNx Artifact
if: env._IS_GITHUB_RELEASE == 'false' && success()
uses: actions/[email protected]
with:
name: "${{ env._RELEASE_NAME }}-${{ env._RELEASE_VERSION }}"
path: ".dist/*.zip"
- name: Create FFNx (Canary)
uses: ncipollo/release-action@v1
if: env._IS_GITHUB_RELEASE == 'true' && env._IS_BUILD_CANARY == 'true' && success()
with:
artifacts: ".dist/*.zip"
generateReleaseNotes: true
prerelease: true
removeArtifacts: true
tag: canary
name: "${{ env._RELEASE_NAME }}-${{ env._RELEASE_VERSION }}"
body: |
See https://github.com/julianxhokaxhiu/FFNx/blob/master/Changelog.md#next
This is a canary build. Please be aware it may be prone to crashing and is NOT tested by anyone. Use this build AT YOUR OWN RISK!
- name: Create FFNx (Stable)
uses: ncipollo/release-action@v1
if: env._IS_GITHUB_RELEASE == 'true' && env._IS_BUILD_CANARY == 'false' && success()
with:
artifacts: ".dist/*.zip"
generateReleaseNotes: true
makeLatest: true
removeArtifacts: true
name: "${{ env._RELEASE_NAME }}-${{ env._RELEASE_VERSION }}"
body: |
See https://github.com/julianxhokaxhiu/FFNx/blob/master/Changelog.md#$(_CHANGELOG_VERSION)
- name: Alert the FFNx Release
if: env._IS_GITHUB_RELEASE == 'true' && success()
env:
_MAP_FFNX_TSUNAMODS_FF7: "${{ secrets._FFNX_TSUNAMODS_FF7 }}"
_MAP_FFNX_TSUNAMODS_FF8: "${{ secrets._FFNX_TSUNAMODS_FF8 }}"
_MAP_FFNX_QHIMM_FF7: "${{ secrets._FFNX_QHIMM_FF7 }}"
_MAP_FFNX_QHIMM_FF8: "${{ secrets._FFNX_QHIMM_FF8 }}"
run: ".github/workflows/alert.ps1"
shell: pwsh
12 changes: 6 additions & 6 deletions .vcpkg/ports/bgfx/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
vcpkg_from_github(OUT_SOURCE_PATH BX_SOURCE_DIR
REPO "julianxhokaxhiu/bx"
HEAD_REF master
REF afd1d16d32debfc996cd6b181d7688d0b24cea05
SHA512 680ebf950f621ec807082f1a7edc489cf4d4c35b6ee39b0dd3f15f6b93c78871b727a9450bee2ec065cc43e55aff09231e175f375eeaefd1244ee9574763f684
REF a4951e0bb1755ce08bee2e5e9bda11f5927b9c9f
SHA512 fdb4f7df6d53061a0b60c9e9fb03ac4f1607db03d670e015ae9041e0130e5319326d21ba0c8ab93b08767c831859c82adcb00464a4813125c34ebff8c54ce17f
)

vcpkg_from_github(OUT_SOURCE_PATH BIMG_SOURCE_DIR
REPO "julianxhokaxhiu/bimg"
HEAD_REF master
REF ab96ba9dda6c23273751be81509f3fe3086d7724
SHA512 1c86cc72224880760b63d67153c2843a4d71932e0a3d1150af1337f09c28598a638afe820b61c56d8cc172924111c7c8da8fbf0720e019307dba10450f3b04c8
REF 964a5b85483cdf59a30dc006e9bd8bbdde6cb2be
SHA512 6335c5856f52c9525a8a16043880f469f8163888fb65225db90888f5f7230bd6a89c9aac5a8a5cf13a7fecbe8b0fcaa8748996e385bd8ea5c126509f773fcd4b
)

vcpkg_from_github(OUT_SOURCE_PATH SOURCE_DIR
REPO "julianxhokaxhiu/bgfx"
HEAD_REF master
REF e3e5b1372b4ec63170770ce34862667e916bd491
SHA512 6f0d9a5b73b6b5f08a3c236ffb607b67641236c8d88ee06357e807eb5167757b894a1fa28aa3beb01416e8dbcb522183f56c9745b492cabd087e7cd27c62e72d
REF 6de504638e9890803fcf1eb10b9ef4ac50c8debf
SHA512 1f855e16802db9523c4d399011d92976a74f9bd9dbde8426f8e02011eccbdd643b77c2781367087db1854aca9343832d8c7215887f468926fa438e8431eb656a
)

# Move bx source inside bgfx source tree
Expand Down
8 changes: 4 additions & 4 deletions .vcpkg/ports/bimg/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
vcpkg_from_github(OUT_SOURCE_PATH BX_SOURCE_DIR
REPO "julianxhokaxhiu/bx"
HEAD_REF master
REF afd1d16d32debfc996cd6b181d7688d0b24cea05
SHA512 680ebf950f621ec807082f1a7edc489cf4d4c35b6ee39b0dd3f15f6b93c78871b727a9450bee2ec065cc43e55aff09231e175f375eeaefd1244ee9574763f684
REF a4951e0bb1755ce08bee2e5e9bda11f5927b9c9f
SHA512 fdb4f7df6d53061a0b60c9e9fb03ac4f1607db03d670e015ae9041e0130e5319326d21ba0c8ab93b08767c831859c82adcb00464a4813125c34ebff8c54ce17f
)

vcpkg_from_github(OUT_SOURCE_PATH SOURCE_DIR
REPO "julianxhokaxhiu/bimg"
HEAD_REF master
REF ab96ba9dda6c23273751be81509f3fe3086d7724
SHA512 1c86cc72224880760b63d67153c2843a4d71932e0a3d1150af1337f09c28598a638afe820b61c56d8cc172924111c7c8da8fbf0720e019307dba10450f3b04c8
REF 964a5b85483cdf59a30dc006e9bd8bbdde6cb2be
SHA512 6335c5856f52c9525a8a16043880f469f8163888fb65225db90888f5f7230bd6a89c9aac5a8a5cf13a7fecbe8b0fcaa8748996e385bd8ea5c126509f773fcd4b
)

# Move bx source inside bgfx source tree
Expand Down
4 changes: 2 additions & 2 deletions .vcpkg/ports/bx/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(OUT_SOURCE_PATH SOURCE_DIR
REPO "julianxhokaxhiu/bx"
HEAD_REF master
REF afd1d16d32debfc996cd6b181d7688d0b24cea05
SHA512 680ebf950f621ec807082f1a7edc489cf4d4c35b6ee39b0dd3f15f6b93c78871b727a9450bee2ec065cc43e55aff09231e175f375eeaefd1244ee9574763f684
REF a4951e0bb1755ce08bee2e5e9bda11f5927b9c9f
SHA512 fdb4f7df6d53061a0b60c9e9fb03ac4f1607db03d670e015ae9041e0130e5319326d21ba0c8ab93b08767c831859c82adcb00464a4813125c34ebff8c54ce17f
)

# Set up GENie (custom project generator)
Expand Down
4 changes: 2 additions & 2 deletions .vcpkg/ports/tomlplusplus/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO marzer/tomlplusplus
REF v3.3.0
SHA512 6ab2de83b7fc44de40e58a47c28a9507bf7c50fa9b08925b5a6d48958868a86e6790aff684d29ceb50ad18905e3832840719e1b7bfec3b8a0c00b15bb0f70f38
REF v3.4.0
SHA512 c227fc8147c9459b29ad24002aaf6ab2c42fac22ea04c1c52b283a0172581ccd4527b33c1931e0ef0d1db6b6a53f9e9882c6d4231c7f3494cf070d0220741aa5
HEAD_REF master
)

Expand Down
2 changes: 1 addition & 1 deletion .vcpkg/ports/tomlplusplus/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tomlplusplus",
"version": "3.3.0",
"version": "3.4.0",
"description": "Header-only TOML config file parser and serializer for modern C++.",
"homepage": "https://marzer.github.io/tomlplusplus/",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions .vcpkg/ports/vgmstream/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO "vgmstream/vgmstream"
HEAD_REF master
REF r1879
SHA512 900d48367d377862602e1ff11046f26ac537a2809530a880828531de429afc02b3b31611582145f89d50750a1d0d6758e10f49aab4bfb303256e8d4138ae9601
REF r1896
SHA512 35e4f004e2282f837df111818545fddba18bb7a1e2014c5d6925ea3709ad94fc1c3ca6ba9cee26f505045fa4da36ab10525eeccb0ca89b4bb9f5f8022d052e4f
PATCHES cmake.patch
)

Expand Down
2 changes: 1 addition & 1 deletion .vcpkg/versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"port-version": 0
},
"tomlplusplus": {
"baseline": "3.3.0",
"baseline": "3.4.0",
"port-version": 0
}
}
Expand Down
2 changes: 1 addition & 1 deletion .vcpkg/versions/t-/tomlplusplus.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"versions": [
{
"version": "3.3.0",
"version": "3.4.0",
"path": "$/ports/tomlplusplus"
}
]
Expand Down
9 changes: 0 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,6 @@ foreach(FFNX_SHADER IN LISTS FFNX_SHADERS)
${CMAKE_BINARY_DIR}/vcpkg_installed/x86-windows-static/tools/bgfx/shadercRelease -i ${CMAKE_BINARY_DIR}/vcpkg_installed/x86-windows-static/include -f ${CMAKE_SOURCE_DIR}/misc/${FFNX_SHADER}.vert -o
${CMAKE_BINARY_DIR}/bin/shaders/${FFNX_SHADER}.${BGFX_VARYING}.vk.vert --type v --varyingdef
${CMAKE_SOURCE_DIR}/misc/${RELEASE_NAME}.varying.${BGFX_VARYING}.def.sc --platform windows --profile spirv
# Direct3D 9
COMMAND
${CMAKE_BINARY_DIR}/vcpkg_installed/x86-windows-static/tools/bgfx/shadercRelease -i ${CMAKE_BINARY_DIR}/vcpkg_installed/x86-windows-static/include -f ${CMAKE_SOURCE_DIR}/misc/${FFNX_SHADER}.frag -o
${CMAKE_BINARY_DIR}/bin/shaders/${FFNX_SHADER}.${BGFX_VARYING}.d3d9.frag --type f --varyingdef
${CMAKE_SOURCE_DIR}/misc/${RELEASE_NAME}.varying.${BGFX_VARYING}.def.sc --platform windows -p s_3_0 -O 3
COMMAND
${CMAKE_BINARY_DIR}/vcpkg_installed/x86-windows-static/tools/bgfx/shadercRelease -i ${CMAKE_BINARY_DIR}/vcpkg_installed/x86-windows-static/include -f ${CMAKE_SOURCE_DIR}/misc/${FFNX_SHADER}.vert -o
${CMAKE_BINARY_DIR}/bin/shaders/${FFNX_SHADER}.${BGFX_VARYING}.d3d9.vert --type v --varyingdef
${CMAKE_SOURCE_DIR}/misc/${RELEASE_NAME}.varying.${BGFX_VARYING}.def.sc --platform windows -p s_3_0 -O 3
# Direct3D 11
COMMAND
${CMAKE_BINARY_DIR}/vcpkg_installed/x86-windows-static/tools/bgfx/shadercRelease -i ${CMAKE_BINARY_DIR}/vcpkg_installed/x86-windows-static/include -f ${CMAKE_SOURCE_DIR}/misc/${FFNX_SHADER}.frag -o
Expand Down
3 changes: 2 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"strategy": "set"
},
"environment": {
"VCPKG_ROOT": "C:/vcpkg"
"VCPKG_ROOT": "C:/vcpkg",
"VCPKG_BINARY_SOURCES": "clear;nuget,github,readwrite"
},
"binaryDir": "${sourceDir}/.build",
"toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
Expand Down
Loading

0 comments on commit 5e70574

Please sign in to comment.