agorararmard | 790b952 | 2020-10-21 19:39:39 +0200 | [diff] [blame] | 1 | # Copyright 2020 Efabless Corporation |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | # exit when any command fails |
| 16 | set -e |
| 17 | |
| 18 | mkdir pdks |
| 19 | export OPEN_PDKS_ROOT=$(pwd) |
| 20 | export PDK_ROOT=$(pwd)/pdks |
| 21 | cd ./.travisCI |
| 22 | sh ./build-docker.sh > /dev/null |
| 23 | make skywater-pdk > /dev/null |
| 24 | if [ $STD_CELL_LIBRARY == all ]; then |
agorararmard | d09a0dd | 2020-11-16 23:01:02 +0200 | [diff] [blame] | 25 | cnt=0 |
| 26 | until make all-skywater-libraries; do |
| 27 | cnt=$((cnt+1)) |
| 28 | if [ $cnt -eq 5 ]; then |
| 29 | exit 2 |
| 30 | fi |
| 31 | rm -rf $PDK_ROOT/skywater-pdk |
| 32 | make skywater-pdk > /dev/null |
| 33 | done |
agorararmard | 790b952 | 2020-10-21 19:39:39 +0200 | [diff] [blame] | 34 | else |
agorararmard | d09a0dd | 2020-11-16 23:01:02 +0200 | [diff] [blame] | 35 | cnt=0 |
| 36 | until make skywater-library; do |
| 37 | cnt=$((cnt+1)) |
| 38 | if [ $cnt -eq 5 ]; then |
| 39 | exit 2 |
| 40 | fi |
| 41 | rm -rf $PDK_ROOT/skywater-pdk |
| 42 | make skywater-pdk > /dev/null |
| 43 | done |
agorararmard | 790b952 | 2020-10-21 19:39:39 +0200 | [diff] [blame] | 44 | fi |
| 45 | cd .. |
| 46 | docker run -it -v $(pwd):/some_root -v $(pwd)/.travisCI:/build_root -v $OPEN_PDKS_ROOT:$OPEN_PDKS_ROOT -v $PDK_ROOT:$PDK_ROOT -e OPEN_PDKS_ROOT=$OPEN_PDKS_ROOT -e PDK_ROOT=$PDK_ROOT -u $(id -u $USER):$(id -g $USER) magic:latest bash -c "cd /build_root && make build-pdk" |
| 47 | exit 0 |