Skip to content

Commit 25a9448

Browse files
Add build workflow to test theme for different Ruby and OS versions and architectures
1 parent 626600e commit 25a9448

File tree

3 files changed

+95
-4
lines changed

3 files changed

+95
-4
lines changed

.github/workflows/jekyll-theme.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Test build compatibility of Jekyll theme gems
2+
3+
on:
4+
# Runs on pushes targeting the default branch
5+
push:
6+
branches: ["main"]
7+
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
jobs:
12+
gem_build:
13+
name: "Gem build (Ruby ${{ matrix.ruby }} on ${{ matrix.os }})"
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#choosing-github-hosted-runners
18+
os: [ubuntu-latest, ubuntu-24.04-arm, macos-13, macos-latest, windows-latest]
19+
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
20+
ruby: ['2.7', '3.1', '3.2', '3.3', '3.4']
21+
runs-on: ${{ matrix.os }}
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 1
27+
- name: "Setup Ruby ${{ matrix.ruby }} on ${{ matrix.os }}"
28+
uses: ruby/setup-ruby@v1
29+
with:
30+
ruby-version: ${{ matrix.ruby }}
31+
rubygems: latest
32+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
33+
- name: Build Jekyll
34+
run: bundle exec jekyll build
35+
env:
36+
JEKYLL_ENV: production
37+
- name: Build gem
38+
run: bundle exec gem build *.gemspec
39+
40+
gem_build_jruby:
41+
name: "Gem build (JRuby on ${{ matrix.os }})"
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#choosing-github-hosted-runners
46+
os: [ubuntu-latest, ubuntu-24.04-arm, macos-13, macos-latest, windows-latest]
47+
runs-on: ${{ matrix.os }}
48+
steps:
49+
- name: Checkout
50+
uses: actions/checkout@v4
51+
with:
52+
fetch-depth: 1
53+
- name: "Setup JRuby on ${{ matrix.os }}"
54+
uses: ruby/setup-ruby@v1
55+
with:
56+
ruby-version: jruby
57+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
58+
- name: Build Jekyll
59+
run: bundle exec jekyll build
60+
env:
61+
JEKYLL_ENV: production
62+
- name: Build gem
63+
run: bundle exec gem build *.gemspec
64+
65+
gem_build_windows_11_arm:
66+
name: "Gem build (Ruby ${{ matrix.ruby }} on windows-11-arm)"
67+
strategy:
68+
fail-fast: false
69+
matrix:
70+
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
71+
ruby: ['3.4']
72+
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#choosing-github-hosted-runners
73+
runs-on: windows-11-arm
74+
steps:
75+
- name: Checkout
76+
uses: actions/checkout@v4
77+
with:
78+
fetch-depth: 1
79+
- name: "Setup Ruby ${{ matrix.ruby }} on windows-11-arm"
80+
uses: ruby/setup-ruby@v1
81+
with:
82+
ruby-version: ${{ matrix.ruby }}
83+
rubygems: latest
84+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
85+
- name: Build Jekyll
86+
run: bundle exec jekyll build
87+
env:
88+
JEKYLL_ENV: production
89+
- name: Build gem
90+
run: bundle exec gem build *.gemspec

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ gemspec
1111
#
1212
# This will help ensure the proper Jekyll version is running.
1313
# Happy Jekylling!
14-
gem "jekyll", "~> 4.3"
14+
gem "jekyll", "~> 4.4"
1515
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
1616
# uncomment the line below. To upgrade, run `bundle update github-pages`.
1717
# gem "github-pages", group: :jekyll_plugins
@@ -27,7 +27,7 @@ platforms :windows, :jruby do
2727
end
2828

2929
# Performance-booster for watching directories on Windows
30-
gem "wdm", "~> 0.1.1", :platforms => [:windows]
30+
gem "wdm", "~> 0.2.0", :platforms => [:windows]
3131

3232
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
3333
# do not have a Java counterpart.

jekyll-theme-nixer.gemspec

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Gem::Specification.new do |spec|
44
spec.name = "jekyll-theme-nixer"
5-
spec.version = "1.1.2"
5+
spec.version = "1.1.4"
66
spec.authors = ["Michael Nordmeyer"]
77
spec.email = ["michaelnordmeyer@users.noreply.github.com"]
88

@@ -17,8 +17,9 @@ Gem::Specification.new do |spec|
1717
end
1818

1919
spec.required_ruby_version = '>= 2.7.0' # according to jekyll.gemspec
20+
spec.required_rubygems_version = ">= 3.4.0"
2021

21-
spec.add_runtime_dependency "jekyll", ">= 3.9.3", "< 5.0"
22+
spec.add_runtime_dependency "jekyll", ">= 3.10.0", "< 5.0"
2223
spec.add_runtime_dependency "jekyll-include-cache", "~> 0.2"
2324
spec.add_runtime_dependency "jekyll-redirect-from", "~> 0.16"
2425
spec.add_runtime_dependency "jekyll-sitemap", "~> 1.4"

0 commit comments

Comments
 (0)