Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add versions without --enable-shared for ruby <= 2.3 #3

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,23 +155,28 @@ jobs:
# Ruby <= 2.3 needs OpenSSL 1.0.2 which cannot be installed on Ubuntu 16.04 and macos-latest.
# To workaround that, we use ruby-build which builds its own OpenSSL.
build23:
if: false
if: true
strategy:
fail-fast: false
matrix:
os: [ ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, macos-latest ]
ruby-version: [ "2.1.9" ]
# ruby-version: [ "2.3.0", "2.3.1", "2.3.2", "2.3.3", "2.3.4", "2.3.5", "2.3.6", "2.3.7", "2.3.8" ]
ruby-version: [ "2.1.9", "2.2.10", "2.3.0", "2.3.1", "2.3.2", "2.3.3", "2.3.4", "2.3.5", "2.3.6", "2.3.7", "2.3.8" ]
shared: [1, 0]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set tag name
id: info
run: |
tag=enable-shared
suffix=''
if [ "${{ matrix.shared }}" == "0" ]; then suffix="_noshared"; fi
filename="ruby-${{ matrix.ruby-version}}$suffix-${{ matrix.os }}.tar.gz"
echo "::set-output name=filename::$filename"
echo "::set-output name=tag::$tag"

- name: Check if already built
run: '! curl -s --head --fail https://github.com/ruby/ruby-builder/releases/download/${{ steps.info.outputs.tag }}/ruby-${{ matrix.ruby-version }}-${{ matrix.os }}.tar.gz'
run: '! curl -s --head --fail https://github.com/ruby/ruby-builder/releases/download/${{ steps.info.outputs.tag }}/${{ steps.info.outputs.filename }}'

- name: Clone ruby-build
run: git clone --branch ruby23-openssl-linux https://github.com/eregon/ruby-build.git
Expand All @@ -188,12 +193,16 @@ jobs:
if: startsWith(matrix.os, 'ubuntu')

- name: Build Ruby
run: ruby-build --verbose ${{ matrix.ruby-version }} $HOME/.rubies/ruby-${{ matrix.ruby-version }}
run: |
if [ "${{ matrix.shared }}" = "1" ]; then
export RUBY_CONFIGURE_OPTS="$RUBY_CONFIGURE_OPTS --enable-shared"
fi
ruby-build --verbose ${{ matrix.ruby-version }} $HOME/.rubies/ruby-${{ matrix.ruby-version }}
env:
RUBY_CONFIGURE_OPTS: --enable-shared --disable-install-doc
RUBY_CONFIGURE_OPTS: --disable-install-doc
CPPFLAGS: "-DENABLE_PATH_CHECK=0" # https://github.com/actions/virtual-environments/issues/267
- name: Create archive
run: tar czf ruby-${{ matrix.ruby-version }}-${{ matrix.os }}.tar.gz -C ~/.rubies ruby-${{ matrix.ruby-version }}
run: tar czf ${{ steps.info.outputs.filename }} -C ~/.rubies ruby-${{ matrix.ruby-version }}
- name: Install Bundler if needed
run: |
if [ ! -e ~/.rubies/ruby-${{ matrix.ruby-version }}/bin/bundle ]; then
Expand All @@ -217,8 +226,8 @@ jobs:
with:
# curl -s "https://api.github.com/repos/ruby/ruby-builder/releases/tags/$TAG" | jq -r .upload_url
upload_url: 'https://uploads.github.com/repos/ruby/ruby-builder/releases/25022539/assets{?name,label}'
asset_path: ruby-${{ matrix.ruby-version }}-${{ matrix.os }}.tar.gz
asset_name: ruby-${{ matrix.ruby-version }}-${{ matrix.os }}.tar.gz
asset_path: ${{ steps.info.outputs.filename }}
asset_name: ${{ steps.info.outputs.filename }}
asset_content_type: application/gzip

buildRubinius:
Expand Down