From 8d86f2a04a65c50fa2e6b5e0d956f32052eda3cd Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Tue, 5 Nov 2024 23:17:44 +0200 Subject: [PATCH] ci(precheck): experimental tapeout job generates the final .oas and publishes it as an artifact --- .github/workflows/precheck.yaml | 66 ++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/.github/workflows/precheck.yaml b/.github/workflows/precheck.yaml index c8fee69e..52dd6580 100644 --- a/.github/workflows/precheck.yaml +++ b/.github/workflows/precheck.yaml @@ -3,7 +3,7 @@ name: mpw_precheck on: workflow_dispatch: workflow_run: - workflows: ["gds"] + workflows: ['gds'] types: [completed] jobs: @@ -71,3 +71,67 @@ jobs: with: name: precheck_results path: tinytapeout-submission/precheck_results + + mpw_tapeout_checks: + env: + KLAYOUT_VERSION: 0.29.2 + MAGIC_VERSION: 8.3.471 + PDK_ROOT: ${{ github.workspace }}/pdk + CARAVEL_ROOT: ${{ github.workspace }}/caravel + + runs-on: ubuntu-22.04 + steps: + - name: checkout repo + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Checkout Caravel + uses: actions/checkout@v4 + with: + repository: efabless/caravel + path: ${{ env.CARAVEL_ROOT }} + + - name: Install KLayout + run: | + wget https://www.klayout.org/downloads/Ubuntu-22/klayout_${KLAYOUT_VERSION}-1_amd64.deb + sudo apt-get install -y ./klayout_${KLAYOUT_VERSION}-1_amd64.deb + + - name: Install magic VLSI + run: | + sudo apt-get install -y m4 python3 libx11-dev tcl-dev tk-dev libcairo2-dev mesa-common-dev libglu1-mesa-dev + git clone -b ${MAGIC_VERSION} https://github.com/RTimothyEdwards/magic magic + cd magic + ./configure + make -j4 + sudo make install + + - name: Download artifact (run id = ${{ github.event.workflow_run.id }}) + uses: dawidd6/action-download-artifact@v3 + id: download_artifact + with: + workflow: gds.yaml + run_id: ${{ github.event.workflow_run.id }} + workflow_conclusion: success + name: efabless_submission + path: tinytapeout-submission + + - name: Create final .oas file + working-directory: tinytapeout-submission + run: | + make -C $CARAVEL_ROOT openframe + make -f $CARAVEL_ROOT/Makefile generate_fill USER_ID=1 PROJECT=caravel_openframe + make -C $CARAVEL_ROOT final USER_ID=1 PROJECT=caravel_openframe + + - name: Publish final .oas file + uses: actions/upload-artifact@v4 + if: always() + with: + name: final_oas + path: tinytapeout-submission/tapeout/outputs/oas/* + + # TODO: +# +# klayout -b -r fom_density.drc -rd gds_input=gds/caravel_1.gds -rd top_cell=caravel_1 -rd report_file=fom_report.xml +# Check the klayout report file, and publish it as an artifact (even if case of failure) +# https://github.com/efabless/foss-asic-tools/blob/main/images/foss-asic-tools/addons/sak/klayout/tech/sky130A/fom_density.drc#L4 ? \ No newline at end of file