diff --git a/.github/workflows/user_project_ci.yml b/.github/workflows/user_project_ci.yml index 175e9a2..7e71752 100644 --- a/.github/workflows/user_project_ci.yml +++ b/.github/workflows/user_project_ci.yml @@ -58,11 +58,13 @@ jobs: cf setup --pdk ${{ matrix.pdk }} --only-openlane --only-pdk - name: Harden Designs + id: harden + continue-on-error: true run: | - set -e + set -euo pipefail python3 .github/scripts/get_designs.py --design ${{ github.workspace }} for design in $(cat harden_sequence.txt); do - cf harden $design || exit 1 + cf harden --tag ci --pdk ${{ matrix.pdk }} $design done - name: Upload Hardened Design @@ -72,9 +74,14 @@ jobs: path: | ${{ github.workspace }}/gds ${{ github.workspace }}/signoff + ${{ github.workspace }}/*lane/*/runs/ci ${{ github.workspace }}/.cf/project.json retention-days: 1 + - name: Fail if harden failed + if: steps.harden.outcome == 'failure' + run: exit 1 + rtl-verification: timeout-minutes: 720 runs-on: ubuntu-latest @@ -210,8 +217,37 @@ jobs: name: design-${{ matrix.pdk }} path: ${{ github.workspace }} - - name: Configure GPIO (non-interactive) + - name: Detect default design + id: default_design run: | + set -e + + UPW="verilog/rtl/user_project_wrapper.v" + UPE="verilog/rtl/user_proj_example.v" + UD="verilog/rtl/user_defines.v" + + # Replace these with the known-good checksums for the default design + DEFAULT_UPW_SHA256="db2d0bd579f1a7db73f46d838ed2af1e88aa3d73585a7c23db6e4203762081ca" + DEFAULT_UPE_SHA256="af1666e007dca72d851932f0a88370897302287088fa03d8687d10c607fa5e9d" + DEFAULT_UD_SHA256="ab6e82ca9b069050b77ac0f74c5c9574f6a0eb4a09f96245490e89bd0f6ce6f7" + + upw_sha=$(sha256sum "$UPW" | awk '{print $1}') + upe_sha=$(sha256sum "$UPE" | awk '{print $1}') + ud_sha=$(sha256sum "$UD" | awk '{print $1}') + + if [[ "$upw_sha" == "$DEFAULT_UPW_SHA256" && \ + "$upe_sha" == "$DEFAULT_UPE_SHA256" && \ + "$ud_sha" == "$DEFAULT_UD_SHA256" ]]; then + echo "is_default=true" >> "$GITHUB_OUTPUT" + else + echo "is_default=false" >> "$GITHUB_OUTPUT" + fi + + - name: Override INVALID GPIO definitions for default design only + if: steps.default_design.outputs.is_default == 'true' + run: | + echo "Default design detected. Applying INVALID GPIO overrides." + python3 <