Add a benchmark workflow for real-world projects #1459
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Ruby | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| schedule: | |
| # # This job runs at 00:00 on Friday. | |
| - cron: '0 15 * * 5' | |
| jobs: | |
| ruby-versions: | |
| uses: ruby/actions/.github/workflows/ruby_versions.yml@master | |
| with: | |
| engine: cruby-truffleruby | |
| min_version: 3.3 | |
| build: | |
| needs: ruby-versions | |
| name: build (${{ matrix.ruby }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }} | |
| include: | |
| - ruby: "3.3" | |
| rubyopt: "--enable-frozen-string-literal" | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| - name: Run the test suite | |
| run: | | |
| bundle exec rake TESTOPT=-v RUBYOPT="${{ matrix.rubyopt }}" | |
| if: ${{ !startsWith(matrix.ruby, 'truffle') }} | |
| - name: Run the typeprof benchmark | |
| run: bundle exec ruby tool/benchmarks/typeprof.rb | |
| if: ${{ !startsWith(matrix.ruby, 'truffle') }} | |
| - name: Run the optcarrot benchmark | |
| run: bundle exec ruby tool/benchmarks/optcarrot.rb | |
| if: ${{ !startsWith(matrix.ruby, 'truffle') }} | |
| - name: Run the redmine benchmark | |
| run: bundle exec ruby tool/benchmarks/redmine.rb | |
| if: ${{ !startsWith(matrix.ruby, 'truffle') }} |