From 7a2f7d4ddc131e40e90c6543656567c465dcb607 Mon Sep 17 00:00:00 2001 From: Paul Traina <216482-pleasantone@users.noreply.gitlab.com> Date: Sun, 8 Nov 2020 23:36:55 -0800 Subject: [PATCH] Test gitlab runner cacheing ability --- .gitlab-ci.yml | 33 +++++++++++++++++++-------------- debian/source/options | 1 + 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 69a70cd..681affe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,10 +8,23 @@ default: image: ${DEFAULT_IMAGE} interruptible: true -# before_script: -# - echo "Before script section" -# - echo "For example you might run an update here or install a build dependency" -# - echo "Or perhaps you might print out some debugging details" +cache: + key: ${CI_COMMIT_REF_SLUG} + paths: + - .cache/ + +before_script: + - echo "Before script section" + - echo "For example you might run an update here or install a build dependency" + - echo "Or perhaps you might print out some debugging details" + - export APT_CACHE_DIR=`pwd`/.cache/apt && mkdir -pv $APT_CACHEDIR + - export NPM_CONFIG_CACHE=APT_CACHE_DIR=`pwd`/.cache/npm && mkdir -pv $NPM_CONFIG_CACHE + - dpkg --add-architecture i386 + - apt-get update + - apt-get -y install npm wine wine32 + - apt-get -y install git dh-make build-essential devscripts lintian diffutils patch quilt + - apt-get -y build-dep . + - npm install # after_script: # - echo "After script section" @@ -26,28 +39,20 @@ build: - build/* expire_in: 1 week script: - - dpkg --add-architecture i386 - - apt-get update - - apt-get -y install npm wine wine32 - - apt-get -y install git dh-make build-essential devscripts lintian diffutils patch quilt - - apt-get -y build-dep . - dpkg-buildpackage -uc -us - mkdir build build/debian - mv ../*.{deb,dsc,buildinfo,tar.xz,changes} build/debian/ - - debian/rules clean - - npm install - npm run dist - (cd package.nw/dist ; mv *.zip *.exe *.7z *.json ../../build) test: stage: test - script: - - npm install - - npm test only: - branches except: - master + script: + - npm test # test2: # stage: test diff --git a/debian/source/options b/debian/source/options index cf5d494..f4e0ba8 100644 --- a/debian/source/options +++ b/debian/source/options @@ -3,3 +3,4 @@ tar-ignore=.DS_Store tar-ignore=node_modules tar-ignore=package-lock.json tar-ignore=package.nw/dist +tar-ignore=.cache