Disable cameo sorting and Whiteboy bug fix in Vinifera builds #235
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
# | |
# Windows build action for ts-patches. | |
# | |
# Authors: CCHyper, OmniBlade | |
# | |
name: Windows | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
create_release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Delete Previous Release | |
uses: dev-drprasad/[email protected] | |
with: | |
delete_release: true | |
tag_name: latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build: | |
name: Build | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
type: [ TSCLIENT, MOD_DTA, MOD_TI, MOD_TO, MOD_RUBICON, MOD_FD ] | |
#type: [ SINGLEPLAYER, TIBSUN, TSCLIENT, MOD_DTA, MOD_TI, MOD_TO, MOD_RUBICON, MOD_FD, MOD_TM ] | |
steps: | |
- name: Clone Repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Clone CnCNet Repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
repository: CnCNet/ts-patches-private | |
path: 'cncnet' | |
ssh-key: ${{ secrets.CNCNET_CI_SSH_PRIVATEKEY }} | |
- name: Get Branch Name | |
id: branch-name | |
uses: tj-actions/[email protected] | |
- name: Set Variables | |
id: gitinfo | |
run: | | |
echo "Branch name: '${{ steps.branch-name.outputs.current_branch }}'" | |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" | |
echo "::set-output name=date::$(git show -s --date=format:'%Y-%m-%d' --format=%cd HEAD)" | |
- name: MSVC Dev Cmd | |
uses: ilammy/[email protected] | |
with: | |
arch: x86 | |
- name: Download WinBuilds | |
uses: suisei-cn/actions-download-file@v1 | |
with: | |
url: "https://downloads.cncnet.org/WinBuilds32ForGitHubCI.zip" | |
- name: Install WinBuilds | |
run: | | |
7z x WinBuilds32ForGitHubCI.zip -owin-builds-patch-32 | |
Get-ChildItem | |
Get-ChildItem -Path 'win-builds-patch-32' | |
- name: Add WinBuilds To PATH | |
run: | | |
echo "$env:GITHUB_WORKSPACE\win-builds-patch-32" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
echo "$env:GITHUB_WORKSPACE\win-builds-patch-32\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: Build Binaries | |
run: | | |
Get-ChildItem | |
New-Item -Path 'build\release' -ItemType Directory | |
gmake clean | |
gmake -j8 ${{ matrix.type }}=1 | |
Move-Item -Path 'game.exe' -Destination 'build\release\game.exe' | |
# New-Item -Path 'build\debug' -ItemType Directory | |
# gmake clean | |
# gmake -j8 ${{ matrix.type }}=1 WWDEBUG=1 | |
# Move-Item -Path 'game.exe' -Destination 'build\debug\game.exe' | |
New-Item -Path 'build\vinifera' -ItemType Directory | |
gmake clean | |
gmake -j8 ${{ matrix.type }}=1 VINIFERA=1 | |
Move-Item -Path 'game.exe' -Destination 'build\vinifera\game.exe' | |
# Only build the CnCNet binaries for TSCLIENT | |
if ("${{ matrix.type }}" -eq "TSCLIENT") { | |
New-Item -Path 'build\cncnet' -ItemType Directory | |
gmake clean | |
gmake -j8 ${{ matrix.type }}=1 CNCNET=1 | |
Move-Item -Path 'game.exe' -Destination 'build\cncnet\game.exe' | |
Get-ChildItem -Path 'build\cncnet' | |
} | |
Get-ChildItem -Path 'build\release' | |
# Get-ChildItem -Path 'build\debug' | |
Get-ChildItem -Path 'build\vinifera' | |
- name: Copy Binaries | |
run: | | |
New-Item -Path 'artifact\release' -ItemType Directory | |
# New-Item -Path 'artifact\debug' -ItemType Directory | |
New-Item -Path 'artifact\vinifera' -ItemType Directory | |
Move-Item -Path 'build\release\game.exe' -Destination 'artifact\release\game.exe' | |
# Move-Item -Path 'build\debug\game.exe' -Destination 'artifact\debug\game.exe' | |
Move-Item -Path 'build\vinifera\game.exe' -Destination 'artifact\vinifera\game.exe' | |
# Only pack the CnCNet binaries for TSCLIENT | |
if ("${{ matrix.type }}" -eq "TSCLIENT") { | |
New-Item -Path 'artifact\cncnet' -ItemType Directory | |
Move-Item -Path 'build\cncnet\game.exe' -Destination 'artifact\cncnet\game.dat' | |
Get-ChildItem -Path 'artifact\cncnet' | |
} | |
Get-ChildItem -Path 'artifact\release' | |
# Get-ChildItem -Path 'artifact\debug' | |
Get-ChildItem -Path 'artifact\vinifera' | |
Get-ChildItem | |
Get-ChildItem -Path 'build' | |
Get-ChildItem -Path 'artifact' | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ts-patches-${{ matrix.type }}-${{ steps.branch-name.outputs.current_branch }}-${{ steps.gitinfo.outputs.sha_short }}-${{ steps.gitinfo.outputs.date }} | |
path: artifact | |
- name: Create Archive For Release | |
run: | | |
Get-ChildItem -Path 'build' | |
7z a ts-patches-${{ matrix.type }}-${{ steps.branch-name.outputs.current_branch }}-${{ steps.gitinfo.outputs.sha_short }}.zip .\artifact\* | |
- name: Upload New Release | |
if: ${{ github.event_name != 'pull_request' }} | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: Latest | |
tag_name: latest | |
body: Latest ts-patches binaries. | |
files: | | |
ts-patches-${{ matrix.type }}-${{ steps.branch-name.outputs.current_branch }}-${{ steps.gitinfo.outputs.sha_short }}.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |