CI_fix - remove obsolete scripts, test simple CI

CI_fix - sudo the make execution

CI_fix change pdk build
diff --git a/.github/scripts/build_pdk.sh b/.github/scripts/build_pdk.sh
deleted file mode 100644
index d7b19aa..0000000
--- a/.github/scripts/build_pdk.sh
+++ /dev/null
@@ -1,25 +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
-git clone --depth=1 --branch mpw-5c https://github.com/efabless/caravel-lite.git
-
-export HOME=$(pwd)
-cd ..
-export PDK_ROOT=$(pwd)/pdks && mkdir "$PDK_ROOT"
-cd "$HOME"/caravel-lite/ || exit
-
-make skywater-pdk open-pdks sky130 gen-sources
-
-exit 0
diff --git a/.github/scripts/install_magic.sh b/.github/scripts/install_magic.sh
index ca91137..6a4405d 100644
--- a/.github/scripts/install_magic.sh
+++ b/.github/scripts/install_magic.sh
@@ -15,10 +15,10 @@
 # SPDX-License-Identifier: Apache-2.0
 sudo apt-get install -y csh freeglut3-dev libncurses5-dev libncursesw5-dev libglu1-mesa-dev libx11-dev mesa-common-dev tcl tcl-dev tk tk-dev
 
-git clone --depth=1 --branch 8.3.265 https://github.com/RTimothyEdwards/magic.git
+git clone --depth=1 --branch 8.3.274 https://github.com/RTimothyEdwards/magic.git
 cd magic || exit
 sudo ./configure --disable-locking --prefix=/usr CFLAGS='-g -O0 -m64 -fPIC'
-sudo make -j4
+sudo make -j
 sudo make install
 
 exit 0
diff --git a/.github/scripts/run_precheck.sh b/.github/scripts/run_precheck.sh
deleted file mode 100644
index 16091a6..0000000
--- a/.github/scripts/run_precheck.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 INPUT_DIRECTORY=$(pwd)
-export PRECHECK_ROOT=$INPUT_DIRECTORY/mpw_precheck
-export OUTPUT_DIRECTORY=$INPUT_DIRECTORY/mpw_precheck_result
-export OUTPUT=$OUTPUT_DIRECTORY/logs/precheck.log
-cd ..
-export PDK_ROOT=$(pwd)/pdks
-cd "$PRECHECK_ROOT" || exit
-
-docker run -v "$PRECHECK_ROOT":"$PRECHECK_ROOT" -v "$INPUT_DIRECTORY":"$INPUT_DIRECTORY" -v "$PDK_ROOT":"$PDK_ROOT" -e INPUT_DIRECTORY="$INPUT_DIRECTORY" -e 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"
-
-
-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/caravel_build.yml b/.github/workflows/caravel_build.yml
deleted file mode 100644
index d9cadb3..0000000
--- a/.github/workflows/caravel_build.yml
+++ /dev/null
@@ -1,53 +0,0 @@
-# name: Caravel Build
-
-# on:
-#  # Runs on Every Push
-#  push:
-#  # Runs on Pull Requests
-#  pull_request:
-#  workflow_dispatch:
-
-# jobs:
-#  make_ship:
-#    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: bash ${GITHUB_WORKSPACE}/.github/scripts/install_magic.sh
-
-#      - name: Build PDK
-#        run: bash ${GITHUB_WORKSPACE}/.github/scripts/build_pdk.sh
-
-#      - name: Run make ship
-#        run: bash ${GITHUB_WORKSPACE}/.github/scripts/build/run-ship.sh
-#        env:
-#          OPENLANE_TAG: 2021.12.17_05.07.41
-
-#  set_user_id:
-#    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: bash ${GITHUB_WORKSPACE}/.github/scripts/install_magic.sh
-
-#      - name: Build PDK
-#        run: bash ${GITHUB_WORKSPACE}/.github/scripts/build_pdk.sh
-
-#      - name: Run Set User ID
-#        run: bash ${GITHUB_WORKSPACE}/.github/scripts/build/run-set-id.sh
-#        env:
-#          OPENLANE_TAG: 2021.09.16_03.28.21
diff --git a/.github/workflows/user_project_ci.yml b/.github/workflows/user_project_ci.yml
index 2bec30b..bfb5d58 100644
--- a/.github/workflows/user_project_ci.yml
+++ b/.github/workflows/user_project_ci.yml
@@ -8,7 +8,7 @@
   workflow_dispatch:
 
 jobs:
