EFIC-233 - update ci
diff --git a/.github/scripts/build-pdk.sh b/.github/scripts/build-pdk.sh
new file mode 100644
index 0000000..48f0dcc
--- /dev/null
+++ b/.github/scripts/build-pdk.sh
@@ -0,0 +1,11 @@
+export HOME=$(pwd)
+
+git clone --depth=1 https://github.com/efabless/caravel-lite.git
+
+cd ..
+export PDK_ROOT=$(pwd)/pdks
+mkdir $PDK_ROOT
+cd $HOME/caravel-lite/
+make pdk
+
+exit 0
\ No newline at end of file
diff --git a/.github/scripts/precheck/install-magic.sh b/.github/scripts/precheck/install-magic.sh
index 78640e6..8c0fee7 100644
--- a/.github/scripts/precheck/install-magic.sh
+++ b/.github/scripts/precheck/install-magic.sh
@@ -22,8 +22,8 @@
git clone --depth=1 --branch 8.3.265 https://github.com/RTimothyEdwards/magic.git ${MAGIC_ROOT}
cd $MAGIC_ROOT
-sudo ./configure --disable-locking --prefix=/build CFLAGS='-g -O0 -m64 -fPIC'
+sudo ./configure --disable-locking --prefix=/usr CFLAGS='-g -O0 -m64 -fPIC'
sudo make -j4
sudo make install
-sudo ln -s /build/bin/magic /usr/bin/magic
+
exit 0
diff --git a/.github/scripts/precheck/precheckBuild.sh b/.github/scripts/precheck/precheckBuild.sh
deleted file mode 100644
index 789a512..0000000
--- a/.github/scripts/precheck/precheckBuild.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-# SPDX-FileCopyrightText: 2020 Efabless Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# SPDX-License-Identifier: Apache-2.0
-
-# By default build pdk since we don't need the other script for the main purpose
-export SKIP_PDK_BUILD=${1:-0}
-export TARGET_PATH=$(pwd)
-
-git clone --depth=1 https://github.com/efabless/mpw_precheck.git
-git clone --depth=1 https://github.com/efabless/caravel-lite.git
-
-docker pull efabless/mpw_precheck:latest
-
-if [ $SKIP_PDK_BUILD -eq 0 ]; then
- cd $TARGET_PATH/..
- export PDK_ROOT=$(pwd)/precheck_pdks
- mkdir $PDK_ROOT
- cd $TARGET_PATH/caravel-lite/
- make uncompress pdk
- cd $TARGET_DIR
-fi
-
-exit 0
diff --git a/.github/scripts/precheck/run-precheck-drc.sh b/.github/scripts/precheck/run-precheck-drc.sh
deleted file mode 100644
index d0530fe..0000000
--- a/.github/scripts/precheck/run-precheck-drc.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-# SPDX-FileCopyrightText: 2020 Efabless Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# SPDX-License-Identifier: Apache-2.0
-export TARGET_PATH=$(pwd)
-export PRECHECK_ROOT=$TARGET_PATH/mpw_precheck
-export OUTPUT_DIRECTORY=$TARGET_PATH/mpw_precheck_result
-cd ..
-export PDK_ROOT=$(pwd)/precheck_pdks
-cd $PRECHECK_ROOT
-
-docker run -v $PRECHECK_ROOT:$PRECHECK_ROOT -v $TARGET_PATH:$TARGET_PATH -v $PDK_ROOT:$PDK_ROOT -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_root $PDK_ROOT --output_directory $OUTPUT_DIRECTORY magic_drc klayout_beol klayout_feol klayout_met_min_ca_density klayout_offgrid klayout_pin_label_purposes_overlapping_drawing klayout_zeroarea
-
-output=$OUTPUT_DIRECTORY/logs/precheck.log
-
-cnt=$(grep -c "All Checks Passed" $output)
-if ! [[ $cnt ]]; then cnt=0; fi
-if [[ $cnt -eq 1 ]]; then exit 0; fi
-exit 2
-
diff --git a/.github/scripts/precheck/run-precheck.sh b/.github/scripts/precheck/run-precheck.sh
index d2e1bab..d63d15b 100644
--- a/.github/scripts/precheck/run-precheck.sh
+++ b/.github/scripts/precheck/run-precheck.sh
@@ -20,12 +20,11 @@
export PDK_ROOT=$(pwd)/precheck_pdks
cd $PRECHECK_ROOT
-docker run -v $PRECHECK_ROOT:$PRECHECK_ROOT -v $TARGET_PATH:$TARGET_PATH -v $PDK_ROOT:$PDK_ROOT -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_root $PDK_ROOT --output_directory $OUTPUT_DIRECTORY license makefile consistency xor
-
+docker run -v $PRECHECK_ROOT:$PRECHECK_ROOT -v $TARGET_PATH:$TARGET_PATH -v $PDK_ROOT:$PDK_ROOT -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_root $PDK_ROOT --output_directory $OUTPUT_DIRECTORY license makefile consistency xor magic_drc klayout_beol klayout_feol klayout_met_min_ca_density klayout_offgrid klayout_pin_label_purposes_overlapping_drawing klayout_zeroarea"
+
output=$OUTPUT_DIRECTORY/logs/precheck.log
cnt=$(grep -c "All Checks Passed" $output)
if ! [[ $cnt ]]; then cnt=0; fi
if [[ $cnt -eq 1 ]]; then exit 0; fi
exit 2
-
diff --git a/.github/workflows/user_project_ci.yml b/.github/workflows/user_project_ci.yml
index ef6959c..73e7ca6 100644
--- a/.github/workflows/user_project_ci.yml
+++ b/.github/workflows/user_project_ci.yml
@@ -9,8 +9,8 @@
jobs:
precheck:
- runs-on: ubuntu-latest
timeout-minutes: 720
+ runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@@ -21,35 +21,17 @@
uses: docker/setup-buildx-action@v1
- name: Install Magic
- run: sh ${GITHUB_WORKSPACE}/.github/scripts/precheck/install-magic.sh
+ run: bash ${GITHUB_WORKSPACE}/.github/scripts/precheck/install-magic.sh
+ - name: Build PDK
+ run: bash ${GITHUB_WORKSPACE}/.github/scripts/build-pdk.sh
+
- name: Install The Precheck
- run: sh ${GITHUB_WORKSPACE}/.github/scripts/precheck/precheckBuild.sh
+ run: git clone --depth=1 https://github.com/efabless/mpw_precheck.git ${GITHUB_WORKSPACE}/mpw_precheck
- name: Run The Precheck
run: bash ${GITHUB_WORKSPACE}/.github/scripts/precheck/run-precheck.sh
- precheck-drc:
- timeout-minutes: 720
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
-
- - name: Set up QEMU
- uses: docker/setup-qemu-action@v1
-
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v1
-
- - name: Install Magic
- run: sh ${GITHUB_WORKSPACE}/.github/scripts/precheck/install-magic.sh
-
- - name: Install The Precheck
- run: sh ${GITHUB_WORKSPACE}/.github/scripts/precheck/precheckBuild.sh
-
- - name: Run The Precheck
- run: bash ${GITHUB_WORKSPACE}/.github/scripts/precheck/run-precheck-drc.sh
-
dv_rtl:
runs-on: ubuntu-latest
steps: