Run Gallery Designs #9
Workflow file for this run
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
on: | |
workflow_dispatch: | |
name: 'All Designs' | |
defaults: | |
run: | |
shell: bash | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
designs: | |
name: Get design matrix | |
runs-on: ubuntu-latest | |
outputs: | |
designs: ${{ steps.designs.outputs.designs }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Get design matrix | |
id: designs | |
run: | | |
echo "designs=$(cat $GITHUB_WORKSPACE/.github/workflows/config/designs.json)" >> $GITHUB_OUTPUT | |
sc_version: | |
name: Get SiliconCompiler tools image | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.sc_version.outputs.version }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install gallery | |
id: sc_version | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install -e $GITHUB_WORKSPACE/. | |
echo "version=$(sc -version)" >> $GITHUB_OUTPUT | |
docker_image: | |
needs: sc_version | |
name: Get tools image | |
uses: siliconcompiler/siliconcompiler/.github/workflows/docker_image.yml@main | |
with: | |
sc_version: ${{ needs.sc_version.outputs.version }} | |
designs_test: | |
needs: [docker_image, designs] | |
timeout-minutes: 120 | |
runs-on: ubuntu-latest | |
container: | |
image: ${{ needs.docker_image.outputs.sc_tools }} | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJson(needs.designs.outputs.designs) }} | |
name: 'Run design' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
path: scgallery | |
submodules: recursive | |
- name: Checkout SiliconCompiler | |
uses: actions/checkout@v4 | |
with: | |
repository: siliconcompiler/siliconcompiler | |
path: siliconcompiler | |
- name: Run gallery | |
run: | | |
python3 -m venv clean_env | |
source clean_env/bin/activate | |
python3 -m pip install --upgrade pip | |
python3 -m pip install -e $GITHUB_WORKSPACE/scgallery/. | |
export SCPATH=$GITHUB_WORKSPACE/siliconcompiler/siliconcompiler | |
python3 -m scgallery -design ${{ matrix.design }} -target ${{ matrix.target }} | |
- name: Upload gallery artifacts | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: gallery | |
path: gallery/ | |
retention-days: 1 |