Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: windows

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
adapters:
name: Adapter specs on Windows (libxml)
runs-on: windows-latest

steps:
- uses: actions/checkout@v6
with:
submodules: "recursive"

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: false

- name: Install libxml2 and build tools via MSYS2
shell: cmd
run: |
C:\msys64\usr\bin\pacman.exe -S --needed --noconfirm ^
mingw-w64-ucrt-x86_64-libxml2 ^
mingw-w64-ucrt-x86_64-libiconv ^
mingw-w64-ucrt-x86_64-zlib ^
mingw-w64-ucrt-x86_64-ragel ^
mingw-w64-ucrt-x86_64-make ^
mingw-w64-ucrt-x86_64-gcc

- name: Put MSYS2 UCRT64 toolchain on PATH
shell: pwsh
run: |
"PATH=C:\msys64\ucrt64\bin;C:\msys64\usr\bin;$env:PATH" >> $env:GITHUB_ENV

- name: Configure libxml-ruby build
shell: pwsh
run: |
bundle config build.libxml-ruby --with-xml2-include=C:/msys64/ucrt64/include/libxml2 --with-xml2-lib=C:/msys64/ucrt64/lib --with-iconv-include=C:/msys64/ucrt64/include --with-iconv-lib=C:/msys64/ucrt64/lib

- name: Generate ragel / ruby-ll outputs in vendored forks
shell: pwsh
run: |
gem install ruby-ll --no-document
rake vendor:prepare

- name: Install dependencies
run: bundle install --jobs 4

- name: Compile vendored native extensions
run: bundle exec rake vendor:compile

- name: Run adapter specs
run: bundle exec rake spec:adapter
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ gem "rubocop-performance"
gem "rubocop-rake"
gem "rubocop-rspec"
gem "simplecov", require: false
gem "stackprof"
# stackprof relies on POSIX signals (SIGPROF/sigaction) unavailable on Windows
gem "stackprof" unless Gem.win_platform?
gem "tempfile"

# Needed by get_process_mem on Windows
Expand Down
Loading