Skip to content

CI

CI #345

Workflow file for this run

on:
push:
branches:
- 'main'
- 'latest-release'
pull_request:
merge_group:
workflow_dispatch:
inputs:
release:
description: Test with the release lock
type: boolean
default: false
ENVIRONMENT:
required: true
type: environment
env:
lock_pdm: ${{ ! (github.ref_name == 'refs/heads/latest-release' || inputs.release) }}
name: CI
run-name: ${{ inputs.release && 'Release' || 'CI'}}
jobs:
submit:
runs-on: ubuntu-latest
strategy:
matrix:
design: ['mcu_soc', 'minimal', 'picosoc_verilog']
steps:
- name: Check out source code
uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version-file: pyproject.toml
cache-dependency-path: pyproject.toml
cache: true
- name: Install dependencies with multirepo
uses: chipflow/pdm-multirepo@v1
- name: Lock pins
working-directory: ./${{ matrix.design }}
run: pdm run chipflow pin lock
- name: Submit to cloud backend
working-directory: ./${{ matrix.design }}
run: pdm run chipflow -vv silicon submit --wait
env:
CHIPFLOW_API_KEY: ${{ secrets.CHIPFLOW_API_KEY}}
CHIPFLOW_API_ORIGIN: ${{ vars.CHIPFLOW_API_ORIGIN }}
CHIPFLOW_BACKEND_VERSION: ${{ vars.CHIPFLOW_BACKEND_VERSION }}
test:
runs-on: ubuntu-latest
strategy:
matrix:
design: ['mcu_soc', 'minimal', 'picosoc_verilog']
steps:
- name: Check out source code
uses: actions/checkout@v4
with:
submodules: true
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version-file: pyproject.toml
cache-dependency-path: pyproject.toml
cache: true
- name: Install dependencies with multirepo
uses: chipflow/pdm-multirepo@v1
- name: Cache YoWASP build products
uses: actions/cache@v4
with:
path: ~/.cache/YoWASP
key: YoWASP-${{ runner.os }}-${{ hashFiles('./.venv/**/*.wasm') }}
restore-keys: |
YoWASP-${{ runner.os }}-
- name: Lock pins
working-directory: ./${{ matrix.design }}
run: pdm run chipflow pin lock
- name: Run unit tests
working-directory: ./${{ matrix.design }}
run: |
pdm test
- name: Run simulation tests
working-directory: ./${{ matrix.design }}
run: |
pdm sim-check
- name: Test submit dry run
working-directory: ./${{ matrix.design }}
run: |
pdm run chipflow silicon submit --dry-run