From 7b92381ce462ff33c52c0ed63c8e98d21792e01a Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Wed, 10 Jul 2024 09:30:38 -0700 Subject: [PATCH] Add a macOS CI test for --enable-static --- .github/workflows/macos.yml | 9 +++++++-- Rakefile | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index a4a680c..888aeb2 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -11,6 +11,11 @@ jobs: matrix: os: [macos] ruby: [ '3.2', '3.3' ] + compile_opt: [""] + include: + - os: "macos" + ruby: "3.3" + compile_opt: "ENABLE_STATIC=1" steps: - name: icu4c @@ -23,5 +28,5 @@ jobs: - name: Install dependencies run: bundle install - - name: Run tests ${{ matrix.rubyopt }} - run: bundle exec rake RUBYOPT="${{ matrix.rubyopt }}" + - name: "Run tests with compile_opt: ${{ matrix.compile_opt }}, rubyopt: ${{ matrix.rubyopt }}" + run: bundle exec ${{ matrix.compile_opt }} rake RUBYOPT="${{ matrix.rubyopt }}" diff --git a/Rakefile b/Rakefile index e943d79..7c16222 100644 --- a/Rakefile +++ b/Rakefile @@ -11,6 +11,7 @@ require "rake/extensiontask" Rake::ExtensionTask.new 'charlock_holmes' do |ext| ext.lib_dir = File.join 'lib', 'charlock_holmes' + ext.config_options << '--enable-static' if ENV['ENABLE_STATIC'] end -Rake::Task[:test].prerequisites << :compile \ No newline at end of file +Rake::Task[:test].prerequisites << :compile