-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.25 KB
/
ubuntu.yml
File metadata and controls
44 lines (42 loc) · 1.25 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
name: ubuntu
on: [push, pull_request]
jobs:
build:
name: ${{ matrix.os }} ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-18.04
ruby: [ '2.6', '2.7', '3.0', '3.1', 'debug', 'head', 'jruby-head' ]
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Compile
run: bundle exec rake compile
- name: Build gem
run: bundle exec rake build
- uses: actions/upload-artifact@v3
if: >-
matrix.os == 'ubuntu-20.04' &&
(matrix.ruby == '3.1' || matrix.ruby == 'jruby-head')
with:
name: gem-${{ matrix.os }}-${{ matrix.ruby }}
path: pkg/
- uses: softprops/action-gh-release@v1
if: >-
startsWith(github.ref, 'refs/tags/') &&
matrix.os == 'ubuntu-20.04' &&
(matrix.ruby == '3.1' || matrix.ruby == 'jruby-head')
with:
files: |
pkg/*.gem
- name: Run test
run: bundle exec rake
continue-on-error: ${{ startsWith(matrix.ruby, 'jruby') }}