-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
87 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: Build Ruby | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- engine: ruby | ||
version: 2.1.10 | ||
dockerfile: Dockerfile-2.1.10 | ||
- engine: ruby | ||
version: 2.2.10 | ||
dockerfile: Dockerfile-2.2.10 | ||
- engine: ruby | ||
version: 2.3.8 | ||
dockerfile: Dockerfile-2.3.8 | ||
- engine: ruby | ||
version: 2.4.10 | ||
dockerfile: Dockerfile-2.4.10 | ||
- engine: ruby | ||
version: 2.5.9 | ||
dockerfile: Dockerfile-2.5.9 | ||
- engine: ruby | ||
version: 2.6.7 | ||
dockerfile: Dockerfile-2.6.7 | ||
- engine: ruby | ||
version: 2.7.3 | ||
dockerfile: Dockerfile-2.7.3 | ||
- engine: ruby | ||
version: 3.0.3 | ||
dockerfile: Dockerfile-3.0.3 | ||
- engine: ruby | ||
version: 3.1.1 | ||
dockerfile: Dockerfile-3.1.1 | ||
- engine: ruby | ||
version: 3.2.0-preview2 | ||
dockerfile: Dockerfile-3.2.0-preview2 | ||
- engine: jruby | ||
version: 9.2.18.0 | ||
dockerfile: Dockerfile-jruby-9.2-latest | ||
- engine: jruby | ||
version: 9.2.8.0 | ||
dockerfile: Dockerfile-jruby-9.2.8.0 | ||
- engine: jruby | ||
version: 9.3.4.0 | ||
dockerfile: Dockerfile-jruby-9.3-latest | ||
- engine: truffleruby | ||
version: 22.3.0 | ||
dockerfile: Dockerfile-truffleruby-22.3.0 | ||
runs-on: ubuntu-latest | ||
name: Build (${{ matrix.engine }} ${{ matrix.version }}) | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Build image (x86_64) | ||
run: | | ||
docker buildx build . --cache-from=type=gha --cache-to=type=gha,mode=max --platform linux/x86_64 -f ${{ matrix.dockerfile }} --tag ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd-trace-rb | ||
working-directory: .circleci/images/primary | ||
- name: Test image (x86_64) | ||
run: | | ||
docker run --platform linux/x86_64 --rm ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd-trace-rb ruby -e 'puts RUBY_DESCRIPTION' | ||
docker run --platform linux/x86_64 --rm ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd-trace-rb gem --version | ||
docker run --platform linux/x86_64 --rm ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd-trace-rb bundle --version | ||
- name: Enable aarch64 emulation (x86_64) | ||
run: | | ||
docker run --privileged --rm tonistiigi/binfmt --install arm64 | ||
- name: Build image (aarch64) | ||
run: | | ||
docker buildx build . --cache-from=type=gha --cache-to=type=gha,mode=max --platform linux/aarch64 -f ${{ matrix.dockerfile }} --tag ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd-trace-rb | ||
working-directory: .circleci/images/primary | ||
- name: Test image (aarch64) | ||
run: | | ||
docker run --platform linux/aarch64 --rm ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd-trace-rb ruby -e 'puts RUBY_DESCRIPTION' | ||
docker run --platform linux/aarch64 --rm ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd-trace-rb gem --version | ||
docker run --platform linux/aarch64 --rm ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd-trace-rb bundle --version | ||
- name: Log in to the Container Registry | ||
run: | | ||
echo ${{ secrets.GITHUB_TOKEN }} | docker login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin |