@@ -62,34 +62,34 @@ jobs:
6262 matrix :
6363 dry : [true, false]
6464 repo :
65- - name : " chipflow-examples"
65+ - name : " ChipFlow/ chipflow-examples"
6666 design : " minimal"
67- - name : " chipflow-test-socs"
68- design : " sram"
6967 env :
7068 DRY : ${{ matrix.dry && '--dry-run' || '' }}
71- 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+
7273 name : ${{ matrix.dry && 'Test Submit - Dry run' || 'Test submit' }}
7374
7475 steps :
7576 - name : Check out source code
7677 uses : actions/checkout@v4
7778 with :
78- fetch-depth : 0
79- path : chipflow-lib
79+ path : ${{ env.our_path }}
8080
8181 - name : Check out ${{ matrix.repo.name }}
8282 uses : actions/checkout@v4
8383 with :
84- repository : ChipFlow/${{ matrix.repo.name }}
85- fetch-depth : 0
86- path : ${{ matrix.repo.name }}
84+ repository : ${{ matrix.repo.name }}
85+ path : ${{ env.test_repo_path }}
8786
8887 - name : Check for branch ${{ github.head_ref }}
89- working-directory : ./ ${{ matrix.repo.name }}
88+ working-directory : ${{ env.test_repo_path }}
9089 if : github.event_name == 'pull_request'
9190 run : |
92- git checkout ${{ github.head_ref }} || echo 'Falling back to main'
91+ git remote update
92+ git checkout ${{ github.head_ref }} || echo "Falling back to main"
9393
9494 - name : Set up PDM
9595 uses : pdm-project/setup-pdm@v4
@@ -99,35 +99,35 @@ jobs:
9999 cache-dependency-path : ' ./**/pyproject.toml'
100100
101101 - name : Generate overrides to use current branch if PR
102- working-directory : ./ ${{ matrix.repo.name }}
102+ working-directory : ${{ env.test_repo_path }}
103103 if : github.event_name == 'pull_request'
104104 run : |
105- pdm run tools/gen_overrides.py ${{github.head_ref}} > overrides.txt
105+ pdm run ${{env.our_path}}/ tools/gen_overrides.py ${{github.head_ref}} > overrides.txt
106106 echo "Generated overrides:"
107107 cat overrides.txt
108108
109109 - name : Relock PDM
110- working-directory : ./ ${{ matrix.repo.name }}
110+ working-directory : ${{ env.test_repo_path }}
111111 if : github.event_name != 'pull_request'
112112 run : pdm lock -d
113113
114114 - name : Relock PDM (PR)
115- working-directory : ./ ${{ matrix.repo.name }}
115+ working-directory : ${{ env.test_repo_path }}
116116 if : github.event_name == 'pull_request'
117117 run : pdm lock -d --override overrides.txt
118118
119119 - name : Install dependencies
120- working-directory : ./ ${{ matrix.repo.name }}
120+ working-directory : ${{ env.test_repo_path }}
121121 run : |
122122 pdm install
123123
124124 - name : Run tests
125- working-directory : ./ ${{ matrix.repo.name }}
125+ working-directory : ${{ env.test_repo_path }}
126126 run : |
127127 pdm test
128128
129129 - name : Submit build ${{ env.is_dry }}
130- working-directory : ./ ${{ matrix.repo.name }}/${{ matrix.repo.design }}
130+ working-directory : ${{ env.test_repo_path }}/${{ matrix.repo.design }}
131131 run : |
132132 pdm run chipflow pin lock
133133 pdm run chipflow silicon submit --wait $DRY
0 commit comments