Skip to content

Commit

Permalink
Update precheck_test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
marwaneltoukhy authored Sep 3, 2024
1 parent 2df37d4 commit 122137f
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions .github/workflows/precheck_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand Down

0 comments on commit 122137f

Please sign in to comment.