Convert travis CI to GitHub Actions.

Fixes #174.

Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
diff --git a/.travisCI/Dockerfile b/.github/Dockerfile
similarity index 96%
rename from .travisCI/Dockerfile
rename to .github/Dockerfile
index aa11f86..a641596 100644
--- a/.travisCI/Dockerfile
+++ b/.github/Dockerfile
@@ -31,6 +31,7 @@
 #General utils
 RUN yum install -y tcllib
 RUN yum install -y git tcl tk libjpeg libgomp libXext libSM libXft libffi cairo gettext Xvfb
+RUN yum install -y python3 python3-pip python3-tkinter python3-devel
 
 RUN git clone git://opencircuitdesign.com/magic magic_15102020
 
diff --git a/.travisCI/Makefile b/.github/Makefile
similarity index 97%
rename from .travisCI/Makefile
rename to .github/Makefile
index 449bd8f..fcb0bc1 100644
--- a/.travisCI/Makefile
+++ b/.github/Makefile
@@ -17,7 +17,7 @@
 OPEN_PDKS_ROOT ?= $(shell pwd)/..
 THREADS ?= $(shell nproc)
 STD_CELL_LIBRARY ?= sky130_fd_sc_hd
-SKYWATER_COMMIT ?= d8e2cf1ba006ed01468aa60e7f4e85a1ece74ca4
+SKYWATER_COMMIT ?= b5ff6174d9aa921f670f12a2893969fe4a516f6c
 
 .DEFAULT_GOAL := all
 
diff --git a/.travisCI/build-docker.sh b/.github/build-docker.sh
similarity index 85%
rename from .travisCI/build-docker.sh
rename to .github/build-docker.sh
index 9bd8fa1..bd9a48d 100644
--- a/.travisCI/build-docker.sh
+++ b/.github/build-docker.sh
@@ -15,7 +15,4 @@
 # exit when any command fails
 set -e
 
-mkdir -p logs/docker
-echo "dir created"
-docker build --rm -t magic . | tee logs/docker/magic.build.txt
-
+docker build --rm -t magic .
diff --git a/.github/build.sh b/.github/build.sh
new file mode 100755
index 0000000..8f08cb3
--- /dev/null
+++ b/.github/build.sh
@@ -0,0 +1,70 @@
+# Copyright 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.
+
+# exit when any command fails
+set -e
+
+export OPEN_PDKS_ROOT=$(pwd)
+export PDK_ROOT=$(pwd)/pdks
+mkdir -p $PDK_ROOT
+
+cd .github
+
+echo ::group::.github/build-docker.sh
+bash ./build-docker.sh
+echo ::endgroup::
+
+echo ::group::make skywater-pdk
+make skywater-pdk
+echo ::endgroup::
+
+if [ x"$STD_CELL_LIBRARY" = xall ]; then
+    cnt=0
+    until make all-skywater-libraries; do
+        cnt=$((cnt+1))
+        if [ $cnt -eq 5 ]; then
+            exit 2
+        fi
+        rm -rf $PDK_ROOT/skywater-pdk
+        make skywater-pdk
+    done
+else
+    cnt=0
+    until make skywater-library; do
+        cnt=$((cnt+1))
+        if [ $cnt -eq 5 ]; then
+            exit 2
+        fi
+        rm -rf $PDK_ROOT/skywater-pdk
+        make skywater-pdk
+    done
+fi
+
+cd ..
+
+docker run \
+	\
+	-v $(pwd):/some_root \
+	-v $(pwd)/.github:/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"
+exit 0
diff --git a/.travisCI/travisTest.sh b/.github/test.sh
old mode 100644
new mode 100755
similarity index 76%
rename from .travisCI/travisTest.sh
rename to .github/test.sh
index cd1a608..b0ef360
--- a/.travisCI/travisTest.sh
+++ b/.github/test.sh
@@ -13,9 +13,21 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-if ! [[ -d $(pwd)/pdks/sky130A ]]; then exit -1; fi
+SKY130_DIR="$(pwd)/pdks/pdk/sky130A"
+if ! [[ -d $SKY130_DIR ]]; then
+    echo "Missing $SKY130_DIR"
+    exit -1
+fi
 
