Removed libcvc4-dev #119
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: Handle LLVM_runner docker image | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
check_changes: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: read | |
outputs: | |
image_to_build: ${{ steps.set_output.outputs.image_to_build }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: determine_changes | |
uses: tj-actions/changed-files@v39 | |
with: | |
files_yaml: | | |
llvm_runner: | |
- "images/llvm_runner/Dockerfile" | |
llvm_runner_jammy: | |
- "images/llvm_runner/jammy.Dockerfile" | |
both: | |
- ".github/workflows/handle_llvm_runner_image.yml" | |
- id: set_output | |
run: | | |
if [ "${{ steps.determine_changes.outputs.llvm_runner_any_changed }}" == "true" ]; then | |
echo "image_to_build=llvm_runner" >> "$GITHUB_OUTPUT" | |
elif [ "${{ steps.determine_changes.outputs.llvm_runner_jammy_any_changed }}" == "true" ]; then | |
echo "image_to_build=llvm_runner_jammy" >> "$GITHUB_OUTPUT" | |
elif [ "${{ steps.determine_changes.outputs.both_any_changed }}" == "true" ]; then | |
echo "image_to_build=both" >> "$GITHUB_OUTPUT" | |
else | |
echo "image_to_build=none" >> "$GITHUB_OUTPUT" | |
fi | |
handle_image: | |
needs: check_changes | |
if: needs.check_changes.outputs.image_to_build != 'none' | |
runs-on: [matterlabs-ci-runner] | |
strategy: | |
matrix: | |
image_name: [llvm_runner, llvm_runner_jammy] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set outputs | |
id: set_output | |
run: echo "sha_short=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
platforms: ${{ matrix.image_name == 'llvm_runner_jammy' && 'linux/amd64,linux/arm64,linux/arm64/v8' || 'linux/amd64' }} | |
- name: Log in to Docker Hub | |
if: github.event_name == 'push' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USER }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and optionally push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
push: ${{ github.event_name == 'push' }} | |
tags: | | |
matterlabs/${{ matrix.image_name }}:${{ steps.set_output.outputs.sha_short }} | |
matterlabs/${{ matrix.image_name }}:latest | |
file: images/llvm_runner/${{ matrix.image_name == 'llvm_runner_jammy' && 'jammy.' || '' }}Dockerfile | |
platforms: ${{ matrix.image_name == 'llvm_runner_jammy' && 'linux/amd64,linux/arm64,linux/arm64/v8' || 'linux/amd64' }} |