Skip to content

Commit

Permalink
Merge pull request #32 from siliconcompiler/reuse-docker-image
Browse files Browse the repository at this point in the history
Reuse docker image
  • Loading branch information
troibe committed Sep 1, 2023
2 parents 17c0e55 + 5ddf68a commit 7f70521
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 40 deletions.
27 changes: 6 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,18 @@ env:

jobs:
docker_image:
name: 'Get docker sc_tools image'
runs-on: ubuntu-latest

outputs:
sc_tools: ${{ steps.docker.outputs.sc_tools }}

steps:
- name: Checkout repository
run: |
git clone https://github.com/siliconcompiler/siliconcompiler
- name: Get image name
id: docker
run: |
pip install siliconcompiler
git -C siliconcompiler checkout v$(sc -version)
pip install -r siliconcompiler/setup/docker/requirements.txt
sc_tools_name=$(python3 siliconcompiler/setup/docker/builder.py --tool tools --registry ${{ env.REGISTRY }})
echo "sc_tools=${sc_tools_name}" >> $GITHUB_OUTPUT
uses: siliconcompiler/siliconcompiler/.github/workflows/docker_image.yml@main
with:
tool: 'tools'
sc_version: 'latest'

flat:
name: 'flat'
needs: docker_image
timeout-minutes: 180
runs-on: ubuntu-latest
container:
image: ${{ needs.docker_image.outputs.sc_tools }}
image: ${{ needs.docker_image.outputs.sc_tool }}
credentials:
username: ${{ secrets.PACKAGES_ACTOR }}
password: ${{ secrets.PACKAGES_TOKEN }}
Expand Down Expand Up @@ -77,7 +62,7 @@ jobs:
timeout-minutes: 180
runs-on: ubuntu-latest
container:
image: ${{ needs.docker_image.outputs.sc_tools }}
image: ${{ needs.docker_image.outputs.sc_tool }}
credentials:
username: ${{ secrets.PACKAGES_ACTOR }}
password: ${{ secrets.PACKAGES_TOKEN }}
Expand Down
24 changes: 5 additions & 19 deletions .github/workflows/sc-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,17 @@ env:

jobs:
docker_image:
name: 'Get docker sc_tools image'
runs-on: ubuntu-latest

outputs:
sc_tools: ${{ steps.docker.outputs.sc_tools }}

steps:
- name: Checkout repository
run: |
git clone https://github.com/siliconcompiler/siliconcompiler
- name: Get image name
id: docker
run: |
pip install -r siliconcompiler/setup/docker/requirements.txt
sc_tools_name=$(python3 siliconcompiler/setup/docker/builder.py --tool tools --registry ${{ env.REGISTRY }})
echo "sc_tools=${sc_tools_name}" >> $GITHUB_OUTPUT
uses: siliconcompiler/siliconcompiler/.github/workflows/docker_image.yml@main
with:
tool: 'tools'

flat:
name: 'flat'
needs: docker_image
timeout-minutes: 180
runs-on: ubuntu-latest
container:
image: ${{ needs.docker_image.outputs.sc_tools }}
image: ${{ needs.docker_image.outputs.sc_tool }}
credentials:
username: ${{ secrets.PACKAGES_ACTOR }}
password: ${{ secrets.PACKAGES_TOKEN }}
Expand Down Expand Up @@ -75,7 +61,7 @@ jobs:
timeout-minutes: 180
runs-on: ubuntu-latest
container:
image: ${{ needs.docker_image.outputs.sc_tools }}
image: ${{ needs.docker_image.outputs.sc_tool }}
credentials:
username: ${{ secrets.PACKAGES_ACTOR }}
password: ${{ secrets.PACKAGES_TOKEN }}
Expand Down

0 comments on commit 7f70521

Please sign in to comment.