-SIZE=$(du -sb $(pwd)/pdks/sky130A | cut -f1)
+du -h $SKY130_DIR
+
+echo ::group::Output files
+echo
+find $SKY130_DIR | sort
+echo
+echo ::endgroup::
+
+SIZE=$(du -sb $SKY130_DIR | cut -f1)
 # 250MB = 131,072,000 bytes; a fair estimate of the size of one library, I guess.
 if [[ $SIZE -lt 131072000 ]]; then
     echo 'size is less than 125MB'
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..93513fa
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,40 @@
+name: CI
+
+on:
+  push:
+  pull_request:
+  workflow_dispatch:
+
+
+jobs:
+
+  Run:
+    strategy:
+      fail-fast: false
+      matrix:
+        library:
+          - sky130_fd_sc_hd
+          - sky130_fd_sc_hdll
+          - sky130_fd_sc_hs
+          - sky130_fd_sc_ms
+          - sky130_fd_sc_ls
+          - sky130_fd_sc_hvl
+          - all
+    env:
+      STD_CELL_LIBRARY: ${{ matrix.library }}
+
+    runs-on: ubuntu-latest
+
+    steps:
+    - uses: actions/checkout@v2
+      with:
+        fetch-depth: 0
+        submodules: true
+
+    - name: Build
+      run: |
+        bash .github/build.sh
+
+    - name: Test
+      run: |
+        bash .github/test.sh
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index d49af66..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 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.
-
-language: minimal
-
-
-services:
-    - docker
-
-os:
-  - linux
-
-jobs:
-  include:
-    - name: "hd library"
-      env: STD_CELL_LIBRARY=sky130_fd_sc_hd
-    - name: "hs library"
-      env: STD_CELL_LIBRARY=sky130_fd_sc_hs
-    - name: "ms library"
-      env: STD_CELL_LIBRARY=sky130_fd_sc_ms
-    - name: "ls library"
-      env: STD_CELL_LIBRARY=sky130_fd_sc_ls
-    - name: "hdll library"
-      env: STD_CELL_LIBRARY=sky130_fd_sc_hdll
-    - name: "hvl library"
-      env: STD_CELL_LIBRARY=sky130_fd_sc_hvl
-    - name: "all libraries"
-      env: STD_CELL_LIBRARY=all
-  allow_failures:
-    - name: "all libraries"
-      env: STD_CELL_LIBRARY=all
-
-install:
-  - bash .travisCI/travisBuild.sh
-
-script:
-  - bash .travisCI/travisTest.sh
diff --git a/.travisCI/travisBuild.sh b/.travisCI/travisBuild.sh
deleted file mode 100644
index ef2fdbf..0000000
--- a/.travisCI/travisBuild.sh
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 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.
-
-# exit when any command fails
-set -e
-
-mkdir pdks
-export OPEN_PDKS_ROOT=$(pwd)
-export PDK_ROOT=$(pwd)/pdks
-cd ./.travisCI
-sh ./build-docker.sh > /dev/null
-make skywater-pdk > /dev/null
-if [ $STD_CELL_LIBRARY == all ]; then
-    cnt=0
-    until make all-skywater-libraries; do
-    cnt=$((cnt+1))
-    if [ $cnt -eq 5 ]; then
-        exit 2
-    fi
-    rm -rf $PDK_ROOT/skywater-pdk
-    make skywater-pdk > /dev/null
-    done
-else
-    cnt=0
-    until make skywater-library; do
-    cnt=$((cnt+1))
-    if [ $cnt -eq 5 ]; then
-        exit 2
-    fi
-    rm -rf $PDK_ROOT/skywater-pdk
-    make skywater-pdk > /dev/null
-    done
-fi
-cd ..
-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"
-exit 0