-
Notifications
You must be signed in to change notification settings - Fork 89
build(presets): Major CMakePresets overhaul, unify vcpkg, modernize VC6 support #1373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems like the resulting vc6 binary depends on zlib.dll. Before it didn't require any additional dependencies. Is there a way to keep it that way? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will developers now be required to install vcpkg to compile with VC6? If so, please put a instructions in the first post of the PR. (Ideally in the build instructions, but they are sadly in another repo). |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,14 +15,24 @@ on: | |
required: true | ||
type: string | ||
description: "Path to folder with replays and maps" | ||
preset: | ||
configurePreset: | ||
required: true | ||
type: string | ||
description: "CMake preset" | ||
buildPreset: | ||
required: true | ||
type: string | ||
tools: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is tools and extras added here? |
||
required: false | ||
type: boolean | ||
default: false | ||
extras: | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
build: | ||
name: ${{ inputs.preset }} | ||
name: ${{ inputs.configurePreset }} | ${{ inputs.buildPreset }} | ||
runs-on: windows-latest | ||
timeout-minutes: 15 | ||
env: | ||
|
@@ -38,7 +48,7 @@ jobs: | |
- name: Download Game Artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ inputs.game }}-${{ inputs.preset }} | ||
name: ${{ inputs.game }}-${{ inputs.configurePreset }}-${{ inputs.buildPreset }}${{ inputs.tools && '+t' || '' }}${{ inputs.extras && '+e' || '' }} | ||
path: build | ||
|
||
- name: Cache Game Data | ||
|
@@ -236,7 +246,7 @@ jobs: | |
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Replay-Debug-Log-${{ inputs.preset }} | ||
name: Replay-Debug-Log-${{ inputs.buildPreset }} | ||
path: build/DebugLogFile*.txt | ||
retention-days: 30 | ||
if-no-files-found: ignore |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,127 +56,92 @@ jobs: | |
echo "- Shared: ${{ steps.filter.outputs.shared == 'true' && '✅' || '❌' }}" >> $GITHUB_STEP_SUMMARY | ||
|
||
build-generals: | ||
name: Build Generals${{ matrix.preset && '' }} | ||
name: Build Generals (${{ matrix.configurePreset }} | ${{ matrix.buildPreset }}) | ||
needs: detect-changes | ||
if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.generals == 'true' || needs.detect-changes.outputs.shared == 'true' }} | ||
strategy: | ||
matrix: | ||
include: | ||
- preset: "vc6" | ||
- configurePreset: "default" | ||
buildPreset: "release" | ||
tools: true | ||
extras: true | ||
- preset: "vc6-profile" | ||
- configurePreset: "dev" | ||
buildPreset: "dev-release" | ||
tools: true | ||
extras: true | ||
- preset: "vc6-debug" | ||
- configurePreset: "vc6" | ||
buildPreset: "vc6-release" | ||
tools: true | ||
extras: true | ||
- preset: "win32" | ||
- configurePreset: "vc6-dev" | ||
buildPreset: "vc6-dev-release" | ||
tools: true | ||
extras: true | ||
- preset: "win32-profile" | ||
tools: true | ||
extras: true | ||
- preset: "win32-debug" | ||
tools: true | ||
extras: true | ||
# vcpkg builds have been disabled for now due to excessive build times of 30 minutes per preset | ||
# - preset: "win32-vcpkg" | ||
# tools: true | ||
# extras: true | ||
# - preset: "win32-vcpkg-profile" | ||
# tools: true | ||
# extras: true | ||
# - preset: "win32-vcpkg-debug" | ||
# tools: true | ||
# extras: true | ||
fail-fast: false | ||
uses: ./.github/workflows/build-toolchain.yml | ||
with: | ||
game: "Generals" | ||
preset: ${{ matrix.preset }} | ||
configurePreset: ${{ matrix.configurePreset }} | ||
buildPreset: ${{ matrix.buildPreset }} | ||
tools: ${{ matrix.tools }} | ||
extras: ${{ matrix.extras }} | ||
secrets: inherit | ||
|
||
# Note build-generalsmd is split into two jobs for vc6 and win32 because replaycheck-generalsmd | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why delete this comment? |
||
# only requires the vc6 build and compiling vc6 is much faster than win32 | ||
build-generalsmd-vc6: | ||
name: Build GeneralsMD${{ matrix.preset && '' }} | ||
build-generalsmd: | ||
name: Build GeneralsMD (${{ matrix.configurePreset }} | ${{ matrix.buildPreset }}) | ||
needs: detect-changes | ||
if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.generalsmd == 'true' || needs.detect-changes.outputs.shared == 'true' }} | ||
strategy: | ||
matrix: | ||
include: | ||
- preset: "vc6" | ||
- configurePreset: "default" | ||
buildPreset: "release" | ||
tools: true | ||
extras: true | ||
- preset: "vc6-profile" | ||
- configurePreset: "dev" | ||
buildPreset: "dev-release" | ||
tools: true | ||
extras: true | ||
- preset: "vc6-debug" | ||
- configurePreset: "vc6" | ||
buildPreset: "vc6-release" | ||
tools: true | ||
extras: true | ||
- preset: "vc6-releaselog" | ||
- configurePreset: "vc6-dev" | ||
buildPreset: "vc6-dev-release" | ||
tools: true | ||
extras: true | ||
fail-fast: false | ||
uses: ./.github/workflows/build-toolchain.yml | ||
with: | ||
game: "GeneralsMD" | ||
preset: ${{ matrix.preset }} | ||
configurePreset: ${{ matrix.configurePreset }} | ||
buildPreset: ${{ matrix.buildPreset }} | ||
tools: ${{ matrix.tools }} | ||
extras: ${{ matrix.extras }} | ||
secrets: inherit | ||
|
||
build-generalsmd-win32: | ||
name: Build GeneralsMD${{ matrix.preset && '' }} | ||
secrets: inherit | ||
build-generalsmd-vc6-log-release: | ||
name: Build GeneralsMD (vc6-log | vc6-log-release) | ||
needs: detect-changes | ||
if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.generalsmd == 'true' || needs.detect-changes.outputs.shared == 'true' }} | ||
strategy: | ||
matrix: | ||
include: | ||
- preset: "win32" | ||
tools: true | ||
extras: true | ||
- preset: "win32-profile" | ||
tools: true | ||
extras: true | ||
- preset: "win32-debug" | ||
tools: true | ||
extras: true | ||
# vcpkg builds have been disabled for now due to excessive build times of 30 minutes per preset | ||
# - preset: "win32-vcpkg" | ||
# tools: true | ||
# extras: true | ||
# - preset: "win32-vcpkg-profile" | ||
# tools: true | ||
# extras: true | ||
# - preset: "win32-vcpkg-debug" | ||
# tools: true | ||
# extras: true | ||
fail-fast: false | ||
uses: ./.github/workflows/build-toolchain.yml | ||
with: | ||
game: "GeneralsMD" | ||
preset: ${{ matrix.preset }} | ||
tools: ${{ matrix.tools }} | ||
extras: ${{ matrix.extras }} | ||
configurePreset: "vc6-log" | ||
buildPreset: "vc6-log-release" | ||
tools: false | ||
extras: false | ||
secrets: inherit | ||
|
||
replaycheck-generalsmd: | ||
name: Replay Check GeneralsMD${{ matrix.preset && '' }} | ||
needs: build-generalsmd-vc6 | ||
name: Replay Check | ||
needs: build-generalsmd-vc6-log-release | ||
if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.generalsmd == 'true' || needs.detect-changes.outputs.shared == 'true' }} | ||
strategy: | ||
matrix: | ||
include: | ||
- preset: "vc6+t+e" | ||
- preset: "vc6-releaselog+t+e" # optimized build with logging and crashing enabled should be compatible, so we test that here. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not check replays for release and releaselog? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not that good at ci stuff atm. I just fixed stuff on the cmake side and tried my best to adjust the ci accordingly. Perhaps someone else can do the ci update/fix. |
||
fail-fast: false | ||
uses: ./.github/workflows/check-replays.yml | ||
with: | ||
game: "GeneralsMD" | ||
configurePreset: "vc6-log" | ||
buildPreset: "vc6-log-release" | ||
userdata: "GeneralsReplays/GeneralsZH/1.04" | ||
preset: ${{ matrix.preset }} | ||
secrets: inherit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I understand correctly that each Job compiles Debug and Release, but only uploads Release binaries? Why don't we upload the debug builds? We don't need to upload the debug c++ runtime.