diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..642aa07 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,36 @@ +name: Ruby + +on: + push: + branches: + - main + + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + name: Ruby ${{ matrix.ruby }} + strategy: + matrix: + ruby: + - '2.7.8' + - '3.3.8' + + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - name: bundle + run: bundle install + - name: compile + run: | + cd ext/inchi-gem/ + ruby extconf.rb && make + - name: test + run: bundle exec rake diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9cd31e4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +*.gem +.bundle +Gemfile.lock +pkg/* + +# ignore build artifacts +ext/inchi-gem/Makefile +ext/inchi-gem/inchi/ +ext/inchi-gem/inchi.o +ext/inchi-gem/inchi_wrap.* + + +.tool-versions diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..60371b6 --- /dev/null +++ b/Gemfile @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +source "https://rubygems.org" + +gemspec + +gem "rake", "~> 13.0" + +gem "test-unit", "~> 3.0" + +gem "rubocop", "~> 1.21"