-  precheck:
+  mpw_precheck:
     timeout-minutes: 720
     runs-on: ubuntu-latest
     steps:
@@ -20,19 +20,46 @@
       - name: Set up Docker Buildx
         uses: docker/setup-buildx-action@v1
 
+      - name: Export PDK ROOT
+        run: |
+          echo "PDK_ROOT=/usr/local/pdk" >> $GITHUB_ENV
+
       - name: Install Magic
         run: bash ${GITHUB_WORKSPACE}/.github/scripts/install_magic.sh
 
-      - name: Build PDK
-        run: bash ${GITHUB_WORKSPACE}/.github/scripts/build_pdk.sh
+      - name: Build SKY130 PDK
+        run: |
+          git clone --depth=1 --branch mpw-5c https://github.com/efabless/caravel-lite.git
+          sudo mkdir -p ${{ env.PDK_ROOT }}
+          sudo make -f caravel-lite/Makefile skywater-pdk open-pdks
+          cd ${{ env.PDK_ROOT }}/open_pdks && \
+          ./configure --enable-sky130-pdk=${{ env.PDK_ROOT }}/skywater-pdk/libraries --enable-sram-sky130 && \
+          cd sky130 && \
+          make veryclean && \
+          make prerequisites && \
+          make && \
+          make SHARED_PDKS_PATH=${{ env.PDK_ROOT }} install && \
+          make clean
+          suod make -f gen-sources
 
-      - name: Install The Precheck
-        run: git clone --depth=1 https://github.com/efabless/mpw_precheck.git ${GITHUB_WORKSPACE}/mpw_precheck
+      - name: Run MPW-Precheck
+        run: |
+          export INPUT_DIRECTORY=$(pwd)
+          export PRECHECK_ROOT=$INPUT_DIRECTORY/mpw_precheck
+          export OUTPUT_DIRECTORY=$INPUT_DIRECTORY/mpw_precheck_result
+          export OUTPUT=$OUTPUT_DIRECTORY/logs/precheck.log
 
-      - name: Run The Precheck
-        run: bash ${GITHUB_WORKSPACE}/.github/scripts/run_precheck.sh
+          git clone --depth=1 mpw-5b https://github.com/efabless/mpw_precheck.git
+
+          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 }}" -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 ${{ env.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"
+
+          cnt=$(grep -c "All Checks Passed" "$OUTPUT")
+          if ! [[ $cnt ]]; then cnt=0; fi
+          if [[ $cnt -eq 1 ]]; then exit 0; fi
+          exit 2
 
   user_project_flow:
+    timeout-minutes: 720
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v2
@@ -49,14 +76,14 @@
       - name: Export OPENLANE ROOT
         run: echo "OPENLANE_ROOT=/home/runner/work/caravel_user_project/openlane" >> $GITHUB_ENV
 
-      - name: install dependencies
+      - name: Install dependencies
         run: |
           sudo mkdir -p ${{ env.PDK_ROOT }}
           sudo chown -R $USER:$USER ${{ env.PDK_ROOT }}
           make setup
           make simenv
 
-      - name: hardening using openlane
+      - name: Harden using Openlane
         run: |
           make user_proj_example
           make user_project_wrapper
@@ -67,7 +94,7 @@
           make verify-la_test1-rtl 
           make verify-la_test2-rtl 
           make verify-mprj_stimulus-rtl 
-          make verify-wb_port-rtl 
+          make verify-wb_port-rtl
 
       - name: Run DV GL tests
         run: |
@@ -75,4 +102,4 @@
           make verify-la_test1-gl 
           make verify-la_test2-gl 
           make verify-mprj_stimulus-gl 
-          make verify-wb_port-gl 
+          make verify-wb_port-gl