-
Notifications
You must be signed in to change notification settings - Fork 0
Review mirror: Linux-hosted build, authoring tools, and server workflow #1
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
a90a966
0e7cece
d2436fd
8f6fdef
3d38e08
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,160 @@ | ||
| name: Build and verify | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - "codex/**" | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| public-checks: | ||
| name: Public source checks | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout public source | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| submodules: false | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v7 | ||
| with: | ||
| node-version: 22 | ||
| cache: npm | ||
|
|
||
| - name: Run public source checks | ||
| run: scripts/ci/run-public-source-checks.sh | ||
|
|
||
| - name: Upload authoring-tool packages | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: PalSchema-authoring-tools | ||
| if-no-files-found: error | ||
| retention-days: 7 | ||
| path: | | ||
| dist/palschema-vscode-*.vsix | ||
| dist/palschema-tools-*.tgz | ||
|
|
||
| windows-msvc-shipping: | ||
| name: Windows MSVC Shipping baseline | ||
| if: >- | ||
| vars.PRIVATE_SUBMODULES_AVAILABLE == 'true' && | ||
| github.event_name == 'push' && | ||
| github.ref == 'refs/heads/main' | ||
| runs-on: windows-latest | ||
| defaults: | ||
| run: | ||
| shell: pwsh | ||
| steps: | ||
| - name: Checkout authorized recursive dependencies | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| fetch-depth: 0 | ||
| submodules: recursive | ||
| token: ${{ secrets.UEPSEUDO_TOKEN }} | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up MSVC | ||
| uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1 | ||
| with: | ||
| arch: x64 | ||
|
LAP87 marked this conversation as resolved.
|
||
|
|
||
| - name: Add LLVM tools to PATH | ||
| run: | | ||
| $llvmPath = "C:\Program Files\LLVM\bin" | ||
| if (-not (Test-Path $llvmPath)) { | ||
| throw "LLVM was not found at $llvmPath" | ||
| } | ||
| $llvmPath | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | ||
|
|
||
| - name: Install Rust target | ||
| run: rustup target add x86_64-pc-windows-msvc | ||
|
|
||
| - name: Configure | ||
| run: cmake --preset win64-msvc-ci-shipping | ||
|
|
||
| - name: Build PalSchema | ||
| run: cmake --build --preset win64-msvc-ci-shipping --target PalSchema | ||
|
LAP87 marked this conversation as resolved.
|
||
|
|
||
| - name: Verify PE contract | ||
| run: >- | ||
| python scripts/verify-win64-artifact.py | ||
| build/win64-msvc-ci-shipping/PalSchema.dll | ||
| --json-output build/win64-msvc-ci-shipping/pe-contract.json | ||
|
|
||
| - name: Upload public build outputs | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: PalSchema-Win64-MSVC-Shipping | ||
| if-no-files-found: error | ||
| retention-days: 7 | ||
| path: | | ||
| build/win64-msvc-ci-shipping/PalSchema.dll | ||
| build/win64-msvc-ci-shipping/pe-contract.json | ||
|
|
||
| linux-xwin: | ||
| name: Linux-hosted Win64 Dev and Shipping | ||
| if: >- | ||
| vars.PRIVATE_SUBMODULES_AVAILABLE == 'true' && | ||
| github.event_name == 'push' && | ||
| github.ref == 'refs/heads/main' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout authorized recursive dependencies | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| fetch-depth: 0 | ||
| submodules: recursive | ||
| token: ${{ secrets.UEPSEUDO_TOKEN }} | ||
| persist-credentials: false | ||
|
|
||
| - name: Install Linux cross-build tools | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y --no-install-recommends \ | ||
| clang clang-tools cmake lld llvm ninja-build \ | ||
| python3 util-linux zip | ||
|
|
||
| - name: Prepare isolated Rust and Microsoft SDK caches | ||
| run: >- | ||
| scripts/bootstrap-linux.sh | ||
| --install-rust-toolchain | ||
| --install-xwin | ||
| --prepare-sdk | ||
| --accept-microsoft-license | ||
|
|
||
| - name: Build and verify Linux-hosted Win64 artifact | ||
| run: | | ||
| scripts/build-linux.sh dev | ||
| python3 scripts/verify-win64-artifact.py \ | ||
| build/win64-xwin-dev/PalSchema.dll \ | ||
| --json-output build/win64-xwin-dev/pe-contract.json | ||
| scripts/package-linux.sh dev --output-dir dist | ||
| scripts/build-linux.sh shipping | ||
| python3 scripts/verify-win64-artifact.py \ | ||
| build/win64-xwin-shipping/PalSchema.dll \ | ||
| --json-output build/win64-xwin-shipping/pe-contract.json | ||
| scripts/package-linux.sh shipping --output-dir dist | ||
| for archive in dist/PalSchema_*_Win64*.zip; do | ||
| unzip -l "$archive" | ||
| done | ||
|
|
||
| - name: Upload Linux-hosted Win64 outputs | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: PalSchema-Win64-Linux-xwin | ||
| if-no-files-found: error | ||
| retention-days: 7 | ||
| path: | | ||
| build/win64-xwin-dev/PalSchema.dll | ||
| build/win64-xwin-dev/PalSchema.pdb | ||
| build/win64-xwin-dev/pe-contract.json | ||
| build/win64-xwin-shipping/PalSchema.dll | ||
| build/win64-xwin-shipping/pe-contract.json | ||
| dist/PalSchema_*_Win64*.zip | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| { | ||
| "version": 6, | ||
|
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.
The project and build documentation advertise CMake 3.22, but the CMake presets manual lists preset schema version 6 as added in CMake 3.25. On a supported 3.22–3.24 installation, every documented Useful? React with 👍 / 👎. |
||
| "cmakeMinimumRequired": { | ||
| "major": 3, | ||
| "minor": 22, | ||
| "patch": 0 | ||
| }, | ||
| "configurePresets": [ | ||
| { | ||
| "name": "win64-xwin-base", | ||
| "hidden": true, | ||
| "generator": "Ninja", | ||
| "binaryDir": "${sourceDir}/build/${presetName}", | ||
| "toolchainFile": "${sourceDir}/cmake/toolchains/xwin-clang-cl.cmake", | ||
| "cacheVariables": { | ||
| "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" | ||
| }, | ||
| "condition": { | ||
| "type": "equals", | ||
| "lhs": "${hostSystemName}", | ||
| "rhs": "Linux" | ||
| } | ||
| }, | ||
| { | ||
| "name": "win64-xwin-dev", | ||
| "displayName": "Win64 Dev (Linux host, xwin + clang-cl)", | ||
| "description": "Cross-compile the PalSchema development DLL for Palworld under Proton.", | ||
| "inherits": "win64-xwin-base", | ||
| "cacheVariables": { | ||
| "CMAKE_BUILD_TYPE": "Game__Debug__Win64" | ||
| } | ||
| }, | ||
| { | ||
| "name": "win64-xwin-shipping", | ||
| "displayName": "Win64 Shipping (Linux host, xwin + clang-cl)", | ||
| "description": "Cross-compile the PalSchema shipping DLL for Palworld under Proton.", | ||
| "inherits": "win64-xwin-base", | ||
| "cacheVariables": { | ||
| "CMAKE_BUILD_TYPE": "Game__Shipping__Win64" | ||
| } | ||
| }, | ||
| { | ||
| "name": "win64-msvc-ci-shipping", | ||
| "displayName": "Win64 Shipping (Windows CI, MSVC)", | ||
| "description": "Build the Windows baseline used to compare the Linux-hosted cross-build.", | ||
| "generator": "Ninja", | ||
| "binaryDir": "${sourceDir}/build/${presetName}", | ||
| "cacheVariables": { | ||
| "CMAKE_BUILD_TYPE": "Game__Shipping__Win64", | ||
| "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" | ||
| }, | ||
| "condition": { | ||
| "type": "equals", | ||
| "lhs": "${hostSystemName}", | ||
| "rhs": "Windows" | ||
| } | ||
| } | ||
| ], | ||
| "buildPresets": [ | ||
| { | ||
| "name": "win64-xwin-dev", | ||
| "configurePreset": "win64-xwin-dev" | ||
| }, | ||
| { | ||
| "name": "win64-xwin-shipping", | ||
| "configurePreset": "win64-xwin-shipping" | ||
| }, | ||
| { | ||
| "name": "win64-msvc-ci-shipping", | ||
| "configurePreset": "win64-msvc-ci-shipping" | ||
| } | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,32 @@ | ||
| { | ||
| "json.schemas": [ | ||
| { | ||
| "fileMatch": ["items/*.json"], | ||
| "url": "./schemas/items.schema.json" | ||
| }, | ||
| { | ||
| "fileMatch": ["pals/*.json"], | ||
| "url": "./schemas/pals.schema.json" | ||
| }, | ||
| { | ||
| "fileMatch": ["skins/*.json"], | ||
| "url": "./schemas/skins.schema.json" | ||
| }, | ||
| { | ||
| "fileMatch": ["buildings/*.json"], | ||
| "url": "./schemas/buildings.schema.json" | ||
| }, | ||
| { | ||
| "fileMatch": ["raw/*.json"], | ||
| "url": "./schemas/raw.schema.json" | ||
| }, | ||
| ] | ||
| } | ||
| "json.schemas": [ | ||
| { | ||
| "fileMatch": [ | ||
| "**/items/**/*.json", | ||
| "**/items/**/*.jsonc" | ||
| ], | ||
| "url": "./schemas/items.schema.json" | ||
| }, | ||
| { | ||
| "fileMatch": [ | ||
| "**/pals/**/*.json", | ||
| "**/pals/**/*.jsonc" | ||
| ], | ||
| "url": "./schemas/pals.schema.json" | ||
| }, | ||
| { | ||
| "fileMatch": [ | ||
| "**/skins/**/*.json", | ||
| "**/skins/**/*.jsonc" | ||
| ], | ||
| "url": "./schemas/skins.schema.json" | ||
| }, | ||
| { | ||
| "fileMatch": [ | ||
| "**/buildings/**/*.json", | ||
| "**/buildings/**/*.jsonc" | ||
| ], | ||
| "url": "./schemas/buildings.schema.json" | ||
| } | ||
| ] | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.