add pseudo-plru from ariane
[nmutil.git] / .gitlab-ci.yml
index 984f99b12ea71d12dbd907fdb355386b61fd3965..d6d41f247466586b86a95b4d6d5e8a88a7d59718 100644 (file)
@@ -1,25 +1,38 @@
 image: debian:10
 
+cache:
+    paths:
+        - ccache
+
 build:
     stage: build
-    script:
+    before_script:
         - apt-get update
         - >-
             apt-get -y install
             build-essential git python3-dev python3-pip
             python3-setuptools python3-wheel pkg-config tcl-dev
-            libreadline-dev bison flex libffi-dev
-
-        - git clone --depth 1 https://github.com/YosysHQ/yosys.git ../yosys
-        - pushd ../yosys
+            libreadline-dev bison flex libffi-dev ccache
+        - export PATH="/usr/lib/ccache:$PATH"
+        - export CCACHE_BASEDIR="$PWD"
+        - export CCACHE_DIR="$PWD/ccache"
+        - export CCACHE_COMPILERCHECK=content
+        - ccache --zero-stats || true
+        - ccache --show-stats || true
+    after_script:
+        - export CCACHE_DIR="$PWD/ccache"
+        - ccache --show-stats
+    script:
+        - git clone --depth 1 https://github.com/YosysHQ/yosys.git yosys
+        - pushd yosys
         - make config-gcc
         - make -j$(nproc)
         - make install
         - popd
         - yosys -V
 
-        - git clone --depth 1 https://github.com/nmigen/nmigen.git ../nmigen
-        - pushd ../nmigen
+        - git clone --depth 1 https://github.com/nmigen/nmigen.git nmigen
+        - pushd nmigen
         - python3 setup.py develop
         - popd