Skip to content

Commit 42744f6

Browse files
committed
Add a CI step with simd disabled
1 parent e3ba02a commit 42744f6

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/ci.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
2727
include:
2828
- { os: ubuntu-24.04-arm, ruby: 3.4 }
29+
- { os: ubuntu-latest , ruby: 3.4, env: "JSON_DISABLE_SIMD=1" }
2930
- { os: macos-13, ruby: 3.4 }
3031
- { os: windows-latest , ruby: mswin } # ruby/ruby windows CI
3132
- { os: ubuntu-latest , ruby: jruby-9.4 } # Ruby 3.1
@@ -49,9 +50,9 @@ jobs:
4950
bundle config --without benchmark
5051
bundle install
5152
52-
- run: rake compile
53+
- run: rake compile ${{ matrix.env }}
5354

54-
- run: rake test JSON_COMPACT=1
55+
- run: rake test JSON_COMPACT=1 ${{ matrix.env }}
5556

5657
- run: rake build
5758

ext/json/ext/generator/extconf.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
append_cflags("-std=c99")
88
$defs << "-DJSON_GENERATOR"
99

10-
if enable_config('generator-use-simd', default=true)
10+
if enable_config('generator-use-simd', default=!ENV["JSON_DISABLE_SIMD"])
1111
if RbConfig::CONFIG['host_cpu'] =~ /^(arm.*|aarch64.*)/
1212
# Try to compile a small program using NEON instructions
1313
if have_header('arm_neon.h')
@@ -31,7 +31,7 @@
3131
SRC
3232
$defs.push("-DENABLE_SIMD")
3333
end
34-
34+
3535
have_header('cpuid.h')
3636
end
3737

0 commit comments

Comments
 (0)