Repository navigation
91 lines (78 loc) · 3.76 KB
/
Copy pathci.yml
File metadata and controls
91 lines (78 loc) · 3.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: CI
on:
push:
branches:
- master
- '*-dev'
- '*-feature'
- '*-fix'
pull_request:
jobs:
ci:
name: ${{ matrix.task }} ${{ matrix.ruby-version }} / java ${{ matrix.java-version }} / jruby-rack ${{ matrix.jruby-rack-version }}
runs-on: ubuntu-latest
strategy:
matrix:
task: [spec, integration]
ruby-version: [jruby-9.4, jruby-10.0, jruby-10.1]
java-version: [8, 17, 21, 25]
jruby-rack-version: ['1.2', '1.3', '2.0']
exclude:
- ruby-version: jruby-10.0 # JRuby 10 requires Java 21 minimum
java-version: 8
- ruby-version: jruby-10.1 # JRuby 10 requires Java 21 minimum
java-version: 8
- ruby-version: jruby-10.0 # JRuby 10 requires Java 21 minimum
java-version: 17
- ruby-version: jruby-10.1 # JRuby 10 requires Java 21 minimum
java-version: 17
- task: 'integration' # War integration tests require Java 17
java-version: 8
- jruby-rack-version: '1.3' # No need to vary jruby-rack version for non-integration
task: spec
- jruby-rack-version: '2.0' # No need to vary jruby-rack version for non-integration
task: spec
- jruby-rack-version: '1.3' # JRuby-Rack 1.3+ requires JRuby 10
ruby-version: jruby-9.4
- jruby-rack-version: '2.0' # JRuby-Rack 1.3+ requires JRuby 10
ruby-version: jruby-9.4
fail-fast: false
env:
JRUBY_OPTS: --dev # speed up all those subprocesses
BUNDLE_JOBS: "1" # serial installs: parallel installs race the jar-dependencies post-install hook needed by psych: see https://github.com/ruby/rubygems/issues/9386
BUNDLE_GLOBAL_GEM_CACHE: "true" # keep downloaded .gem archives in ~/.bundle/cache so they can be cached across runs
steps:
- name: checkout
uses: actions/checkout@v7
- name: Set up java ${{ matrix.java-version }}
uses: actions/setup-java@v6
with:
distribution: temurin
java-version: ${{ matrix.java-version }}
- name: Set up ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Remove jruby-launcher # not sure where this is coming from but causes some specs to fail
run: gem uninstall -a jruby-launcher
- name: Set up dependency cache
uses: actions/cache@v6
with:
# ~/.m2/repository: maven artifacts - vary by jruby version (jruby-complete),
# jruby-rack series (jetty ee8 vs ee11) and task (integration resolves more).
# ~/.bundle/cache: bundler's global gem cache (BUNDLE_GLOBAL_GEM_CACHE above)
# of downloaded .gem archives - avoids re-downloads while gems still install
# into the system gem home the specs require.
path: |
~/.m2/repository
~/.bundle/cache
key: deps-${{ runner.os }}-${{ matrix.ruby-version }}-rack${{ matrix.jruby-rack-version }}-${{ matrix.task }}-${{ hashFiles('warbler.gemspec', '**/Gemfile*', '**/pom.xml') }}
restore-keys: |
deps-${{ runner.os }}-${{ matrix.ruby-version }}-rack${{ matrix.jruby-rack-version }}-${{ matrix.task }}-
deps-${{ runner.os }}-${{ matrix.ruby-version }}-rack${{ matrix.jruby-rack-version }}-
deps-${{ runner.os }}-${{ matrix.ruby-version }}-
deps-${{ runner.os }}-
- name: Install dependencies
run: bundle install # Manage our own cache, as some specs need a clean bundler environment which setup-ruby would dirty
- name: Run tests
run: bundle exec rake ${{ matrix.task }} "JRUBY_RACK_VERSION=${{ matrix.jruby-rack-version }}"