1515 steps :
1616 - name : Check out source code
1717 uses : actions/checkout@v4
18- with :
19- fetch-depth : 0
18+
2019 - name : Set up PDM
2120 uses : pdm-project/setup-pdm@v4
2221
@@ -69,24 +68,26 @@ jobs:
6968 design : " sram"
7069 env :
7170 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+
7375 name : ${{ matrix.dry && 'Test Submit - Dry run' || 'Test submit' }}
7476
7577 steps :
7678 - name : Check out source code
7779 uses : actions/checkout@v4
7880 with :
79- path : ${{ github.repo }}
81+ path : ${{ env.our_path }}
8082
8183 - name : Check out ${{ matrix.repo.name }}
8284 uses : actions/checkout@v4
8385 with :
8486 repository : ${{ matrix.repo.name }}
85- fetch-depth : 0
86- path : ${{ matrix.repo.name }}
87+ path : ${{ env.test_repo_path }}
8788
8889 - name : Check for branch ${{ github.head_ref }}
89- working-directory : ./${{ matrix.repo.name }}
90+ working-directory : ./${{ env.test_repo_path }}
9091 if : github.event_name == 'pull_request'
9192 run : |
9293 git checkout ${{ github.head_ref }} || echo "Falling back to main"
@@ -99,35 +100,35 @@ jobs:
99100 cache-dependency-path : ' ./**/pyproject.toml'
100101
101102 - name : Generate overrides to use current branch if PR
102- working-directory : ./${{ matrix.repo.name }}
103+ working-directory : ./${{ env.test_repo_path }}
103104 if : github.event_name == 'pull_request'
104105 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
106107 echo "Generated overrides:"
107108 cat overrides.txt
108109
109110 - name : Relock PDM
110- working-directory : ./${{ matrix.repo.name }}
111+ working-directory : ./${{ env.test_repo_path }}
111112 if : github.event_name != 'pull_request'
112113 run : pdm lock -d
113114
114115 - name : Relock PDM (PR)
115- working-directory : ./${{ matrix.repo.name }}
116+ working-directory : ./${{ env.test_repo_path }}
116117 if : github.event_name == 'pull_request'
117118 run : pdm lock -d --override overrides.txt
118119
119120 - name : Install dependencies
120- working-directory : ./${{ matrix.repo.name }}
121+ working-directory : ./${{ env.test_repo_path }}
121122 run : |
122123 pdm install
123124
124125 - name : Run tests
125- working-directory : ./${{ matrix.repo.name }}
126+ working-directory : ./${{ env.test_repo_path }}
126127 run : |
127128 pdm test
128129
129130 - 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 }}
131132 run : |
132133 pdm run chipflow pin lock
133134 pdm run chipflow silicon submit --wait $DRY
0 commit comments