|
10 | 10 | workflow_dispatch: |
11 | 11 |
|
12 | 12 | jobs: |
| 13 | + build-yggdrasil-variant: |
| 14 | + name: Build Yggdrasil variant / fno-strict-aliasing |
| 15 | + if: github.event_name == 'workflow_dispatch' |
| 16 | + runs-on: ubuntu-latest |
| 17 | + timeout-minutes: 60 |
| 18 | + steps: |
| 19 | + - uses: julia-actions/setup-julia@v2 |
| 20 | + with: |
| 21 | + version: "1.12" |
| 22 | + |
| 23 | + - uses: actions/checkout@v5 |
| 24 | + with: |
| 25 | + repository: JuliaPackaging/Yggdrasil |
| 26 | + path: Yggdrasil |
| 27 | + |
| 28 | + - name: Patch MariaDB Connector/C recipe |
| 29 | + shell: bash |
| 30 | + run: | |
| 31 | + set -euo pipefail |
| 32 | + cd Yggdrasil/M/MariaDB_Connector_C |
| 33 | + perl -0pi -e 's/\Q-Wno-error -Wno-incompatible-pointer-types\E/-Wno-error -Wno-incompatible-pointer-types -fno-strict-aliasing/' build_tarballs.jl |
| 34 | + grep -n 'fno-strict-aliasing' build_tarballs.jl |
| 35 | +
|
| 36 | + - name: Build Windows tarball |
| 37 | + shell: bash |
| 38 | + run: | |
| 39 | + set -euo pipefail |
| 40 | + cd Yggdrasil/M/MariaDB_Connector_C |
| 41 | + julia --project=../.. --startup-file=no build_tarballs.jl --verbose x86_64-w64-mingw32 |
| 42 | + mkdir -p "$GITHUB_WORKSPACE/variant" |
| 43 | + cp products/MariaDB_Connector_C.v*.x86_64-w64-mingw32.tar.gz "$GITHUB_WORKSPACE/variant/" |
| 44 | + cp products/MariaDB_Connector_C-logs.v*.x86_64-w64-mingw32.tar.gz "$GITHUB_WORKSPACE/variant/" |
| 45 | +
|
| 46 | + - uses: actions/upload-artifact@v5 |
| 47 | + with: |
| 48 | + name: mariadb-connector-c-fno-strict-aliasing |
| 49 | + path: variant/*.tar.gz |
| 50 | + |
13 | 51 | issue236: |
14 | 52 | name: Windows ${{ matrix.os }} / ${{ matrix.connector }} |
15 | 53 | runs-on: ${{ matrix.os }} |
@@ -77,3 +115,70 @@ jobs: |
77 | 115 | MYSQLJL_CONNECTOR: ${{ matrix.connector }} |
78 | 116 | MYSQLJL_JLL_VERSION: ${{ matrix.connector == 'jll-3.3.9' && '3.3.9' || 'default' }} |
79 | 117 | run: julia --startup-file=no test/issue236_windows.jl |
| 118 | + |
| 119 | + issue236-yggdrasil-variant: |
| 120 | + name: Windows ${{ matrix.os }} / yggdrasil-fno-strict-aliasing |
| 121 | + if: github.event_name == 'workflow_dispatch' |
| 122 | + needs: build-yggdrasil-variant |
| 123 | + runs-on: ${{ matrix.os }} |
| 124 | + timeout-minutes: 30 |
| 125 | + strategy: |
| 126 | + fail-fast: false |
| 127 | + matrix: |
| 128 | + os: |
| 129 | + - windows-2022 |
| 130 | + - windows-2025 |
| 131 | + |
| 132 | + steps: |
| 133 | + - uses: actions/checkout@v5 |
| 134 | + |
| 135 | + - uses: julia-actions/setup-julia@v2 |
| 136 | + with: |
| 137 | + version: "1" |
| 138 | + arch: x64 |
| 139 | + |
| 140 | + - name: Start MySQL |
| 141 | + uses: shogo82148/actions-setup-mysql@v1.51.0 |
| 142 | + with: |
| 143 | + mysql-version: "8.4" |
| 144 | + root-password: root |
| 145 | + |
| 146 | + - uses: actions/download-artifact@v5 |
| 147 | + with: |
| 148 | + name: mariadb-connector-c-fno-strict-aliasing |
| 149 | + path: ${{ runner.temp }}/variant |
| 150 | + |
| 151 | + - name: Use Yggdrasil variant |
| 152 | + shell: pwsh |
| 153 | + run: | |
| 154 | + $target = Join-Path $env:RUNNER_TEMP "mariadb-connector-c-fno-strict-aliasing" |
| 155 | + New-Item -ItemType Directory -Force -Path $target | Out-Null |
| 156 | + $tarball = Get-ChildItem (Join-Path $env:RUNNER_TEMP "variant") -Filter "MariaDB_Connector_C.v*.x86_64-w64-mingw32.tar.gz" | Select-Object -First 1 |
| 157 | + if ($null -eq $tarball) { |
| 158 | + throw "Could not find built Connector/C tarball" |
| 159 | + } |
| 160 | + tar -xzf $tarball.FullName -C $target |
| 161 | +
|
| 162 | + $dll = Join-Path $target "bin/libmariadb.dll" |
| 163 | + $plugin = Join-Path $target "lib/mariadb/plugin" |
| 164 | + if (!(Test-Path $dll)) { |
| 165 | + throw "Could not find libmariadb.dll at $dll" |
| 166 | + } |
| 167 | + if (!(Test-Path (Join-Path $plugin "caching_sha2_password.dll"))) { |
| 168 | + throw "Could not find Connector/C plugin directory at $plugin" |
| 169 | + } |
| 170 | +
|
| 171 | + "MYSQLJL_LIBMARIADB_OVERRIDE=$dll" >> $env:GITHUB_ENV |
| 172 | + "MYSQLJL_PLUGIN_DIR_OVERRIDE=$plugin" >> $env:GITHUB_ENV |
| 173 | + "$(Split-Path -Parent $dll)" >> $env:GITHUB_PATH |
| 174 | +
|
| 175 | + - name: Run issue 236 diagnostic |
| 176 | + shell: pwsh |
| 177 | + env: |
| 178 | + MYSQLJL_HOST: 127.0.0.1 |
| 179 | + MYSQLJL_PORT: "3306" |
| 180 | + MYSQLJL_USER: root |
| 181 | + MYSQLJL_PASSWORD: root |
| 182 | + MYSQLJL_CONNECTOR: yggdrasil-fno-strict-aliasing |
| 183 | + MYSQLJL_JLL_VERSION: default |
| 184 | + run: julia --startup-file=no test/issue236_windows.jl |
0 commit comments