name: Test on: push: branches: - master pull_request: jobs: test: name: Test on ruby ${{ matrix.ruby_version }} and rails ${{ matrix.rails_version }} runs-on: ${{ matrix.os }} strategy: matrix: rails_version: [0, 4.2, 5.2, 6.0] ruby_version: [2.3, 2.4, 2.5, 2.6, 2.7, jruby, head] os: [ubuntu-latest] include: - ruby_version: head rails_version: 0 - ruby_version: 2.7 rails_version: 6.0 env: RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal" exclude: - ruby_version: 2.3 rails_version: 6.0 - ruby_version: 2.4 rails_version: 6.0 - ruby_version: 2.7 rails_version: 4.2 - ruby_version: head rails_version: 4.2 - ruby_version: head rails_version: 5.2 - ruby_version: head rails_version: 6.0 steps: - uses: actions/checkout@v1 - name: Set up Ruby ${{ matrix.ruby_version }} uses: ruby/setup-ruby@v1 with: bundler: 1 ruby-version: ${{ matrix.ruby_version }} - name: Build with Rails ${{ matrix.rails_version }} env: RAILS_VERSION: ${{ matrix.rails_version }} run: | bundle install --jobs 4 --retry 3 bundle exec rake compare_allocation: name: Compare memory allocation with ${{ matrix.ruby_version }} and rails ${{ matrix.rails_version }} runs-on: ${{ matrix.os }} needs: test env: RAILS_VERSION: ${{ matrix.rails_version }} strategy: matrix: rails_version: [5.2, 6.0] ruby_version: [2.6, 2.7] os: [ubuntu-latest] steps: - name: Set up Ruby ${{ matrix.ruby_version }} uses: ruby/setup-ruby@v1 with: bundler: 1 ruby-version: ${{ matrix.ruby_version }} - uses: actions/checkout@v2 with: ref: master - name: Build and run allocation report on master run: | bundle install --jobs 4 --retry 3 bundle exec ruby benchmarks/allocation_comparison.rb - uses: actions/checkout@v1 - name: Rebuild on the branch run: | bundle install --jobs 4 --retry 3 - name: Run allocation report on the branch run: | bundle exec ruby benchmarks/allocation_comparison.rb