15
15
steps :
16
16
- name : Check out source code
17
17
uses : actions/checkout@v4
18
- with :
19
- fetch-depth : 0
18
+
20
19
- name : Set up PDM
21
20
uses : pdm-project/setup-pdm@v4
22
21
@@ -69,24 +68,26 @@ jobs:
69
68
design : " sram"
70
69
env :
71
70
DRY : ${{ matrix.dry && '--dry-run' || '' }}
72
- IS_DRY : ${{ matrix.dry && '(dry run)' || '' }}
71
+ is_dry : ${{ matrix.dry && '(dry run)' || '' }}
72
+ our_path : " ${{ github.workspace}}/${{ github.repo }}"
73
+ test_repo_path : " ${{ github.workspace }}/${{ matrix.repo.name }}"
74
+
73
75
name : ${{ matrix.dry && 'Test Submit - Dry run' || 'Test submit' }}
74
76
75
77
steps :
76
78
- name : Check out source code
77
79
uses : actions/checkout@v4
78
80
with :
79
- path : ${{ github.repo }}
81
+ path : ${{ env.our_path }}
80
82
81
- - name : Check out ${{ matrix.repo.name }}
83
+ - name : Check out ${{ env.test_repo_path }}
82
84
uses : actions/checkout@v4
83
85
with :
84
86
repository : ${{ matrix.repo.name }}
85
- fetch-depth : 0
86
- path : ${{ matrix.repo.name }}
87
+ path : ${{ env.test_repo_path }}
87
88
88
89
- name : Check for branch ${{ github.head_ref }}
89
- working-directory : ./${{ matrix.repo.name }}
90
+ working-directory : ./${{ env.test_repo_path }}
90
91
if : github.event_name == 'pull_request'
91
92
run : |
92
93
git checkout ${{ github.head_ref }} || echo "Falling back to main"
@@ -99,35 +100,35 @@ jobs:
99
100
cache-dependency-path : ' ./**/pyproject.toml'
100
101
101
102
- name : Generate overrides to use current branch if PR
102
- working-directory : ./${{ matrix.repo.name }}
103
+ working-directory : ./${{ env.test_repo_path }}
103
104
if : github.event_name == 'pull_request'
104
105
run : |
105
- pdm run ../../ ${{github.repo }}/tools/gen_overrides.py ${{github.head_ref}} > overrides.txt
106
+ pdm run ${{env.our_path }}/tools/gen_overrides.py ${{github.head_ref}} > overrides.txt
106
107
echo "Generated overrides:"
107
108
cat overrides.txt
108
109
109
110
- name : Relock PDM
110
- working-directory : ./${{ matrix.repo.name }}
111
+ working-directory : ./${{ env.test_repo_path }}
111
112
if : github.event_name != 'pull_request'
112
113
run : pdm lock -d
113
114
114
115
- name : Relock PDM (PR)
115
- working-directory : ./${{ matrix.repo.name }}
116
+ working-directory : ./${{ env.test_repo_path }}
116
117
if : github.event_name == 'pull_request'
117
118
run : pdm lock -d --override overrides.txt
118
119
119
120
- name : Install dependencies
120
- working-directory : ./${{ matrix.repo.name }}
121
+ working-directory : ./${{ env.test_repo_path }}
121
122
run : |
122
123
pdm install
123
124
124
125
- name : Run tests
125
- working-directory : ./${{ matrix.repo.name }}
126
+ working-directory : ./${{ env.test_repo_path }}
126
127
run : |
127
128
pdm test
128
129
129
130
- name : Submit build ${{ env.is_dry }}
130
- working-directory : ./${{ matrix.repo.name }}/${{ matrix.repo.design }}
131
+ working-directory : ./${{ env.test_repo_path }}/${{ matrix.repo.design }}
131
132
run : |
132
133
pdm run chipflow pin lock
133
134
pdm run chipflow silicon submit --wait $DRY
0 commit comments