-
Notifications
You must be signed in to change notification settings - Fork 216
82 lines (80 loc) · 2.33 KB
/
ruby.yml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Ruby
on:
push:
branches:
- master
pull_request: {}
merge_group: {}
jobs:
test:
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
ruby: ['3.1', '3.2', '3.3', head]
rubyopt: [""]
job:
- test
include:
- ruby: head
job: stdlib_test rubocop
- ruby: "3.3"
job: stdlib_test
- ruby: "3.3"
job: test
rubyopt: "--enable-frozen-string-literal"
- ruby: "3.3"
job: stdlib_test
rubyopt: "--enable-frozen-string-literal"
- ruby: "3.3"
job: lexer compile confirm_lexer
- ruby: "3.3"
job: rubocop validate test_doc build test_generate_stdlib raap
- ruby: "3.3"
job: typecheck_test
env:
RANDOMIZE_STDLIB_TEST_ORDER: "true"
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler: none
- name: Set working directory as safe
run: git config --global --add safe.directory $(pwd)
- name: Set up permission
run: chmod -R o-w /opt/hostedtoolcache/Ruby
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libdb-dev curl autoconf automake m4 libtool python3
- name: Install Re2c
if: ${{ contains(matrix.job, 'lexer') }}
run: |
cd /tmp
curl -L https://github.com/skvadrik/re2c/archive/refs/tags/3.1.tar.gz > re2c-3.1.tar.gz
tar xf re2c-3.1.tar.gz
cd re2c-3.1
autoreconf -i -W all
./configure
make
sudo make install
- name: Update rubygems & bundler
run: |
ruby -v
gem update --system
- name: bundle config set with
run: |
echo "NO_MINITEST=true" >> $GITHUB_ENV
bundle config set --local without 'minitest'
if: ${{ contains(matrix.ruby, 'head') }}
- name: Skip installing type checkers
if: ${{ ! contains(matrix.job, 'typecheck_test') }}
run: |
bundle config set without 'typecheck_test'
- name: bin/setup
run: |
bin/setup
- name: Run test
run: |
bundle exec rake ${{ matrix.job }}