Skip to content

Commit c1ee0e0

Browse files
authored
Use append_cflags instead of modifying CFLAGS directly (#45)
* Use append_cflags to add compiler flags * Update rubocop and rubocop-packaging gems * Update CI workflow to test on latest Ruby versions * Remove EOL versions of Ruby/JRuby, add recent JRubies to CI test matrix * Set minimum Ruby version to 3.0 * README updates * Exclude testing on JRuby 10.0.0 on Windows
1 parent 4ab4663 commit c1ee0e0

6 files changed

Lines changed: 31 additions & 16 deletions

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,31 @@ name: CI
22

33
on:
44
push:
5-
branches: main
5+
branches: [main]
66

77
pull_request:
8-
branches: main
8+
branches: [main]
99

1010
jobs:
1111
test:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
ruby: [ ruby-2.4, ruby-2.5, ruby-2.6, ruby-2.7, ruby-3.0, ruby-3.1, ruby-3.2, jruby-9.2.19, jruby-9.3.0, truffleruby ]
16-
os: [ ubuntu-latest, windows-latest ]
15+
ruby:
16+
[
17+
ruby-3.0,
18+
ruby-3.1,
19+
ruby-3.2,
20+
ruby-3.3,
21+
ruby-3.4,
22+
jruby-9.4.12,
23+
jruby-10.0.0,
24+
truffleruby,
25+
]
26+
os: [ubuntu-latest, windows-latest]
1727
exclude:
1828
- { ruby: truffleruby, os: windows-latest }
29+
- { ruby: jruby-10.0.0, os: windows-latest }
1930

2031
runs-on: ${{ matrix.os }}
2132

@@ -47,8 +58,8 @@ jobs:
4758

4859
- uses: ruby/setup-ruby@v1
4960
with:
50-
ruby-version: 2.4
51-
bundler: 2.3.26
61+
ruby-version: 3.0
62+
bundler: 2.5.23
5263

5364
- uses: actions/cache@v3
5465
with:

.rubocop.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
require:
1+
plugins:
22
- rubocop-packaging
33

44
AllCops:
5-
TargetRubyVersion: 2.4
5+
TargetRubyVersion: 3.0
66
DisplayCopNames: true
77
NewCops: enable
88

@@ -13,6 +13,12 @@ AllCops:
1313
Gemspec/DuplicatedAssignment:
1414
Enabled: false
1515

16+
Gemspec/DevelopmentDependencies:
17+
Enabled: false
18+
19+
Gemspec/RequireMFA:
20+
Enabled: false
21+
1622
#
1723
# Layout
1824
#

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ group :development, :test do
99
gem "rake", require: false
1010
gem "rake-compiler", "~> 1.0", require: false
1111
gem "rspec", "~> 3.7", require: false
12-
gem "rubocop", "~> 1.12.1", require: false
13-
gem "rubocop-packaging", "~> 0.5.1", require: false
12+
gem "rubocop", "~> 1.75.4", require: false
13+
gem "rubocop-packaging", "~> 0.6.0", require: false
1414
end

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ Have questions? Want to suggest a feature or change? Join a discussion group:
7777

7878
**ed25519.rb** is supported on and tested against the following platforms:
7979

80-
* MRI 2.4, 2.5, 2.6, 2.7, 3.0
81-
* JRuby 9.2.19, 9.3.0
80+
- MRI 3.0, 3.1, 3.2, 3.3, 3.4
81+
- JRuby 9.4.12, 10.0.0
8282

8383
## Installation
8484

ed25519.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ Gem::Specification.new do |spec|
2727
spec.extensions = ["ext/ed25519_ref10/extconf.rb"]
2828
end
2929

30-
spec.required_ruby_version = ">= 2.4.0"
30+
spec.required_ruby_version = ">= 3.0"
3131
spec.add_development_dependency "bundler"
3232
end

ext/ed25519_ref10/extconf.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
require "mkmf"
44

5-
# rubocop:disable Style/GlobalVars
6-
$CFLAGS << " -Wall -O3 -pedantic -std=c99"
7-
# rubocop:enable Style/GlobalVars
5+
append_cflags(["-Wall", "-O3", "-pedantic", "-std=c99"])
86

97
create_makefile "ed25519_ref10"

0 commit comments

Comments
 (0)