Repository navigation
ci(build): Install widl from the Ubuntu Wine packages instead of the WineHQ repository in MinGW-w64 jobs #3675
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
Draft
OmarAglan
wants to merge
8
commits into
TheSuperHackers:main
Choose a base branch
from
OmarAglan:ci/mingw-widl-from-mingw-w64-tools
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+117
−0
Draft
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
988b9a6
build(ci): Add MinGW-w64 i686 cross-compilation to CI workflow (#2163)
JohnsterID c48e661
build(ci): Remove ineffective MinGW-w64 system path caching
JohnsterID 6466fa4
build(cmake): Fix MinGW-w64 linking of the game engine, engine device…
OmarAglan 8de43fd
build(ci): Pin MinGW-w64 job actions to commit SHAs and stop hiding a…
OmarAglan 79addaa
build(ci): Move MinGW-w64 jobs into a reusable workflow and build the…
OmarAglan 8564f5c
build(ci): Pin the MinGW-w64 runner to Ubuntu 24.04
OmarAglan b36276c
build(cmake): Enable SSE2 for MinGW-w64 builds so GameMath intrinsics…
OmarAglan 7151ff8
build(ci): Install widl from the Ubuntu Wine packages instead of the …
OmarAglan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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,80 @@ | ||
| name: Build MinGW-w64 | ||
|
|
||
| # WARNING: Do not declare permissions in this reusable workflow. | ||
| # Declare the required permissions in each calling job: | ||
| # contents: read - required for all builds. | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| game: | ||
| required: true | ||
| type: string | ||
| description: "Game to build (Generals or GeneralsMD)" | ||
| preset: | ||
| required: true | ||
| type: string | ||
| description: "CMake preset" | ||
|
|
||
| jobs: | ||
| build: | ||
| name: ${{ inputs.preset }} | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 45 | ||
| steps: | ||
| - name: Checkout Code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
|
|
||
| - name: Install MinGW-w64 Toolchain | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y mingw-w64 cmake | ||
|
|
||
| - name: Install widl | ||
| run: | | ||
| # widl compiles the IDL files. wine64-tools has widl and depends on libwine-dev, which has the system IDL files. | ||
| sudo apt-get install -y --no-install-recommends wine64-tools | ||
|
|
||
| - name: Cache CMake Dependencies | ||
| id: cache-cmake-deps | ||
| uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 | ||
| with: | ||
| path: build/${{ inputs.preset }}/_deps | ||
| key: cmake-deps-mingw-${{ inputs.preset }}-${{ hashFiles('CMakePresets.json','cmake/**/*.cmake','**/CMakeLists.txt') }} | ||
|
|
||
| - name: Configure ${{ inputs.game }} with CMake (${{ inputs.preset }}) | ||
| run: | | ||
| # Unset LD_LIBRARY_PATH to avoid library conflicts | ||
| unset LD_LIBRARY_PATH | ||
|
|
||
| # Configure with appropriate flags | ||
| cmake --preset ${{ inputs.preset }} \ | ||
| -DRTS_BUILD_ZEROHOUR=${{ inputs.game == 'GeneralsMD' && 'ON' || 'OFF' }} \ | ||
| -DRTS_BUILD_GENERALS=${{ inputs.game == 'Generals' && 'ON' || 'OFF' }} \ | ||
| -DRTS_BUILD_CORE_TOOLS=OFF \ | ||
| -DRTS_BUILD_GENERALS_TOOLS=OFF \ | ||
| -DRTS_BUILD_ZEROHOUR_TOOLS=OFF \ | ||
| -DRTS_BUILD_CORE_EXTRAS=OFF \ | ||
| -DRTS_BUILD_GENERALS_EXTRAS=OFF \ | ||
| -DRTS_BUILD_ZEROHOUR_EXTRAS=OFF | ||
|
|
||
| - name: Build ${{ inputs.game }} (${{ inputs.preset }}) | ||
| run: | | ||
| # Build with parallel jobs | ||
| cmake --build build/${{ inputs.preset }} --target ${{ inputs.game == 'Generals' && 'g_generals' || 'z_generals' }} -j$(nproc) | ||
|
|
||
| - name: Collect ${{ inputs.game }} Artifacts | ||
| run: | | ||
| ARTIFACTS_DIR="build/${{ inputs.preset }}/${{ inputs.game }}/artifacts" | ||
| mkdir -p "$ARTIFACTS_DIR" | ||
|
|
||
| # Copy executables, DLLs, and debug symbols | ||
| find build/${{ inputs.preset }}/Core build/${{ inputs.preset }}/${{ inputs.game }} -path "$ARTIFACTS_DIR" -prune -o -type f \( -name "*.exe" -o -name "*.dll" -o -name "*.exe.debug" \) -exec cp -t "$ARTIFACTS_DIR" {} + | ||
|
|
||
| - name: Upload ${{ inputs.game }} ${{ inputs.preset }} Artifact | ||
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | ||
| with: | ||
| name: ${{ inputs.game }}-${{ inputs.preset }} | ||
| path: build/${{ inputs.preset }}/${{ inputs.game }}/artifacts | ||
| retention-days: 30 | ||
| if-no-files-found: error | ||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Replace the Wine-dependent
widlsetup.This step still installs
wine64-tools. On Ubuntu 24.04, that package pulls inlibwine-devandlibwine, so both MinGW jobs remain Wine-dependent. Replace it withmingw-w64-toolsand updatecmake/widl.cmaketo findi686-w64-mingw32-widland the MinGW IDL headers. Changing this install command alone will not complete the switch. (packages.ubuntu.com)