Skip to content

Update Dockerfile

Update Dockerfile #27

Workflow file for this run

name: Publish Docker images
on:
push:
branches:
- 'main'
jobs:
push_to_registry:
name: Build and push docker ${{ matrix.ubuntu }} ${{ matrix.llvm }} ${{ matrix.llcommit }} ${{ matrix.build }} ${{ matrix.projects }} ${{ matrix.targets }} ${{ matrix.url }}
runs-on: large22
strategy:
fail-fast: false
matrix:
ubuntu: [22.04]
url: ["https://github.com/llvm/llvm-project"]
llvm: [11, 12, 13, 14, 15, 16, 17]
llcommit: [""]
build: ["Debug", "Release"]
projects: ["clang;lld"]
targets: ["X86"]
include:
- projects: "clang;lld;mlir"
llvm: "16"
- projects: "clang;lld;mlir"
llvm: ""
llcommit: "b7a249d26fe61432050df470d23bdea417fda574"
permissions:
packages: write
contents: read
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}/ubuntu-${{ matrix.ubuntu }}-llvm-${{ matrix.llvm }}-build-${{ matrix.build }}-project-${{ contains(matrix.projects, 'clang') }}-${{ contains(matrix.projects, 'lld') }}-${{ contains(matrix.projects, 'mlir') }}-commit-${{ matrix.llcommit }}-end
steps:
- uses: AutoModality/action-clean@v1
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: linux/amd64
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image (amd64 & arm64)
uses: docker/build-push-action@v5
with:
context: .
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64
build-args: |
UBUNTU_VERSION=${{ matrix.ubuntu }}
LLVM_URL=${{ matrix.url }}
LLVM_VERSION=${{ matrix.llvm }}
LLVM_COMMIT=${{ matrix.llcommit }}
BUILD_TYPE=${{ matrix.build }}
PROJECTS=${{ matrix.projects }}
TARGETS=${{ matrix.targets }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=min