Generator: give ptrcall the 64-bit slot it actually writes for narrow… #1699
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 workflow will build a Swift project and run tests | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift | |
| name: Swift | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-test-macos: | |
| runs-on: macos-26 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # Xcode 26.5 bundles Swift 6.3.2, which satisfies the package's | |
| # swift-tools-version 6.3 (Xcode 26.2/26.3 only ship Swift 6.2.x). | |
| - name: Set up Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: "26.5" | |
| - name: Install Godot | |
| run: | | |
| brew install godot | |
| godot --version | |
| - name: Build | |
| run: swift build --build-tests --quiet | |
| - name: Run Swift tests (Swift Testing) | |
| run: swift test --skip-build --no-parallel --disable-xctest | |
| - name: Run Swift tests (XCTest) | |
| run: swift test --skip-build --no-parallel --disable-swift-testing | |
| - name: Run Godot-based tests | |
| run: swift run SwiftGodotTestRunner | |
| build-and-test-windows: | |
| runs-on: windows-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Install Swift | |
| uses: compnerd/gha-setup-swift@main | |
| with: | |
| branch: swift-6.3.2-release | |
| tag: 6.3.2-RELEASE | |
| - uses: actions/checkout@v4 | |
| - name: Install Godot | |
| shell: pwsh | |
| run: | | |
| $url = "https://github.com/godotengine/godot/releases/download/4.6-stable/Godot_v4.6-stable_win64.exe.zip" | |
| Invoke-WebRequest -Uri $url -OutFile godot.zip | |
| Expand-Archive godot.zip -DestinationPath godot | |
| # The zip ships the GUI editor plus a small console wrapper. The GUI build | |
| # relaunches through a wrapper named "<basename>.console.exe", so both must | |
| # be renamed as a matched pair; renaming only the GUI exe breaks the pairing | |
| # ("Invalid wrapper executable name"). | |
| $gui = Get-ChildItem godot -Filter *.exe | Where-Object { $_.Name -notlike "*_console.exe" } | Select-Object -First 1 | |
| $console = Get-ChildItem godot -Filter *_console.exe | Select-Object -First 1 | |
| Rename-Item $gui.FullName "godot.exe" | |
| Rename-Item $console.FullName "godot.console.exe" | |
| $dir = (Resolve-Path godot).Path | |
| # Put godot.exe on PATH so SwiftGodotTestRunner (which uses `where godot`) can find it. | |
| Add-Content -Path $env:GITHUB_PATH -Value $dir | |
| & "$dir\godot.exe" --version | |
| - name: Build | |
| run: swift build --build-tests --quiet | |
| - name: Run Swift tests (Swift Testing) | |
| run: swift test --skip-build --no-parallel --disable-xctest | |
| - name: Run Swift tests (XCTest) | |
| run: swift test --skip-build --no-parallel --disable-swift-testing | |
| - name: Run Godot-based tests | |
| run: swift run SwiftGodotTestRunner | |
| # Disabled: the package requires swift-tools-version 6.3, but | |
| # skiptools/swift-android-toolchain does not yet publish a Swift 6.3 Android | |
| # toolchain (latest is 6.2.3). Re-enable and bump swift-version once a 6.3 | |
| # release is available. | |
| # build-android: | |
| # runs-on: ubuntu-latest | |
| # | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # - uses: skiptools/swift-android-action@v2 | |
| # with: | |
| # swift-version: '6.3' | |
| # build-tests: false | |
| build-and-test-linux: | |
| runs-on: ubuntu-latest | |
| # The package requires swift-tools-version 6.3; run in the official Swift | |
| # 6.3.2 container since swift-actions/setup-swift does not yet offer 6.3. | |
| container: swift:6.3.2 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Disabled along with the Godot-based test below. Note: no sudo here since | |
| # the container runs as root, and Godot's runtime deps may also be needed. | |
| # - name: Install Godot | |
| # run: | | |
| # apt-get update | |
| # apt-get install -y wget unzip | |
| # wget https://github.com/godotengine/godot/releases/download/4.6-stable/Godot_v4.6-stable_linux.x86_64.zip | |
| # unzip Godot_v4.6-stable_linux.x86_64.zip | |
| # mv Godot_v4.6-stable_linux.x86_64 /usr/local/bin/godot | |
| # chmod +x /usr/local/bin/godot | |
| # godot --version | |
| - name: Build | |
| run: swift build --build-tests --quiet | |
| - name: Run Swift tests (Swift Testing) | |
| run: swift test --skip-build --no-parallel --disable-xctest | |
| - name: Run Swift tests (XCTest) | |
| run: swift test --skip-build --no-parallel --disable-swift-testing | |
| # Godot-based tests are disabled on Linux until | |
| # EditorHelp::_gen_extensions_docs() is fixed (re-enable the Godot install | |
| # above as well). | |
| # - name: Run Godot-based tests | |
| # run: swift run SwiftGodotTestRunner |