blob: ef2fdbfd000d4444e4edb75869e7a8f4d87d76dd [file] [log] [blame]
agorararmard790b9522020-10-21 19:39:39 +02001# 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
16set -e
17
18mkdir pdks
19export OPEN_PDKS_ROOT=$(pwd)
20export PDK_ROOT=$(pwd)/pdks
21cd ./.travisCI
22sh ./build-docker.sh > /dev/null
23make skywater-pdk > /dev/null
24if [ $STD_CELL_LIBRARY == all ]; then
agorararmardd09a0dd2020-11-16 23:01:02 +020025 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
agorararmard790b9522020-10-21 19:39:39 +020034else
agorararmardd09a0dd2020-11-16 23:01:02 +020035 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
agorararmard790b9522020-10-21 19:39:39 +020044fi
45cd ..
46docker 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"
47exit 0