@@ -62,19 +62,29 @@ jobs:
62
62
strategy :
63
63
matrix :
64
64
dry : [true, false]
65
+ repo :
66
+ - name : " chipflow-examples"
67
+ design : " minimal"
68
+ - name : " chipflow-test-socs"
69
+ design : " sram"
65
70
env :
66
71
DRY : ${{ matrix.dry && '--dry-run' || '' }}
67
72
IS_DRY : ${{ matrix.dry && '(dry run)' || '' }}
68
73
name : ${{ matrix.dry && 'Test Submit - Dry run' || 'Test submit' }}
69
74
70
75
steps :
71
- - name : Check out chipflow-examples
76
+ - name : Check out ${{ matrix.repo.name }}
72
77
uses : actions/checkout@v4
73
78
with :
74
- repository : ChipFlow/chipflow-examples
79
+ repository : ChipFlow/${{ matrix.repo.name }}
75
80
fetch-depth : 0
76
- path : chipflow-examples
77
- ref : ${{ github.head_ref || 'refs/heads/main' }}
81
+ path : ${{ matrix.repo.name }}
82
+
83
+ - name : Check for branch ${{ github.head_ref }}
84
+ working-directory : ./${{ matrix.repo.name }}
85
+ if : github.event_name == 'pull_request'
86
+ run : |
87
+ git checkout ${{ github.head_ref }} || echo "Falling back to main"
78
88
79
89
- name : Set up PDM
80
90
uses : pdm-project/setup-pdm@v4
@@ -84,35 +94,35 @@ jobs:
84
94
cache-dependency-path : ' ./**/pyproject.toml'
85
95
86
96
- name : Generate overrides to use current branch if PR
87
- working-directory : ./chipflow-examples
97
+ working-directory : ./${{ matrix.repo.name }}
88
98
if : github.event_name == 'pull_request'
89
99
run : |
90
100
pdm run tools/gen_overrides.py ${{github.head_ref}} > overrides.txt
91
101
echo "Generated overrides:"
92
102
cat overrides.txt
93
103
94
104
- name : Relock PDM
95
- working-directory : ./chipflow-examples
105
+ working-directory : ./${{ matrix.repo.name }}
96
106
if : github.event_name != 'pull_request'
97
107
run : pdm lock -d
98
108
99
109
- name : Relock PDM (PR)
100
- working-directory : ./chipflow-examples
110
+ working-directory : ./${{ matrix.repo.name }}
101
111
if : github.event_name == 'pull_request'
102
112
run : pdm lock -d --override overrides.txt
103
113
104
114
- name : Install dependencies
105
- working-directory : ./chipflow-examples
115
+ working-directory : ./${{ matrix.repo.name }}
106
116
run : |
107
117
pdm install
108
118
109
119
- name : Run tests
110
- working-directory : ./chipflow-examples
120
+ working-directory : ./${{ matrix.repo.name }}
111
121
run : |
112
122
pdm test
113
123
114
124
- name : Submit build ${{ env.is_dry }}
115
- working-directory : ./chipflow-examples/minimal
125
+ working-directory : ./${{ matrix.repo.name }}/${{ matrix.repo.design }}
116
126
run : |
117
127
pdm run chipflow pin lock
118
128
pdm run chipflow silicon submit --wait $DRY
0 commit comments