diff --git a/.github/actions/windows-reg-import/action.yml b/.github/actions/windows-reg-import/action.yml new file mode 100755 index 0000000000..728a735beb --- /dev/null +++ b/.github/actions/windows-reg-import/action.yml @@ -0,0 +1,39 @@ +name: windows-reg-import +description: Import a .reg file and verify those registry values (best-effort) +inputs: + reg-file: + description: "Path to the .reg file" + required: true +runs: + using: "composite" + steps: + - name: Attempt to import custom registry (best-effort) + shell: pwsh + run: | + try { + $regFile = Join-Path $env:GITHUB_WORKSPACE "${{ inputs.reg-file }}" + if (-not (Test-Path $regFile)) { + Write-Warning "Registry file not found (skipping): $regFile" + } else { + Write-Host "Importing registry from $regFile (attempting, non-fatal)" + reg import $regFile 2>&1 | ForEach-Object { Write-Host $_ } + } + } catch { + Write-Warning "Registry import failed (ignored): $_" + } + + - name: Attempt to verify registry values (best-effort) + shell: pwsh + run: | + try { + $acp = (Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Nls\CodePage' -Name ACP -ErrorAction Stop).ACP + Write-Host "ACP = $acp" + } catch { + Write-Warning "Failed to read ACP (ignored): $_" + } + try { + $eb = (Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Nls\MUILanguagePreferences' -Name EnableBetaUnicode -ErrorAction Stop).EnableBetaUnicode + Write-Host "EnableBetaUnicode = $eb" + } catch { + Write-Warning "Failed to read EnableBetaUnicode (ignored): $_" + } diff --git a/.github/ci/windows/custom.reg b/.github/ci/windows/custom.reg new file mode 100755 index 0000000000..cbc0213c5c Binary files /dev/null and b/.github/ci/windows/custom.reg differ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68b842b50b..78d118e2c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -746,6 +746,10 @@ jobs: with: fetch-depth: 0 submodules: true + - name: Import custom registry and verify + uses: ./.github/actions/windows-reg-import + with: + reg-file: .github/ci/windows/custom.reg - uses: VirtusLab/scala-cli-setup@v1 with: jvm: "temurin:17" @@ -778,6 +782,10 @@ jobs: with: fetch-depth: 0 submodules: true + - name: Import custom registry and verify + uses: ./.github/actions/windows-reg-import + with: + reg-file: .github/ci/windows/custom.reg - name: Set up Python uses: actions/setup-python@v6 with: @@ -819,6 +827,10 @@ jobs: with: fetch-depth: 0 submodules: true + - name: Import custom registry and verify + uses: ./.github/actions/windows-reg-import + with: + reg-file: .github/ci/windows/custom.reg - name: Set up Python uses: actions/setup-python@v6 with: @@ -860,6 +872,10 @@ jobs: with: fetch-depth: 0 submodules: true + - name: Import custom registry and verify + uses: ./.github/actions/windows-reg-import + with: + reg-file: .github/ci/windows/custom.reg - name: Set up Python uses: actions/setup-python@v6 with: @@ -901,6 +917,10 @@ jobs: with: fetch-depth: 0 submodules: true + - name: Import custom registry and verify + uses: ./.github/actions/windows-reg-import + with: + reg-file: .github/ci/windows/custom.reg - name: Set up Python uses: actions/setup-python@v6 with: @@ -942,6 +962,10 @@ jobs: with: fetch-depth: 0 submodules: true + - name: Import custom registry and verify + uses: ./.github/actions/windows-reg-import + with: + reg-file: .github/ci/windows/custom.reg - name: Set up Python uses: actions/setup-python@v6 with: @@ -1518,6 +1542,10 @@ jobs: with: fetch-depth: 0 submodules: true + - name: Import custom registry and verify + uses: ./.github/actions/windows-reg-import + with: + reg-file: .github/ci/windows/custom.reg - uses: VirtusLab/scala-cli-setup@v1 with: jvm: "temurin:17" @@ -1824,6 +1852,10 @@ jobs: with: fetch-depth: 0 submodules: true + - name: Import custom registry and verify + uses: ./.github/actions/windows-reg-import + with: + reg-file: .github/ci/windows/custom.reg - uses: VirtusLab/scala-cli-setup@v1 with: jvm: "temurin:17" diff --git a/mill b/mill index 50a30978bc..273d80386b 100755 --- a/mill +++ b/mill @@ -70,7 +70,8 @@ function to_bash_syntax { if [[ $IS_WINDOWS ]]; then # needed for coursier version < 2.1.8, harmless otherwise IFS=$'\n' - eval "$(to_bash_syntax `"$cs" java --env --jvm temurin:17` || to_bash_syntax `"$cs" java --env --jvm openjdk:1.17.0`)" + # temurin:17 (build 17+35) doesn't support utf8 filenames, although some later 17 versions do + eval "$(to_bash_syntax `"$cs" java --env --jvm zulu:17` || to_bash_syntax `"$cs" java --env --jvm openjdk:1.17.0`)" unset IFS else eval "$("$cs" java --env --jvm temurin:17 || "$cs" java --env --jvm openjdk:1.17.0)" diff --git a/modules/integration/src/test/scala/scala/cli/integration/RunTestDefinitions.scala b/modules/integration/src/test/scala/scala/cli/integration/RunTestDefinitions.scala old mode 100644 new mode 100755 index 39b841120f..d8f1ba339a --- a/modules/integration/src/test/scala/scala/cli/integration/RunTestDefinitions.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/RunTestDefinitions.scala @@ -1077,11 +1077,11 @@ abstract class RunTestDefinitions fileName ) .call(cwd = root) - if (res.out.text(Codec.default).trim != message) { - pprint.err.log(res.out.text(Codec.default).trim) + if (res.out.text(Codec.UTF8).trim != message) { + pprint.err.log(res.out.text(Codec.UTF8).trim) pprint.err.log(message) } - expect(res.out.text(Codec.default).trim == message) + expect(res.out.text(Codec.UTF8).trim == message) } }