Build x86 LLVM-Nightly Prereq Image #48
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
# (c) Copyright 2021 Xilinx, Inc. All Rights reserved. | |
# (c) Copyright 2022 - 2024 Advanced Micro Devices, Inc. All Rights reserved. | |
name: Build x86 LLVM-Nightly Prereq Image | |
on: | |
# Allow manually triggering rebuild. | |
workflow_dispatch: | |
# Run every week (on Sunday). | |
schedule: | |
- cron: '0 0 * * SUN' | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build-prereq-image: | |
runs-on: ubuntu-latest | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Get Repo | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 2 | |
submodules: "true" | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Log in to the Container registry | |
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-base | |
- name: Build and push base image | |
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
file: .github/workflows/prereq.Dockerfile | |
# env: | |
# DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} | |
# run: | | |
# # Swaps utils/clone-mlir for a different shell script that clones the latest version of llvm/mlir. | |
# mv $GITHUB_WORKSPACE/utils/clone-mlir.sh $GITHUB_WORKSPACE/utils/clone-mlir-backup.sh | |
# cp $GITHUB_WORKSPACE/utils/clone-mlir-master.sh $GITHUB_WORKSPACE/utils/clone-mlir.sh | |
# # Build docker image for x86 arch, with the latest llvm/mlir and subsequently publish it. | |
# docker build --tag onnxmlirczar/onnx-mlir-llvmimage:x86-nightly -f $GITHUB_WORKSPACE/.github/workflows/prereq.Dockerfile $GITHUB_WORKSPACE/utils | |
# docker login -u onnxmlirczar -p "$DOCKER_HUB_TOKEN" | |
# docker push onnxmlirczar/onnx-mlir-llvmimage:x86-nightly | |