Skip to content

Commit a98c556

Browse files
committed
Build gems on each push
1 parent 7bc01cf commit a98c556

1 file changed

Lines changed: 45 additions & 5 deletions

File tree

.github/workflows/ruby.yml

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@
77

88
name: Ruby
99

10-
on:
11-
push:
12-
branches: [ master, 72-stable ]
13-
pull_request:
14-
branches: [ master, 72-stable ]
10+
on: [push, pull_request]
1511

1612
permissions:
1713
contents: read
@@ -336,3 +332,47 @@ jobs:
336332
- name: Run tests
337333
run: |
338334
bundle exec rake ${{ matrix.test_targets }}
335+
336+
build-gems:
337+
338+
name: Build ActiveRecord-JDBC gems
339+
runs-on: ubuntu-latest
340+
341+
env:
342+
JRUBY_OPTS: "-J-Xms64M -J-Xmx1024M --dev"
343+
344+
steps:
345+
- uses: actions/checkout@v4
346+
- name: Set up Java 21
347+
uses: actions/setup-java@v4
348+
with:
349+
distribution: 'temurin'
350+
java-version: '21'
351+
- name: Set up Ruby
352+
uses: ruby/setup-ruby@v1
353+
with:
354+
ruby-version: jruby-10.1
355+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
356+
- name: Build
357+
run: |
358+
rake build:adapters
359+
- name: cache main adapter gem
360+
uses: actions/upload-artifact@v7
361+
with:
362+
path: pkg/activerecord-jdbc-adapter*.gem
363+
archive: false
364+
- name: cache sqlite3 adapter gem
365+
uses: actions/upload-artifact@v7
366+
with:
367+
path: pkg/activerecord-jdbcsqlite3-adapter*.gem
368+
archive: false
369+
- name: cache mysql adapter gem
370+
uses: actions/upload-artifact@v7
371+
with:
372+
path: pkg/activerecord-jdbcmysql-adapter*.gem
373+
archive: false
374+
- name: cache postgresql adapter gem
375+
uses: actions/upload-artifact@v7
376+
with:
377+
path: pkg/activerecord-jdbcpostgresql-adapter*.gem
378+
archive: false

0 commit comments

Comments
 (0)