pin to old version of ubuntu #441
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: CI | |
on: | |
push: | |
branches-ignore: | |
- 'main' | |
env: | |
BUILDER_VERSION: v0.8.19 | |
BUILDER_SOURCE: releases | |
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net | |
PACKAGE_NAME: aws-crt-ruby | |
RUN: ${{ github.run_id }}-${{ github.run_number }} | |
# https://github.com/ruby/setup-ruby | |
jobs: | |
linux: | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: [2.5, 2.6, 2.7, '3.0', 3.1, 3.2, 3.3, jruby-9.2, jruby-9.3, jruby-9.4] | |
# change to ubuntu-latest once Ruby 2.5 and JRuby 9.2 is dropped | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
- name: Build ${{ env.PACKAGE_NAME }} + consumers | |
run: | | |
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')" | |
chmod a+x builder | |
./builder build -p ${{ env.PACKAGE_NAME }} downstream | |
manylinux: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [linux] | |
ruby: [ruby] | |
arch: | |
- x64 | |
- aarch64 | |
runs-on: ubuntu-22.04 # temporarily downgrade to old ubuntu until https://github.com/actions/runner-images/issues/11471 resolves | |
steps: | |
- name: Checkout Sources | |
uses: actions/checkout@v1 | |
# Only aarch64 needs this, but it doesn't hurt anything | |
- name: Install qemu/docker | |
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | |
- run: echo ${{ secrets.GITHUB_TOKEN }} | docker login docker.pkg.github.com -u $GITHUB_ACTOR --password-stdin | |
- run: docker pull docker.pkg.github.com/$GITHUB_REPOSITORY/build-cache-no-buildkit || true | |
- run: docker build docker-images/manylinux2014-${{ matrix.arch }}-ruby -t local-${{ matrix.arch }} --cache-from=docker.pkg.github.com/$GITHUB_REPOSITORY/build-cache-no-buildkit | |
- run: docker tag local-${{ matrix.arch }} docker.pkg.github.com/$GITHUB_REPOSITORY/build-cache-no-buildkit && docker push docker.pkg.github.com/$GITHUB_REPOSITORY/build-cache-no-buildkit || true | |
- name: Build and test | |
run: | | |
docker run --env GITHUB_REF local-${{ matrix.arch }} --version=${{env.BUILDER_VERSION}} build -p ${{ env.PACKAGE_NAME }} downstream | |
windows: | |
runs-on: windows-2022 # latest | |
steps: | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ruby | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Build ${{ env.PACKAGE_NAME }} + consumers | |
run: | | |
ruby -v | |
bundle install | |
bundle exec rake release | |
osx: | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [x64, arm64] | |
ruby: [2.5, 2.6, 2.7, '3.0', 3.1, 3.2, 3.3, jruby-9.2, jruby-9.3, jruby-9.4] | |
exclude: | |
# ancient ruby versions not supported on arm64 macos | |
- arch: arm64 | |
ruby: 2.5 | |
- arch: arm64 | |
ruby: 2.6 | |
- arch: arm64 | |
ruby: jruby-9.2 | |
# Some macos runners are x64, some are arm64, see: https://github.com/actions/runner-images#available-images | |
runs-on: ${{ matrix.arch == 'x64' && 'macos-14-large' || 'macos-14' }} | |
steps: | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
- name: Build ${{ env.PACKAGE_NAME }} + consumers | |
run: | | |
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')" | |
chmod a+x builder | |
./builder build -p ${{ env.PACKAGE_NAME }} downstream |