Skip to content

Commit 931c13a

Browse files
committed
Add install4j installer build
1 parent 2e078cd commit 931c13a

2 files changed

Lines changed: 39 additions & 4 deletions

File tree

‎.github/workflows/dist-verification-ci.yml‎

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
name: Dist Verification CI
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
pull_request:
6+
workflow_call:
7+
secrets:
8+
INSTALL4J_LICENSE:
9+
required: true
10+
411

512
env:
613
JAVA_OPTS: '-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xms60M -Xmx1G -XX:InitialCodeCacheSize=40M -XX:ReservedCodeCacheSize=120M'
@@ -29,12 +36,26 @@ jobs:
2936
distribution: 'zulu'
3037
java-version: 21
3138
cache: 'maven'
32-
- name: build dist archive
39+
- name: set up install4j
40+
uses: luangong/setup-install4j@v1
41+
with:
42+
version: 9.0.7
43+
license: ${{ secrets.INSTALL4J_LICENSE }}
44+
- name: build release artifacts
3345
run: |
3446
./mvnw -ntp clean package -Pall
47+
- uses: cedx/SetupAnt@v6
48+
- name: install dependencies
49+
run: bin/jruby -S bundle install
50+
- name: build installer
51+
run: rake installer INSTALL4J_EXECUTABLE=/opt/install4j/bin/install4jc
52+
- name: cache release artifacts
53+
run: |
3554
mv maven/jruby-dist/target/jruby-dist*-bin.tar.gz jruby-dist-bin.tar.gz
3655
mv maven/jruby-dist/target/jruby-dist*-src.tar.gz jruby-dist-src.tar.gz
3756
mv maven/jruby-complete/target/jruby-complete*.jar jruby-complete.jar
57+
mv install/jruby_windows-x32*.exe jruby_windows-x32.exe
58+
mv install/jruby_windows-x64*.exe jruby_windows-x64.exe
3859
- name: cache dist bin
3960
uses: actions/upload-artifact@v7
4061
with:
@@ -53,6 +74,18 @@ jobs:
5374
path: jruby-complete.jar
5475
retention-days: 1
5576
archive: false
77+
- name: cache x32 installer
78+
uses: actions/upload-artifact@v7
79+
with:
80+
path: jruby_windows-x32.exe
81+
retention-days: 1
82+
archive: false
83+
- name: cache x64 installer
84+
uses: actions/upload-artifact@v7
85+
with:
86+
path: jruby_windows-x64.exe
87+
retention-days: 1
88+
archive: false
5689

5790
rails-verification:
5891

‎rakelib/installer.rake‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ task :windows_installer => :init_release do
1414

1515
install_windows_gems(unpacked_dir)
1616

17-
if File.executable?(INSTALL4J_EXECUTABLE)
17+
install4j_executable = ENV['INSTALL4J_EXECUTABLE']
18+
19+
if File.executable?(install4j_executable)
1820
root_dir = Dir.pwd
1921
Dir.chdir(unpacked_dir) do
20-
sh %Q^"#{INSTALL4J_EXECUTABLE}" -m windows -D jruby.dist.location=#{root_dir},jruby.location=#{unpacked_dir},ruby.version=#{VERSION_RUBY},jruby.version=#{version},ruby.patchlevel=0,ruby.buildplatform=i386-mingw32 #{INSTALL4J_CONFIG_FILE}^ do |ok, result|
22+
sh %Q^"#{install4j_executable}" -m windows -D jruby.dist.location=#{root_dir},jruby.location=#{unpacked_dir},ruby.version=#{VERSION_RUBY},jruby.version=#{version},ruby.patchlevel=0,ruby.buildplatform=i386-mingw32 #{INSTALL4J_CONFIG_FILE}^ do |ok, result|
2123
$stderr.puts "** Something went wrong: #{result}" unless ok
2224
end
2325
mv Dir[File.join(root_dir, 'install', '*.exe')], File.join(root_dir, RELEASE_DIR)

0 commit comments

Comments
 (0)