Replace NewParser with Parser #4 #485
Workflow file for this run
This file contains 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: test | |
on: | |
push: | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: ['head', '3.2', '3.1', '3.0', '2.7', '2.6', '2.5'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- run: bundle install | |
- run: bundle exec rspec | |
test-windows: | |
runs-on: windows-2022 | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: ['head'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- run: bundle install | |
- run: bundle exec rspec | |
check-misc: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
ruby: ['head'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- run: bundle install | |
# Copy from https://github.com/ruby/ruby/blob/089227e94823542acfdafa68541d330eee42ffea/.github/workflows/check_misc.yml#L27 | |
- name: Check for trailing spaces | |
run: | | |
git grep -I -n '[ ]$' -- '*.rb' '*.[chy]' '*.rs' ':!spec/' && exit 1 || : | |
git grep -n '^[ ][ ]*$' -- '*.md' && exit 1 || : | |
- name: Check for parser.rb is up to date | |
run: | | |
bundle exec rake build:racc_parser | |
git diff --color --no-ext-diff --ignore-submodules --exit-code lib/lrama/new_parser.rb | |
steep-check: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: ['head'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- run: bundle install | |
- run: bundle exec rbs collection install | |
- run: bundle exec steep check | |
test-ruby: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
baseruby: ['3.0'] | |
ruby_branch: ['master'] | |
defaults: | |
run: | |
working-directory: ../ruby/build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.baseruby }} | |
bundler-cache: true | |
- run: git clone --depth=1 https://github.com/ruby/ruby.git -b ${{ matrix.ruby_branch }} ../ruby | |
working-directory: | |
- run: mkdir -p tool/lrama | |
working-directory: ../ruby | |
- name: Copy Lrama to ruby/tool | |
run: cp -r LEGAL.md MIT exe lib template ../ruby/tool/lrama | |
working-directory: | |
- run: tree tool/lrama | |
working-directory: ../ruby | |
# See also https://github.com/ruby/ruby/blob/master/.github/workflows/ubuntu.yml | |
- run: mkdir build | |
working-directory: ../ruby | |
- name: Set ENV | |
run: | | |
echo "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV | |
- name: Install libraries | |
run: | | |
set -x | |
arch=${arch:+:${arch/i[3-6]86/i386}} | |
${arch:+sudo dpkg --add-architecture ${arch#:}} | |
sudo apt-get update -q || : | |
sudo apt-get install --no-install-recommends -q -y \ | |
${arch:+cross}build-essential${arch/:/-} \ | |
libssl-dev${arch} libyaml-dev${arch} libreadline6-dev${arch} \ | |
zlib1g-dev${arch} libncurses5-dev${arch} libffi-dev${arch} \ | |
autoconf | |
sudo apt-get install -q -y pkg-config${arch} || : | |
- run: sudo apt-get --purge remove bison | |
- run: ../autogen.sh | |
- run: ../configure -C --disable-install-doc | |
- run: make | |
- run: make test-all |