-
Notifications
You must be signed in to change notification settings - Fork 188
92 lines (90 loc) · 2.6 KB
/
ci.yml
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
92
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- '*'
jobs:
build_ruby:
strategy:
matrix:
os: [ubuntu-22.04]
ruby: ['2.7', '3.0']
include:
- os: ubuntu-22.04
ruby: truffleruby-22.3.1
- os: ubuntu-22.04
ruby: jruby-9.4.2.0
- os: macos-latest
ruby: '2.7'
- os: ubuntu-22.04
ruby: '2.7'
- os: windows-latest
ruby: '2.7'
runs-on: ${{ matrix.os }}
env:
JRUBY_OPTS: '-J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Xss2m -Xcompile.invokedynamic=false'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Configure Nokogiri installation (Linux)
if: matrix.os == 'ubuntu-22.04'
run: |
bundle config --local build__nokogiri --use-system-libraries
sudo apt-get install libxslt1-dev
- name: Configure Nokogiri installation (macOS)
if: matrix.os == 'macos-latest'
run: bundle config --local build__nokogiri --use-system-libraries
- name: Set JRUBY_OPTS
if: matrix.jruby-opts
run: echo 'JRUBY_OPTS=${{ matrix.jruby-opts }}' >> $GITHUB_ENV
- name: Install dependencies
run: bundle --jobs 3 --retry 3
- name: Build
run: bundle exec rake build
- name: Run tests
run: bundle exec rake test
- name: Run examples:convert
run: bundle exec rake examples:convert
build_js:
strategy:
matrix:
os: [ubuntu-22.04]
node-version: ['16', '18']
include:
- os: macos-latest
node-version: '16'
- os: windows-latest
node-version: '16'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
- name: Configure Nokogiri installation (Linux)
if: matrix.os == 'ubuntu-22.04'
run: |
bundle config --local build__nokogiri --use-system-libraries
sudo apt-get install libxslt1-dev
- name: Install dependencies
run: |
bundle --jobs 3 --retry 3
npm ci
- name: Build
run: bundle exec rake build:js
- name: Run examples and tests
run: |
npm run examples
npm test