Skip to content

Do not override @orig_env #9179

Do not override @orig_env

Do not override @orig_env #9179

Workflow file for this run

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: ${{matrix.target}} under a ruby-core setup
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
target: [Rubygems, Bundler]
steps:
- name: Set up latest ruby head
uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
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: |
./autogen.sh
./configure -C --disable-install-doc
make -j2
working-directory: ruby/ruby
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
path: rubygems/rubygems
- name: Sync tools
run: |
ruby tool/sync_default_gems.rb rubygems
working-directory: ruby/ruby
- name: Test RubyGems
run: make -j2 -s test-all TESTS="rubygems --no-retry"
working-directory: ruby/ruby
if: matrix.target == 'Rubygems'
- name: Test Bundler
run: |
git add .
make test-bundler-parallel
working-directory: ruby/ruby
if: matrix.target == 'Bundler'