Add arm64 builds #114
Workflow file for this run
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
# Copyright (c) 2022 MobileCoin Inc. | |
name: ci | |
on: | |
pull_request: | |
push: | |
tags: | |
- 'v*.*.*' | |
env: | |
PULL_REQUEST: ${{ github.event_name == 'pull_request' && 'false' || 'true' }} | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
lint-actions: | |
runs-on: mco-dev-small-x64 | |
steps: | |
- name: Lint GitHub Actions | |
uses: mobilecoinofficial/gh-actions/lint-actions@v0 | |
lint-docker: | |
runs-on: mco-dev-small-x64 | |
steps: | |
- name: Lint Dockerfiles with Hadolint | |
uses: mobilecoinofficial/gh-actions/lint-docker@v0 | |
docker-rust-base: | |
needs: | |
- lint-actions | |
- lint-docker | |
strategy: | |
matrix: | |
runner: | |
- mco-dev-small-x64 | |
- mco-dev-small-arm64 | |
runs-on: ${{ matrix.runner }} | |
steps: | |
- name: Checkout | |
uses: mobilecoinofficial/gh-actions/checkout@v0 | |
- name: Docker rust-base | |
id: build | |
uses: mobilecoinofficial/gh-actions/docker@ce66543a382e20624b6db7f5ffc1226227114871 | |
with: | |
dockerfile: Dockerfile.rust-base | |
images: mobilecoin/rust-base | |
outputs: type=image,name=mobilecoin/rust-base,push-by-digest=true,name-canonical=true,push=true | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Export digest | |
run: | | |
mkdir -p /tmp/digests | |
digest="${{ steps.build.outputs.digest }}" | |
touch "/tmp/digests/${digest#sha256:}" | |
- name: Upload digest | |
uses: mobilecoinofficial/gh-actions/upload-artifact@v0 | |
with: | |
name: digests-rust-base-${{ runner.arch }} | |
path: /tmp/digests/* | |
if-no-files-found: error | |
retention-days: 1 | |
docker-rust-base-merge: | |
runs-on: mco-dev-small-x64 | |
needs: | |
- docker-rust-base | |
steps: | |
- name: Merge and Tag Digests | |
uses: mobilecoinofficial/gh-actions/docker-merge-digests@ce66543a382e20624b6db7f5ffc1226227114871 | |
with: | |
digest_artifact_prefix: digests-rust-base | |
images: mobilecoin/rust-base | |
flavor: latest=true | |
tags: | | |
type=semver,pattern=v{{version}} | |
type=sha | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
docker-rust-sgx: | |
needs: | |
- docker-rust-base-merge | |
runs-on: mco-dev-small-x64 | |
steps: | |
- name: Checkout | |
uses: mobilecoinofficial/gh-actions/checkout@v0 | |
- name: Short Sha | |
id: short_sha | |
uses: mobilecoinofficial/gh-actions/short-sha@ce66543a382e20624b6db7f5ffc1226227114871 | |
- name: Docker rust-sgx | |
id: build | |
uses: mobilecoinofficial/gh-actions/docker@ce66543a382e20624b6db7f5ffc1226227114871 | |
with: | |
dockerfile: Dockerfile.rust-sgx | |
flavor: latest=true | |
images: mobilecoin/rust-sgx | |
tags: | | |
type=semver,pattern=v{{version}} | |
type=sha | |
build_args: | | |
BASE_IMAGE_TAG=${{ steps.short_sha.outputs.short_sha }} | |
push: true | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
# docker-fat-builder: | |
# needs: | |
# - docker-rust-base | |
# strategy: | |
# matrix: | |
# runner: | |
# - mco-dev-small-x64 | |
# - mco-dev-small-arm64 | |
# runs-on: ${{ matrix.runner }} | |
# steps: | |
# - name: Checkout | |
# uses: mobilecoinofficial/gh-actions/checkout@v0 | |
# - name: Docker fat-builder | |
# uses: mobilecoinofficial/gh-actions/docker@v0 | |
# with: | |
# flavor: latest=true | |
# dockerfile: Dockerfile.fat-builder | |
# images: mobilecoin/fat-builder | |
# build_args: | | |
# BASE_IMAGE=rust-base | |
# tags: | | |
# type=ref,event=branch | |
# type=semver,pattern=v{{version}} | |
# type=semver,pattern=v{{major}}.{{minor}} | |
# type=semver,pattern=v{{major}} | |
# type=sha | |
# push: true | |
# username: ${{ secrets.DOCKERHUB_USERNAME }} | |
# password: ${{ secrets.DOCKERHUB_TOKEN }} | |
# docker-fat-sgx-builder: | |
# needs: | |
# - docker-rust-sgx | |
# runs-on: mco-dev-small-x64 | |
# steps: | |
# - name: Docker fat-sgx-builder | |
# uses: mobilecoinofficial/gh-actions/docker@v0 | |
# with: | |
# flavor: latest=true | |
# dockerfile: Dockerfile.fat-builder | |
# images: mobilecoin/fat-sgx-builder | |
# build_args: | | |
# BASE_IMAGE=rust-sgx | |
# tags: | | |
# type=ref,event=branch | |
# type=semver,pattern=v{{version}} | |
# type=semver,pattern=v{{major}}.{{minor}} | |
# type=semver,pattern=v{{major}} | |
# type=sha | |
# push: true | |
# username: ${{ secrets.DOCKERHUB_USERNAME }} | |
# password: ${{ secrets.DOCKERHUB_TOKEN }} | |
# success: | |
# needs: | |
# - lint-actions | |
# - lint-docker | |
# - docker-rust-base | |
# - docker-rust-sgx | |
# - docker-fat-builder | |
# - docker-fat-sgx-builder | |
# runs-on: mco-dev-small-x64 | |
# steps: | |
# - name: Success | |
# run: echo "All Builds Success" |