-
Notifications
You must be signed in to change notification settings - Fork 100
58 lines (55 loc) · 1.87 KB
/
Copy pathmain.yml
File metadata and controls
58 lines (55 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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: 15
env:
# Released Bundler is broken on ruby-head due to ruby/ruby#16895.
# Use Ruby's bundled Bundler until rubygems/rubygems#9529 is released.
BUNDLER_VERSION: ${{ case(matrix.ruby == 'head', '0', '') }}
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
id: ruby
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') }}
# Saved by the benchmark workflow on master; a cache saved here would only
# be visible to re-runs of the same pull request.
- uses: actions/cache/restore@v6
with:
path: |
tmp/benchmark/bundle
~/.cache/rbs
key: benchmark-${{ steps.ruby.outputs.ruby-prefix }}-${{ hashFiles('tool/benchmark.rb', 'tool/benchmark/project.rb') }}
if: ${{ matrix.ruby == needs.ruby-versions.outputs.latest && github.event_name == 'pull_request' }}
- name: Run TypeProf against real-world projects
run: |
bundle exec ruby tool/benchmark.rb
if: ${{ matrix.ruby == needs.ruby-versions.outputs.latest && github.event_name == 'pull_request' }}