fix github runner script #98
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
name: General CI | |
on: | |
# Runs on all PRs | |
pull_request: | |
# Manual Dispatch | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
python: | |
name: Python CI | |
strategy: | |
fail-fast: false | |
matrix: | |
python: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | |
# Python 3.9 is on macos-13 but not macos-latest (macos-14-arm64) | |
# https://github.com/actions/setup-python/issues/696#issuecomment-1637587760 | |
exclude: | |
- { python: "3.8", os: "macos-latest" } | |
- { python: "3.9", os: "macos-latest" } | |
include: | |
- { python: "3.8", os: "macos-13" } | |
- { python: "3.9", os: "macos-13" } | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install Requirements | |
run: | | |
python3 -m venv .venv | |
source .venv/bin/activate | |
python3 -m pip install --upgrade pip | |
python3 -m pip install .[dev] | |
- name: Run tests | |
run: | | |
source .venv/bin/activate | |
# change running directory | |
mkdir testrun | |
cd testrun | |
pytest $GITHUB_WORKSPACE -n auto -m "not eda" | |
sc_version: | |
name: Get SiliconCompiler version | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.sc_version.outputs.version }} | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Install gallery | |
run: | | |
python3 -m venv .venv | |
source .venv/bin/activate | |
python3 -m pip install --upgrade pip | |
python3 -m pip install . | |
- name: Get version | |
id: sc_version | |
run: | | |
source .venv/bin/activate | |
echo "version=v$(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 }} | |
eda: | |
name: EDA CI | |
needs: docker_image | |
runs-on: ubuntu-latest | |
container: | |
image: ${{ needs.docker_image.outputs.sc_tool }} | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Install Requirements | |
run: | | |
python3 -m venv .venv | |
source .venv/bin/activate | |
python3 -m pip install --upgrade pip | |
python3 -m pip install -e .[dev] | |
- name: Run tests | |
run: | | |
source .venv/bin/activate | |
# change running directory | |
mkdir testrun | |
cd testrun | |
pytest $GITHUB_WORKSPACE -m "eda" | |
designs_workflow: | |
name: Github Action Workflow Check | |
uses: ./.github/workflows/run-designs.yml | |
with: | |
scgallery-ref: ${{ github.ref }} | |
fail-fast: false | |
run: 'tiny' | |
secrets: inherit |