Factor out common install scripts; bump Verilator in integration-test… #41
This file contains hidden or 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: Integration Test Image | |
| on: | |
| push: | |
| branches: [trunk, main] | |
| paths: | |
| - 'integration-test/**' | |
| - '.github/workflows/integration-test.yml' | |
| pull_request: | |
| paths: | |
| - 'integration-test/**' | |
| - '.github/workflows/integration-test.yml' | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup environment | |
| run: | | |
| TAG=$(echo $GITHUB_REF | cut -d / -f 3) | |
| echo "GHCR_TAG=ghcr.io/${{github.repository}}/circt-integration-test:$TAG" >> $GITHUB_ENV | |
| - name: Build image | |
| run: docker build . -f integration-test.dockerfile --tag $GHCR_TAG | |
| - name: Push image | |
| if: ${{ github.event_name == 'release' }} | |
| run: | | |
| echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin | |
| docker push $GHCR_TAG |