Skip to content

Commit

Permalink
[#61287] WIP: .github: Verify workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Illia Vysochyn <[email protected]>
  • Loading branch information
ivysochyn committed Jul 8, 2024
1 parent c9ddf5a commit 84436a8
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions .github/workflows/github-actions-publish-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

- name: Set environment variables
run: |
echo "IMAGE_DEPS=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')-dev/${{ matrix.os[0] }}" >> $GITHUB_ENV
echo "IMAGE_DEPS=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')-test-cache-deps/${{ matrix.os[0] }}" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down Expand Up @@ -87,29 +87,12 @@ jobs:

- name: Set environment variables
run: |
echo "IMAGE=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')/${{ matrix.os }}" >> $GITHUB_ENV
echo "IMAGE_DEPS=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')-dev/${{ matrix.os }}" >> $GITHUB_ENV
echo "IMAGE=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')-test-cache/${{ matrix.os }}" >> $GITHUB_ENV
echo "IMAGE_DEPS=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')-test-cache-deps/${{ matrix.os }}" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# We don't use the build-push-action here because it hangs
- name: Build ORFS image
run: |
docker buildx build \
--load \
--build-arg fromImage=${{ env.IMAGE_DEPS }}:latest \
--build-arg numThreads=$(nproc) \
--cache-from type=registry,ref=${{ env.IMAGE }}:buildcache \
--tag ${{ env.IMAGE }}:latest \
--file docker/Dockerfile.builder \
.
- name: Test build
run: |
cmd="source ./env.sh && yosys -help && openroad -help && make -C flow ;"
docker run ${{ env.IMAGE }}:latest /bin/bash -c "${cmd}"
- name: Login to GitHub Container Registry (GHCR)
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
Expand All @@ -118,6 +101,7 @@ jobs:
username: gha
password: ${{ github.token }}

# We don't use the build-push-action here because it hangs
- name: Export ORFS image
run: |
docker buildx build \
Expand Down

0 comments on commit 84436a8

Please sign in to comment.