-
Notifications
You must be signed in to change notification settings - Fork 1
171 lines (137 loc) · 4.28 KB
/
general_ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
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", "3.13"]
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
id: python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install Requirements (non-windows)
if: runner.os != 'Windows'
run: |
${{ steps.python.outputs.python-path }} -m venv .venv
. .venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install .[dev]
- name: Run tests (non-windows)
if: runner.os != 'Windows'
run: |
. .venv/bin/activate
# change running directory
mkdir testrun
cd testrun
pytest $GITHUB_WORKSPACE -n auto -m "not eda"
- name: Install Requirements (windows)
if: runner.os == 'Windows'
run: |
${{ steps.python.outputs.python-path }} -m venv venv
venv/Scripts/activate
python3 -m pip install --upgrade pip
python3 -m pip install .[dev]
- name: Run tests (windows)
if: runner.os == 'Windows'
run: |
venv/Scripts/activate
# change running directory
mkdir testrun
cd testrun
pytest .. -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
. .venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install .
- name: Get version
id: sc_version
run: |
. .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
. .venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install -e .[dev]
- name: Run tests
run: |
. .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
check_designs:
name: Check design config
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Generate run matrix
run: |
python3 -m venv .venv
. .venv/bin/activate
pip3 install .
- name: Get design matrix
id: designs
run: |
. .venv/bin/activate
scripts/generate_image_cache.py --github
scripts/report_configs.py --markdown
echo "$(python3 scripts/report_configs.py --markdown)" >> $GITHUB_STEP_SUMMARY