Skip to content

Commit 67eedb1

Browse files
committed
Add new platform aarch64-mingw-ucrt aka Windows on ARM
It fits to the latest RubyInstaller release: https://rubyinstaller.org/2025/01/19/rubyinstaller-3.4.1-2-released.html Fixes #148
1 parent c4e7dc3 commit 67eedb1

File tree

5 files changed

+17
-2
lines changed

5 files changed

+17
-2
lines changed

Diff for: .github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ jobs:
5353
- platform: arm-linux-musl
5454
- platform: arm64-darwin
5555
- platform: jruby
56+
- platform: aarch64-mingw-ucrt
5657
- platform: x64-mingw-ucrt
5758
static: true
5859
- platform: x64-mingw32

Diff for: .github/workflows/publish-images.yml

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
platform:
16+
- aarch64-mingw-ucrt
1617
- aarch64-linux-gnu
1718
- aarch64-linux-musl
1819
- arm-linux-gnu

Diff for: .github/workflows/release-images.yml

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
platform:
23+
- aarch64-mingw-ucrt
2324
- aarch64-linux-gnu
2425
- aarch64-linux-musl
2526
- arm-linux-gnu

Diff for: Dockerfile.mri.erb

+13-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ COPY --from=larskanis/mingw64-ucrt:20.04 \
2424
/debs/
2525
RUN dpkg -i /debs/*.deb
2626

27+
<% elsif platform =~ /aarch64-mingw-ucrt/ %>
28+
RUN wget https://github.com/mstorsjo/llvm-mingw/releases/download/20250114/llvm-mingw-20250114-ucrt-ubuntu-20.04-#{RUBY_PLATFORM[/^\w+/]}.tar.xz && \
29+
tar xf llvm-mingw*.tar.xz && \
30+
export MINGW_PATH=`ls -d llvm-mingw-*/` && \
31+
echo "export PATH=`pwd`/$MINGW_PATH/bin:\$PATH" >> /etc/rubybashrc && \
32+
rm -r $MINGW_PATH/bin/i686-w64* $MINGW_PATH/bin/armv7-w64* $MINGW_PATH/bin/x86_64-w64* $MINGW_PATH/i686-w64* $MINGW_PATH/armv7-w64* $MINGW_PATH/x86_64-w64*
33+
2734
<% elsif platform =~ /linux-musl/ %>
2835
COPY build/mk_musl_cross.sh /tmp
2936
RUN /tmp/mk_musl_cross.sh <%= target %>
@@ -117,6 +124,10 @@ xrubies_build_plan = if platform =~ /x64-mingw-ucrt/
117124
# Rubyinstaller-3.1+ is platform x64-mingw-ucrt
118125
["3.4.1:3.3.5:3.2.6:3.1.6", "3.1.6"],
119126
]
127+
elsif platform =~ /aarch64-mingw-ucrt/
128+
[
129+
["3.4.1", "3.1.6"],
130+
]
120131
elsif platform =~ /x64-mingw32/
121132
[
122133
# Rubyinstaller prior to 3.1 is platform x64-mingw32
@@ -130,7 +141,7 @@ else
130141
]
131142
end
132143

133-
strip = '-s' if platform !~ /darwin/
144+
strip = '-s' if platform !~ /darwin|aarch64-mingw/
134145

135146
xrubies_build_plan.each do |xrubies, bootstrap_ruby_version| %>
136147
RUN bash -c " \
@@ -186,7 +197,7 @@ RUN find /usr/local/rake-compiler/ruby/*/*/lib/ruby -name rbconfig.rb | while re
186197
##
187198
USER root
188199
189-
<% if platform =~ /mingw/ %>
200+
<% if platform =~ /(x64|x86)-mingw/ %>
190201
# Install wrappers for strip commands as a workaround for "Protocol error" in boot2docker.
191202
COPY build/strip_wrapper_vbox /root/
192203
RUN mv /usr/bin/<%= target %>-strip /usr/bin/<%= target %>-strip.bin && \

Diff for: Rakefile

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ platforms = [
1515
["arm-linux-gnu", "arm-linux-gnueabihf"],
1616
["arm-linux-musl", "arm-linux-musleabihf"],
1717
["arm64-darwin", "aarch64-apple-darwin"],
18+
["aarch64-mingw-ucrt", "aarch64-w64-mingw32"],
1819
["x64-mingw-ucrt", "x86_64-w64-mingw32"],
1920
["x64-mingw32", "x86_64-w64-mingw32"],
2021
["x86-linux-gnu", "i686-linux-gnu"],

0 commit comments

Comments
 (0)