Skip to content
Snippets Groups Projects
Commit 04e04e8c authored by Sam Thursfield's avatar Sam Thursfield
Browse files

ci: Cache downloaded nw.js tarball

This saves time and bandwidth.

Closes jwilkes/purr-data#668
parent 40374b3d
No related merge requests found
# This file creates automated tests on GitLab CI for Purr Data. # This file creates automated tests on GitLab CI for Purr Data.
# See https://docs.gitlab.com/ee/ci/yaml/README.html for details of the format. # See https://docs.gitlab.com/ee/ci/yaml/README.html for details of the format.
cache:
key: global-cache
# These are script snippets used in the jobs defined below. # These are script snippets used in the jobs defined below.
.fetch_nwjs: &fetch_nwjs
- nwjs_filename=$(l2ork_addons/nwjs_version_for_platform.sh)
- if [ -e /cache/$nwjs_filename ]; then cp /cache/$nwjs_filename ./l2ork_addons ; fi
.debian_image_preparation: &debian_image_preparation .debian_image_preparation: &debian_image_preparation
- echo "" | sudo -S apt-get -qq purge -y pd-l2ork > /dev/null || echo "couldn't purge..." - echo "" | sudo -S apt-get -qq purge -y pd-l2ork > /dev/null || echo "couldn't purge..."
- echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y update > /dev/null - echo "" | sudo -S DEBIAN_FRONTEND=noninteractive apt-get -qq -y update > /dev/null
...@@ -12,6 +19,7 @@ ...@@ -12,6 +19,7 @@
- cd l2ork_addons - cd l2ork_addons
- export V=0 - export V=0
- ./tar_em_up.sh $BUILD_TYPE_FLAG - ./tar_em_up.sh $BUILD_TYPE_FLAG
- cp nwjs-* /cache/
- cd .. - cd ..
- echo -e "section_end:`date +%s`:build_all\r\e[0K" - echo -e "section_end:`date +%s`:build_all\r\e[0K"
...@@ -46,6 +54,7 @@ debian_stretch_x86_64_deb: ...@@ -46,6 +54,7 @@ debian_stretch_x86_64_deb:
BUILD_TYPE_FLAG: -B BUILD_TYPE_FLAG: -B
before_script: before_script:
- *debian_image_preparation - *debian_image_preparation
- *fetch_nwjs
script: script:
- *build_all - *build_all
- *test_linux - *test_linux
...@@ -64,6 +73,7 @@ ubuntu_16.04_x86_64_deb: ...@@ -64,6 +73,7 @@ ubuntu_16.04_x86_64_deb:
BUILD_TYPE_FLAG: -B BUILD_TYPE_FLAG: -B
before_script: before_script:
- *debian_image_preparation - *debian_image_preparation
- *fetch_nwjs
script: script:
- *build_all - *build_all
- *test_linux - *test_linux
...@@ -80,6 +90,8 @@ osx_10.11_x86_64_dmg: ...@@ -80,6 +90,8 @@ osx_10.11_x86_64_dmg:
- dmg - dmg
variables: variables:
BUILD_TYPE_FLAG: -X BUILD_TYPE_FLAG: -X
before_script:
- *fetch_nwjs
script: script:
- echo `pwd` - echo `pwd`
- *build_all - *build_all
...@@ -97,7 +109,8 @@ osx_10.8_x86_64_dmg: ...@@ -97,7 +109,8 @@ osx_10.8_x86_64_dmg:
- dmg - dmg
variables: variables:
BUILD_TYPE_FLAG: -X BUILD_TYPE_FLAG: -X
osx_version: 10.8 before_script:
- *fetch_nwjs
script: script:
- echo `pwd` - echo `pwd`
- *build_all - *build_all
...@@ -114,6 +127,8 @@ windows_i386_innosetup: ...@@ -114,6 +127,8 @@ windows_i386_innosetup:
- i386 - i386
variables: variables:
BUILD_TYPE_FLAG: -Z BUILD_TYPE_FLAG: -Z
before_script:
- *fetch_nwjs
script: script:
- echo `pwd` - echo `pwd`
- *build_all - *build_all
...@@ -133,6 +148,7 @@ raspbian_stretch_armv7l_deb: ...@@ -133,6 +148,7 @@ raspbian_stretch_armv7l_deb:
BUILD_TYPE_FLAG: -r BUILD_TYPE_FLAG: -r
before_script: before_script:
- *debian_image_preparation - *debian_image_preparation
- *fetch_nwjs
script: script:
- echo `pwd` - echo `pwd`
- *build_all - *build_all
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment