Skip to content

Commit

Permalink
Update Platform Toolset to v143, EASTL to 3.21.12, and EABase to 2.09…
Browse files Browse the repository at this point in the history
….05 and change fully to Github Actions (#735)

* Update Platform Toolset to v143, EASTL to 3.21.12, and EABase to 2.09.05

* Update CI workflows
  • Loading branch information
shartte authored Oct 7, 2023
1 parent 4feeb10 commit 804ab39
Show file tree
Hide file tree
Showing 302 changed files with 50,584 additions and 21,643 deletions.
167 changes: 160 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,181 @@

name: CI
on: [push]
on:
- push # standard push on main or other branches
- workflow_dispatch # run manually via Github UI
- create # i.e. tags

jobs:
build:
name: Build Windows
name: Build TemplePlus
runs-on: windows-latest
outputs:
version: ${{ steps.get_version.outputs.version }}
release: ${{ steps.get_version.outputs.release }}
steps:
- uses: actions/checkout@v1
- id: get_version
name: Determine Version Number
run: |
"Building Ref: $($env:GITHUB_REF)"
if ($env:GITHUB_REF -notmatch "^refs/tags/v(\d+\.\d+(?:\.\d+)*(?:|-.*))$") {
"Tag name doesnt match release pattern. Building Snapshot Build."
$version = "0.2.$($env:GITHUB_RUN_NUMBER)"
$release = "false"
} else {
"Building Release Build"
$version = $Matches[1]
$release = "true"
}
"Version Number: $version"
"Release Build: $release"
# Make it available to the Github Workflow
Add-Content -Path $env:GITHUB_OUTPUT -Value "version=$version"
Add-Content -Path $env:GITHUB_OUTPUT -Value "release=$release"
shell: powershell
- uses: actions/checkout@v4
- uses: nuget/setup-nuget@v1
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Download and Extract Dependencies
run: |
curl -L -o dependencies.7z https://github.com/GrognardsFromHell/Dependencies/releases/download/v1.9/dependencies.7z
curl -L -o dependencies.7z https://github.com/GrognardsFromHell/Dependencies/releases/download/v1.12/dependencies.7z
7z x dependencies.7z
- name: Install NuGet packages
run: |
nuget install Squirrel.Windows -OutputDirectory Squirrel -Verbosity Detailed
nuget restore
- name: Build
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
msbuild TemplePlus.sln /p:Configuration=Release /p:Platform=Win32 /p:MSBuildDefines="_TP_VERSION=%BUILD_NUMBER%;_TP_COMMIT=%COMMIT_ID%;TP_RELEASE_BUILD" /verbosity:minimal
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
msbuild TemplePlus.sln /p:Configuration=Release /p:Platform=Win32 /p:MSBuildDefines="_TP_VERSION=%TEMPLEPLUS_VERSION%;_TP_COMMIT=%COMMIT_ID%;TP_RELEASE_BUILD" /verbosity:minimal
# Need to use cmd because of the vcvars32 batch file
shell: cmd
env:
BUILD_NUMBER: ${GITHUB_RUN_NUMBER}
TEMPLEPLUS_VERSION: ${{ steps.get_version.outputs.version }}
COMMIT_ID: ${GITHUB_SHA::8}
- name: Pack Release
run: .\PackRelease.ps1
shell: powershell
env:
TEMPLEPLUS_VERSION: ${{ steps.get_version.outputs.version }}
- name: Pack Symbols
shell: cmd
# Package the symbol files, dump_syms needs the dev tools to be on the PATH
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
dependencies\bin\dump_syms.exe Release\TemplePlus.pdb > TemplePlus.sym
7z a TemplePlusSymbols-${{ steps.get_version.outputs.version }}.zip TemplePlus.sym Release\TemplePlus.pdb
- name: Pack Tools
shell: cmd
# Release Full with tools and all binaries
run: |
rd /s /q dist || cd .
mkdir dist
copy Release\*.exe dist
del dist\TemplePlus.exe
del dist\*Tests.exe
del dist\*.vshost.exe
copy Release\*.dll dist
copy dependencies\bin\*.dll dist
7z a TemplePlusTools-${{ steps.get_version.outputs.version }}.zip dist\*
- name: Upload ZIP-Distribution
uses: actions/upload-artifact@v3
with:
name: TemplePlus
path: TemplePlus-*.zip
- name: Upload PDB
uses: actions/upload-artifact@v3
with:
name: TemplePlusSymbols
path: TemplePlusSymbols-*.zip
- name: Upload Tools
uses: actions/upload-artifact@v3
with:
name: TemplePlusTools
path: TemplePlusTools-*.zip
- name: Upload Nuget Package
uses: actions/upload-artifact@v3
with:
name: TemplePlusNuget
path: TemplePlus*.nupkg

upload-release-symbols:
name: Upload Release Symbols
runs-on: ubuntu-latest
needs: build
if: ${{ needs.build.outputs.release == 'true' }}
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: TemplePlusSymbols
- name: Uncompress Symbol Files
run: unzip TemplePlusSymbols*.zip
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: arn:aws:iam::871006114897:role/templeplus-deploy-symbols
role-session-name: UploadTemplePlusSymbols
aws-region: eu-west-1
- name: Upload Symbols to S3
run: python -u deploy_symbols_s3.py TemplePlus.sym

package-release:
name: Package Release
runs-on: windows-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: TemplePlusNuget
- uses: nuget/setup-nuget@v1
- name: Install Squirrel
run: nuget install Squirrel.Windows -OutputDirectory Squirrel -Verbosity Detailed
- name: Package Release
run: .\BuildRelease.ps1
shell: powershell
env:
TEMPLEPLUS_VERSION: ${{ needs.build.outputs.version }}
- name: Upload Update-Site
uses: actions/upload-artifact@v3
with:
name: UpdateSite
path: releases-packages/

create-release:
name: Create Github Release
runs-on: ubuntu-latest
permissions:
contents: write
needs:
- build
- package-release
steps:
if: ${{ needs.build.outputs.release == 'true' }}
- uses: actions/download-artifact@v3
with:
path: artifacts
- name: Display structure of downloaded files
run: ls -R
working-directory: artifacts
- name: Release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
with:
name: "TemplePlus ${{ needs.build.outputs.version }}"
tag_name: v${{ needs.build.outputs.version }}
fail_on_unmatched_files: true
draft: true
files: |
artifacts/TemplePlus/*
artifacts/TemplePlusSymbols/*
artifacts/TemplePlusTools/*
artifacts/UpdateSite/*
47 changes: 17 additions & 30 deletions BuildRelease.ps1
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@

if ($env:APPVEYOR_REPO_TAG -ne "true") {
"No tagged build is running, skipping release building"
Exit
}

if (-Not(Test-Path .\Squirrel\squirrel.windows.*)) {
"Installing Squirrel"
nuget.exe install Squirrel.Windows -OutputDirectory Squirrel
}

## download the last release locally so we can build a delta against it
## Deltas are only ever built against the last previous release, never against more
$squirrel = Get-ChildItem .\Squirrel\squirrel.windows.*\tools\Squirrel.com
$squirrelDll = Get-ChildItem .\Squirrel\squirrel.windows.*\lib\net45\Squirrel.dll

if (-Not(Test-Path -PathType Leaf $squirrel)) {
Write-Error "Squirrel executable is not present"
Exit
Exit 1
}

$releasesDir = "releases-packages"
Expand All @@ -27,23 +17,16 @@ if (Test-Path $releasesDir) {
mkdir -Force $releasesDir

# Get the latest nuget package
if (Test-Path env:\APPVEYOR_BUILD_VERSION) {
$releasePackage = Join-Path (pwd) "TemplePlus.$($env:APPVEYOR_BUILD_VERSION).nupkg"
} else {
$releasePackage = Get-ChildItem .\TemplePlus.*.nupkg | Sort-Object CreationTime -Descending | Select-Object -First 1
}
$releasePackage = Join-Path (pwd) "TemplePlus.$($env:TEMPLEPLUS_VERSION).nupkg"

if (!$releasePackage -Or -Not(Test-Path $releasePackage)) {
Write-Error "NuGet package for release doesnt seem to be built. Make sure to run PackRelease.ps1 first"
Exit
Exit 1
}

# Download last release to make delta packages!
Invoke-WebRequest https://templeplus.org/update-feeds/stable/RELEASES -OutFile $releasesDir\RELEASES

Add-Type -Path .\squirrel\DeltaCompressionDotNet.*\lib\net45\*.dll
Add-Type -Path .\squirrel\Splat.*\lib\net45\*.dll
Add-Type -Path .\squirrel\Mono.Cecil.*\lib\net45\*.dll
Add-Type -LiteralPath $squirrelDll

# Using squirrel code here to parse the RELEASES file and get the previous release
Expand All @@ -53,19 +36,23 @@ $releases = [Squirrel.ReleaseEntry]::ParseReleaseFile($releasesContent)
$rp = New-Object "Squirrel.ReleasePackage" $releasePackage
$prevRelease = [Squirrel.ReleaseEntry]::GetPreviousRelease($releases, $rp, $releasesDir)

if ($prevRelease) {
$tagName = "v$($prevRelease.Version.ToString())"
$filenameOnly = [IO.Path]::GetFileName($prevRelease.InputPackageFile)
$downloadUrl = "https://github.com/GrognardsFromHell/TemplePlus/releases/download/$tagName/$filenameOnly"
Invoke-WebRequest $downloadUrl -OutFile $prevRelease.InputPackageFile
if (!$prevRelease) {
"No previous release found. Picking last full release."
$prevRelease = $releases | Sort-Object Version -Descending | Where-Object { -not $_.IsDelta } | Select-Object -First 1
$targetPath = Join-Path $releasesDir $prevRelease.Filename
$prevRelease = [Squirrel.ReleasePackage]::new($targetPath, $true)
}

"Last Full Release: $($prevRelease.Version.ToString())"

$tagName = "v$($prevRelease.Version.ToString())"
$filenameOnly = [IO.Path]::GetFileName($prevRelease.InputPackageFile)
$downloadUrl = "https://github.com/GrognardsFromHell/TemplePlus/releases/download/$tagName/$filenameOnly"
Invoke-WebRequest $downloadUrl -OutFile $prevRelease.InputPackageFile

# The tag name is actually part of the download URL on github
$baseUrl=""
if (Test-Path env:\APPVEYOR_REPO_TAG_NAME) {
$baseUrl = "--baseUrl=https://github.com/GrognardsFromHell/TemplePlus/releases/download/$($env:APPVEYOR_REPO_TAG_NAME)/"
"Using BaseURL: $baseUrl"
}
$baseUrl = "--baseUrl=https://github.com/GrognardsFromHell/TemplePlus/releases/download/v$($env:TEMPLEPLUS_VERSION)/"
"Using BaseURL: $baseUrl"

&$squirrel --releasify=$releasePackage --loadingGif=Configurator\Installing.gif --icon=TemplePlus\toee_gog_icon.ico --setupIcon=TemplePlus\toee_gog_icon.ico --releaseDir=$releasesDir $baseUrl --no-msi

Expand Down
3 changes: 3 additions & 0 deletions EASTL/.gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Auto detect text files and perform LF normalization
# http://git-scm.com/docs/gitattributes
* text=auto
.appveyor.yml -text eol=crlf
.appveyor-mingw.yml -text eol=crlf
ci-*.cmd -text eol=crlf
43 changes: 43 additions & 0 deletions EASTL/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,50 @@
tags
cscope.out
**/*.swp
**/*.swo
.swp
*.swp
.swo
.TMP
-.d
eastl_build_out
build_bench
bench.bat
build.bat
.p4config

## CMake generated files
CMakeCache.txt
cmake_install.cmake

## Patch files
*.patch

## For Visual Studio Generated projects
*.sln
**/*.vcxproj
**/*.vcxproj.filters
*.VC.opendb
*.sdf
**/*.suo
**/*.user
.vs/*
**/Debug/*
CMakeFiles/*
EASTL.dir/**
RelWithDebInfo/*
Release/*
Win32/*
x64/*
MinSizeRel/*
build*/*
Testing/*
%ALLUSERSPROFILE%/*

# Buck
/buck-out/
/.buckd/
/buckaroo/
.buckconfig.local
BUCKAROO_DEPS
.vscode/settings.json
22 changes: 12 additions & 10 deletions EASTL/3RDPARTYLICENSES.TXT
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
Use of the software in this package is governed by the EA Development Software License,
found in the accompanying file EA_DEV_SOFTWARE_LICENSE.txt.

Additional licenses also apply to this software package as detailed below.



HP STL comes with the following license:

///////////////////////////////////////////////////////////////////////////////
// The tree insert and erase functions below are based on the original
// HP STL tree functions. Use of these functions was been approved by
// EA legal on November 4, 2005 and the approval documentation is available
// from the EASTL maintainer or from the EA legal deparatment on request.
//
// Copyright (c) 1994
// Hewlett-Packard Company
//
Expand Down Expand Up @@ -44,7 +37,8 @@ Full text of the relevant licenses is included below.
University of Illinois/NCSA
Open Source License

Copyright (c) 2009-2015 by the contributors listed in CREDITS.TXT
Copyright (c) 2009-2015 by the contributors listed at
http://llvm.org/svn/llvm-project/libcxx/trunk/CREDITS.TXT

All rights reserved.

Expand Down Expand Up @@ -85,7 +79,8 @@ SOFTWARE.

==============================================================================

Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT
Copyright (c) 2009-2014 by the contributors listed at
http://llvm.org/svn/llvm-project/libcxx/trunk/CREDITS.TXT

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -105,4 +100,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

==============================================================================

*No express or implied license to use PlayStation®4 libraries included.
PlayStation®4 development tools and libraries are subject to separate license
with Sony Interactive Entertainment LLC.

==============================================================================

Loading

0 comments on commit 804ab39

Please sign in to comment.