Common: lint mruby and fix Ruby CI

This commit is contained in:
Alex Kotov 2022-02-10 01:03:06 +05:00
parent 53d11060a3
commit c485d94d86
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
4 changed files with 14 additions and 4 deletions

View File

@ -50,7 +50,7 @@ ruby_freebsd_task:
- sudo make install
ruby_build_script:
- cd pkgs/ruby
- bundle install
- ./bin/setup
- bundle exec rake compile
ruby_test_script:
- cd pkgs/ruby

View File

@ -13,6 +13,9 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
- name: dependencies
run: sudo apt-get --yes install cppcheck rake
- name: autogen
@ -26,6 +29,12 @@ jobs:
- working-directory: vendor/mruby
name: test
run: MRUBY_CONFIG=../../pkgs/mruby/build_config.rb rake test
- working-directory: pkgs/mruby
name: setup
run: ./bin/setup
- working-directory: pkgs/mruby
name: lint
run: rake
- working-directory: pkgs/mruby
name: cppcheck
run: cppcheck --quiet --error-exitcode=1 --std=c99 --enable=warning,style,performance,portability .

View File

@ -25,8 +25,8 @@ jobs:
- name: install
run: sudo make install
- working-directory: pkgs/ruby
name: bundle
run: bundle install
name: setup
run: ./bin/setup
- working-directory: pkgs/ruby
name: compile
run: rake compile

View File

@ -3,7 +3,8 @@ require:
- rubocop-rake
AllCops:
TargetRubyVersion: 3.0
# TODO: Explore which exact syntax version mruby is compatible with
TargetRubyVersion: 2.7
DisplayCopNames: true
NewCops: enable