@@ -32,12 +32,11 @@ jobs:
3232 sudo apt-get update
3333 sudo apt-get install -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev
3434
35- - name : Install Rust toolchain
36- uses : dtolnay/rust-toolchain@stable
37-
38- - uses : ruby/setup-ruby@v1
35+ - name : Setup Ruby and Rust
36+ uses : oxidize-rb/actions/setup-ruby-and-rust@v1
3937 with :
4038 ruby-version : ${{ inputs.ruby-version || '3.4' }}
39+ rustup-toolchain : stable
4140 bundler-cache : true
4241 working-directory : ruby/smalruby3
4342
@@ -68,33 +67,37 @@ jobs:
6867 steps :
6968 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
7069
71- - uses : ruby/setup-ruby@v1
70+ - name : Install SDL2 via MSYS2
71+ uses : msys2/setup-msys2@v2
72+ with :
73+ msystem : UCRT64
74+ update : true
75+ install : >-
76+ mingw-w64-ucrt-x86_64-SDL2
77+ mingw-w64-ucrt-x86_64-SDL2_image
78+ mingw-w64-ucrt-x86_64-SDL2_mixer
79+ mingw-w64-ucrt-x86_64-SDL2_ttf
80+
81+ - name : Setup Ruby and Rust
82+ uses : oxidize-rb/actions/setup-ruby-and-rust@v1
7283 with :
7384 ruby-version : ${{ inputs.ruby-version || '3.4' }}
85+ rustup-toolchain : stable
7486 bundler-cache : true
7587 working-directory : ruby/smalruby3
7688
77- - name : Install SDL2 via RubyInstaller MSYS2
78- shell : bash
89+ - name : Add MSYS2 SDL2 to paths
90+ shell : pwsh
7991 run : |
80- ridk exec pacman -S --noconfirm \
81- mingw-w64-ucrt-x86_64-SDL2 \
82- mingw-w64-ucrt-x86_64-SDL2_image \
83- mingw-w64-ucrt-x86_64-SDL2_mixer \
84- mingw-w64-ucrt-x86_64-SDL2_ttf
85-
86- - name : Install Rust GNU target
87- uses : dtolnay/rust-toolchain@stable
88- with :
89- targets : x86_64-pc-windows-gnu
92+ echo "C:\msys64\ucrt64\bin" >> $env:GITHUB_PATH
93+ echo "CPATH=C:\msys64\ucrt64\include" >> $env:GITHUB_ENV
94+ echo "LIBRARY_PATH=C:\msys64\ucrt64\lib" >> $env:GITHUB_ENV
95+ echo "PKG_CONFIG_PATH=C:\msys64\ucrt64\lib\pkgconfig" >> $env:GITHUB_ENV
9096
9197 - name : Build gem
9298 run : gem build smalruby3.gemspec
9399
94100 - name : Compile native extension
95- shell : bash
96- env :
97- CARGO_BUILD_TARGET : x86_64-pc-windows-gnu
98101 run : bundle exec rake compile
99102
100103 - name : Run tests
0 commit comments