Skip to content

CI

CI #286

Workflow file for this run

on:
push:
branches:
- main
pull_request:
merge_group:
schedule:
- cron: '0 0 * * *' # Every day at midnight UTC
name: CI
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
- name: Install dependencies
run: |
pdm install
- name: Run tests
run: |
pdm run test
- name: Run lints
run: |
pdm run lint
- name: Run doc tests
run: pdm run test-docs
license:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check source code licenses
run: |
docker run --platform=linux/amd64 -v ${PWD}:/src ghcr.io/google/addlicense -v -check -l BSD-2-Clause -c "ChipFlow" -s=only -ignore **/__init__.py **/*.py
test-submit:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
with:
fetch-depth: 0
path: chipflow-lib
- name: Check out chipflow-examples
uses: actions/checkout@v4
with:
repository: ChipFlow/chipflow-examples
fetch-depth: 0
path: chipflow-examples
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: "3.10"
cache: true
cache-dependency-path: "./**/pyproject.toml"
- name: Install dependencies
working-directory: ./chipflow-examples
run: |
pdm install
pdm run python -m ensurepip
pdm run python -m pip install -e ../chipflow-lib
- name: Run tests
working-directory: ./chipflow-examples
run: |
pdm test
pdm run chipflow pin lock
pdm run chipflow silicon submit --wait
env:
CHIPFLOW_API_ORIGIN: 'https://build-staging.chipflow.org'
CHIPFLOW_API_KEY_ID: ${{ secrets.CHIPFLOW_API_KEY_ID }}
CHIPFLOW_API_KEY_SECRET: ${{ secrets.CHIPFLOW_API_KEY_SECRET }}
CHIPFLOW_BACKEND_VERSION: b7afdbf
test-submit-dry:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
with:
fetch-depth: 0
path: chipflow-lib
- name: Check out chipflow-examples
uses: actions/checkout@v4
with:
repository: ChipFlow/chipflow-examples
fetch-depth: 0
path: chipflow-examples
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: "3.10"
cache: true
cache-dependency-path: "./**/pyproject.toml"
- name: Install dependencies
working-directory: ./chipflow-examples
run: |
pdm install
pdm run python -m ensurepip
pdm run python -m pip install -e ../chipflow-lib
- name: Run tests
working-directory: ./chipflow-examples
run: |
pdm test
pdm run chipflow pin lock
pdm run chipflow silicon submit --dry-run