From d01879f0018adf95efea25b1601e04e930305d26 Mon Sep 17 00:00:00 2001 From: Charlie Savage Date: Mon, 6 Apr 2026 19:57:59 -0700 Subject: [PATCH] Add mswin CI job using vcpkg for libxml2. --- .github/workflows/mri.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/mri.yml b/.github/workflows/mri.yml index e01f6e6f..a1c77241 100644 --- a/.github/workflows/mri.yml +++ b/.github/workflows/mri.yml @@ -37,3 +37,36 @@ jobs: run: bundle exec rake compile - name: Test run: bundle exec rake test + + mswin: + name: windows-latest mswin + env: + TESTOPTS: -v + runs-on: windows-latest + if: | + !( contains(github.event.pull_request.title, '[ci skip]') + || contains(github.event.pull_request.title, '[skip ci]')) + steps: + - uses: actions/checkout@v4 + - uses: ilammy/msvc-dev-cmd@v1 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: mswin + bundler-cache: true + timeout-minutes: 10 + - name: Install libxml2 via vcpkg + shell: pwsh + run: | + git clone https://github.com/microsoft/vcpkg.git "$env:RUNNER_TEMP\vcpkg" + & "$env:RUNNER_TEMP\vcpkg\bootstrap-vcpkg.bat" + & "$env:RUNNER_TEMP\vcpkg\vcpkg.exe" install libxml2:x64-windows-release + echo "VCPKG_ROOT=$env:RUNNER_TEMP\vcpkg" >> $env:GITHUB_ENV + echo "$env:RUNNER_TEMP\vcpkg\installed\x64-windows-release\bin" >> $env:GITHUB_PATH + - name: Build + shell: pwsh + run: | + $vcpkg = "$env:RUNNER_TEMP\vcpkg\installed\x64-windows-release" + bundle exec rake compile -- --with-xml2-dir="$vcpkg" --with-xml2-include="$vcpkg\include\libxml2" + - name: Test + run: bundle exec rake test