Skip to content

Commit

Permalink
Add workflow for testing IRB against Ruby core (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
st0012 authored Dec 5, 2022
1 parent 39c6924 commit 8d91bbf
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/ruby-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: ruby-core

on:
pull_request:

push:
branches:
- master

concurrency:
group: ci-${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

permissions: # added using https://github.com/step-security/secure-workflows
contents: read

jobs:
ruby_core:
name: IRB under a ruby-core setup
runs-on: ubuntu-20.04
strategy:
fail-fast: false
steps:
- name: Set up latest ruby head
uses: ruby/setup-ruby@de6f5b9c340068d049670c6b6ae8dc94cff4667a # v1.125.0
with:
ruby-version: head
bundler: none
- name: Save latest buildable revision to environment
run: echo "REF=$(ruby -v | cut -d')' -f1 | cut -d' ' -f5)" >> $GITHUB_ENV
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
with:
repository: ruby/ruby
path: ruby/ruby
fetch-depth: 10
- name: Checkout the latest buildable revision
run: git switch -c ${{ env.REF }}
working-directory: ruby/ruby
- name: Install libraries
run: |
set -x
sudo apt-get update -q || :
sudo apt-get install --no-install-recommends -q -y build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm-dev bison autoconf ruby
- name: Build Ruby
run: |
autoconf
./configure -C --disable-install-doc
make -j2
working-directory: ruby/ruby
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
with:
path: ruby/irb
- name: Sync tools
run: |
ruby tool/sync_default_gems.rb irb
working-directory: ruby/ruby
- name: Test IRB
run: make -j2 -s test-all TESTS="irb --no-retry"
working-directory: ruby/ruby

0 comments on commit 8d91bbf

Please sign in to comment.