diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..90075d2 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,35 @@ +name: CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + test-linux: + runs-on: ubuntu-latest + timeout-minutes: 10 + + strategy: + matrix: + ruby-version: ['3.0', '3.1', '3.2'] + + name: Linux, Ruby ${{ matrix.ruby-version }} + steps: + - name: Start Cassandra v4 + run: | + docker run --name cassandra -d -p 9042:9042 cassandra:4 + - uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Prepare tests + run: bundle exec rake compile + - name: Run tests + run: bundle exec rake test diff --git a/ext/ilios/extconf.rb b/ext/ilios/extconf.rb index ba51fdb..67653bc 100644 --- a/ext/ilios/extconf.rb +++ b/ext/ilios/extconf.rb @@ -25,7 +25,7 @@ def configure_prefix end end - libuv_recipe = LibuvRecipe.new('libuv', Ilios::LIBUV_VERSION, make_command: 'make -j') + libuv_recipe = LibuvRecipe.new('libuv', Ilios::LIBUV_VERSION, make_command: 'make -j 3') libuv_recipe.files << { url: "https://github.com/libuv/libuv/archive/v#{Ilios::LIBUV_VERSION}.tar.gz" } @@ -53,7 +53,7 @@ def configure_prefix end end - cassandra_recipe = CassandraRecipe.new('cpp-driver', Ilios::CASSANDRA_CPP_DRIVER_VERSION, make_command: 'make -j') + cassandra_recipe = CassandraRecipe.new('cpp-driver', Ilios::CASSANDRA_CPP_DRIVER_VERSION, make_command: 'make -j 3') cassandra_recipe.files << { url: "https://github.com/datastax/cpp-driver/archive/#{Ilios::CASSANDRA_CPP_DRIVER_VERSION}.tar.gz" }