diff --git a/.github/workflows/precheck_test.yml b/.github/workflows/precheck_test.yml index 4c8764d..0618f6a 100644 --- a/.github/workflows/precheck_test.yml +++ b/.github/workflows/precheck_test.yml @@ -31,24 +31,24 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ hashFiles('mpw_precheck/dependencies/Dockerfile') }} - restore-keys: | - ${{ runner.os }}-buildx- + # - name: Cache Docker layers + # uses: actions/cache@v3 + # with: + # path: /tmp/.buildx-cache + # key: ${{ runner.os }}-buildx-${{ hashFiles('mpw_precheck/dependencies/Dockerfile') }} + # restore-keys: | + # ${{ runner.os }}-buildx- - - name: Build Docker image - run: | - docker buildx create --use - docker buildx build \ - --cache-from=type=local,src=/tmp/.buildx-cache \ - --cache-to=type=local,dest=/tmp/.buildx-cache-new,mode=max \ - --output type=docker \ - --tag mpw_precheck:latest \ - mpw_precheck/dependencies - timeout-minutes: 15 + # - name: Build Docker image + # run: | + # docker buildx create --use + # docker buildx build \ + # --cache-from=type=local,src=/tmp/.buildx-cache \ + # --cache-to=type=local,dest=/tmp/.buildx-cache-new,mode=max \ + # --output type=docker \ + # --tag mpw_precheck:latest \ + # mpw_precheck/dependencies + # timeout-minutes: 15 - name: Move cache run: | @@ -73,14 +73,16 @@ jobs: - name: Run MPW Precheck run: | - export INPUT_DIRECTORY=/project - export PRECHECK_ROOT=/mpw_precheck + export INPUT_DIRECTORY=${{ github.workspace }}/${{ matrix.repo }} + export PRECHECK_ROOT=${{ github.workspace }}/mpw_precheck export OUTPUT_DIRECTORY=$INPUT_DIRECTORY/mpw_precheck_result export OUTPUT=$OUTPUT_DIRECTORY/logs/precheck.log - export PDK_ROOT=/pdk + export PDK_ROOT=${{ github.workspace }}/pdk export PDKPATH=$PDK_ROOT/sky130A - docker run -v "$PRECHECK_ROOT":"$PRECHECK_ROOT" -v "$INPUT_DIRECTORY":"$INPUT_DIRECTORY" -v "${{ env.PDK_ROOT }}":"${{ env.PDK_ROOT }}" -e INPUT_DIRECTORY="$INPUT_DIRECTORY" -e PDK_ROOT="${{ env.PDK_ROOT }}" -e PDKPATH="${{ env.PDKPATH }}" -u $(id -u "$USER"):$(id -g "$USER") mpw_precheck:latest bash -c "cd $PRECHECK_ROOT; python3 mpw_precheck.py --input_directory $INPUT_DIRECTORY --pdk_path ${{ env.PDKPATH }} --output_directory $OUTPUT_DIRECTORY" + docker pull efabless/mpw_precheck:latest + + docker run -v "$PRECHECK_ROOT":"$PRECHECK_ROOT" -v "$INPUT_DIRECTORY":"$INPUT_DIRECTORY" -v "${{ env.PDK_ROOT }}":"${{ env.PDK_ROOT }}" -e INPUT_DIRECTORY="$INPUT_DIRECTORY" -e PDK_ROOT="${{ env.PDK_ROOT }}" -e PDKPATH="${{ env.PDKPATH }}" -u $(id -u "$USER"):$(id -g "$USER") efabless/mpw_precheck:latest bash -c "cd $PRECHECK_ROOT; python3 mpw_precheck.py --input_directory $INPUT_DIRECTORY --pdk_path ${{ env.PDKPATH }} --output_directory $OUTPUT_DIRECTORY" cnt=$(grep -c "All Checks Passed" "$OUTPUT") if ! [[ $cnt ]]; then cnt=0; fi