-
-
Notifications
You must be signed in to change notification settings - Fork 902
213 lines (206 loc) · 6.55 KB
/
upstream.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
name: upstream
concurrency:
group: "${{github.workflow}}-${{github.ref}}"
cancel-in-progress: true
on:
workflow_dispatch:
schedule:
- cron: "0 8 * * 1,3,5" # At 08:00 on Monday, Wednesday, and Friday # https://crontab.guru/#0_8_*_*_1,3,5
pull_request:
types: [opened, synchronize]
branches:
- '*'
paths:
- .github/workflows/upstream.yml # this file
jobs:
xmlsoft-head:
strategy:
fail-fast: false
matrix:
plat: ["ubuntu", "windows", "macos"]
runs-on: ${{matrix.plat}}-latest
steps:
- name: configure git crlf
if: matrix.plat == 'windows'
run: |
git config --system core.autocrlf false
git config --system core.eol lf
- uses: actions/checkout@v4
with:
submodules: true
- uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: "3.3"
apt-get: "autogen libtool shtool"
brew: "automake autogen libtool shtool"
mingw: "autotools xz"
bundler-cache: true
bundler: latest
- name: Setup libxml2
env:
NOCONFIGURE: t
shell: bash
run: |
git clone --depth=1 https://gitlab.gnome.org/GNOME/libxml2
cd libxml2
git log -n1
./autogen.sh
- name: Setup libxslt
env:
NOCONFIGURE: t
shell: bash
run: |
git clone --depth=1 https://gitlab.gnome.org/GNOME/libxslt
cd libxslt
git log -n1
./autogen.sh
- name: "Compile against libxml2 and libxslt source directories"
shell: bash
run: "bundle exec rake compile -- --with-xml2-source-dir=${GITHUB_WORKSPACE}/libxml2 --with-xslt-source-dir=${GITHUB_WORKSPACE}/libxslt"
- run: "bundle exec rake test"
xmlsoft-head-valgrind:
runs-on: ubuntu-latest
container:
image: ghcr.io/sparklemotion/nokogiri-test:mri-3.3
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup libxml2
env:
NOCONFIGURE: t
run: |
git clone --depth=1 https://gitlab.gnome.org/GNOME/libxml2
cd libxml2
git log -n1
./autogen.sh
- name: Setup libxslt
env:
NOCONFIGURE: t
run: |
git clone --depth=1 https://gitlab.gnome.org/GNOME/libxslt
cd libxslt
git log -n1
./autogen.sh
- name: "Run bundle install"
run: "bundle install --local || bundle install"
- name: "Compile against libxml2 and libxslt source directories"
run: "bundle exec rake compile -- --with-xml2-source-dir=${GITHUB_WORKSPACE}/libxml2 --with-xslt-source-dir=${GITHUB_WORKSPACE}/libxslt"
- run: "bundle exec rake test:valgrind"
- run: "bundle exec rake test:memcheck"
ruby-head:
strategy:
fail-fast: false
matrix:
plat: ["ubuntu", "windows", "macos"]
sys: ["enable", "disable"]
runs-on: ${{matrix.plat}}-latest
steps:
- name: configure git crlf
if: matrix.plat == 'windows'
run: |
git config --system core.autocrlf false
git config --system core.eol lf
- uses: actions/checkout@v4
with:
submodules: true
- uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: "head"
apt-get: "libxml2-dev libxslt1-dev pkg-config"
mingw: "_upgrade_ libxml2 libxslt pkgconf"
bundler-cache: true
bundler: latest
- uses: actions/cache@v4
if: matrix.sys == 'disable'
with:
path: ports
key: ports-${{matrix.plat}}-${{hashFiles('dependencies.yml', 'patches/**/*.patch', 'ext/nokogiri/extconf.rb')}}
- run: bundle exec rake compile -- --${{matrix.sys}}-system-libraries
- run: bundle exec rake test
ruby-head-valgrind:
strategy:
fail-fast: false
matrix:
sys: ["disable"]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: "head"
apt-get: "libxml2-dev libxslt1-dev pkg-config valgrind"
bundler-cache: true
bundler: latest
- uses: actions/cache@v4
if: matrix.sys == 'disable'
with:
path: ports
key: ports-ubuntu-head-${{hashFiles('dependencies.yml', 'patches/**/*.patch', 'ext/nokogiri/extconf.rb')}}
- run: bundle exec rake compile -- --${{matrix.sys}}-system-libraries
- run: bundle exec rake test:valgrind
- run: bundle exec rake test:memcheck
truffleruby-head:
strategy:
fail-fast: false
matrix:
flags:
- "--disable-system-libraries --disable-static"
- "--disable-system-libraries --enable-static"
- "--enable-system-libraries"
include:
- flags: "--enable-system-libraries"
apt_packages: "libxml2-dev libxslt1-dev pkg-config"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: truffleruby-head
bundler-cache: true
bundler: 2.5.10
apt-get: ${{ matrix.apt_packages }}
- uses: actions/cache@v4
with:
path: ports/archives
key: tarballs-ubuntu-${{hashFiles('dependencies.yml', 'patches/**/*.patch')}}
- run: bundle exec rake compile -- ${{matrix.flags}}
- run: bundle exec rake test
jruby-head:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ruby/setup-ruby@v1
with:
ruby-version: "jruby-head"
bundler-cache: true
bundler: latest
- run: bundle exec rake compile
- run: bundle exec rake test
html5lib-tests:
runs-on: ubuntu-latest
container:
image: ghcr.io/sparklemotion/nokogiri-test:mri-3.3
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/cache@v4
with:
path: ports
key: ports-ubuntu-3.3-${{hashFiles('dependencies.yml', 'patches/**/*.patch', 'ext/nokogiri/extconf.rb')}}
- name: Update html5lib-tests
run: |
cd test/html5lib-tests
git remote update origin
git checkout origin/master
git log --pretty=oneline -n1
- run: bundle install --local || bundle install
- run: bundle exec rake compile -- --disable-system-libraries
- run: bundle exec rake test