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
@@ -63,25 +62,30 @@ jobs:
6362 matrix :
6463 dry : [true, false]
6564 repo :
66- - name : " chipflow-examples"
65+ - name : " ChipFlow/ chipflow-examples"
6766 design : " minimal"
68- - name : " chipflow-test-socs"
69- design : " sram"
7067 env :
7168 DRY : ${{ matrix.dry && '--dry-run' || '' }}
72- IS_DRY : ${{ matrix.dry && '(dry run)' || '' }}
69+ is_dry : ${{ matrix.dry && '(dry run)' || '' }}
70+ our_path : " ${{ github.workspace}}/${{ github.repo }}"
71+ test_repo_path : " ${{ github.workspace }}/${{ matrix.repo.name }}"
72+
7373 name : ${{ matrix.dry && 'Test Submit - Dry run' || 'Test submit' }}
7474
7575 steps :
76+ - name : Check out source code
77+ uses : actions/checkout@v4
78+ with :
79+ path : ${{ env.our_path }}
80+
7681 - name : Check out ${{ matrix.repo.name }}
7782 uses : actions/checkout@v4
7883 with :
79- repository : ChipFlow/${{ matrix.repo.name }}
80- fetch-depth : 0
81- path : ${{ matrix.repo.name }}
84+ repository : ${{ matrix.repo.name }}
85+ path : ${{ env.test_repo_path }}
8286
8387 - name : Check for branch ${{ github.head_ref }}
84- working-directory : ./ ${{ matrix.repo.name }}
88+ working-directory : ${{ env.test_repo_path }}
8589 if : github.event_name == 'pull_request'
8690 run : |
8791 git checkout ${{ github.head_ref }} || echo "Falling back to main"
@@ -94,35 +98,35 @@ jobs:
9498 cache-dependency-path : ' ./**/pyproject.toml'
9599
96100 - name : Generate overrides to use current branch if PR
97- working-directory : ./ ${{ matrix.repo.name }}
101+ working-directory : ${{ env.test_repo_path }}
98102 if : github.event_name == 'pull_request'
99103 run : |
100- pdm run tools/gen_overrides.py ${{github.head_ref}} > overrides.txt
104+ pdm run ${{env.our_path}}/ tools/gen_overrides.py ${{github.head_ref}} > overrides.txt
101105 echo "Generated overrides:"
102106 cat overrides.txt
103107
104108 - name : Relock PDM
105- working-directory : ./ ${{ matrix.repo.name }}
109+ working-directory : ${{ env.test_repo_path }}
106110 if : github.event_name != 'pull_request'
107111 run : pdm lock -d
108112
109113 - name : Relock PDM (PR)
110- working-directory : ./ ${{ matrix.repo.name }}
114+ working-directory : ${{ env.test_repo_path }}
111115 if : github.event_name == 'pull_request'
112116 run : pdm lock -d --override overrides.txt
113117
114118 - name : Install dependencies
115- working-directory : ./ ${{ matrix.repo.name }}
119+ working-directory : ${{ env.test_repo_path }}
116120 run : |
117121 pdm install
118122
119123 - name : Run tests
120- working-directory : ./ ${{ matrix.repo.name }}
124+ working-directory : ${{ env.test_repo_path }}
121125 run : |
122126 pdm test
123127
124128 - name : Submit build ${{ env.is_dry }}
125- working-directory : ./ ${{ matrix.repo.name }}/${{ matrix.repo.design }}
129+ working-directory : ${{ env.test_repo_path }}/${{ matrix.repo.design }}
126130 run : |
127131 pdm run chipflow pin lock
128132 pdm run chipflow silicon submit --wait $DRY
0 commit comments