From 669bd25c845dcb5ec9daed634acbdee95574c61c Mon Sep 17 00:00:00 2001 From: Guilherme Vinicius Moreira <141650+guivinicius@users.noreply.github.com> Date: Sun, 27 Jun 2021 12:46:17 -0300 Subject: [PATCH] chore: add travis.yml file --- .travis.yml | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..e11ccfc --- /dev/null +++ b/.travis.yml @@ -0,0 +1,57 @@ +language: node_js + +node_js: + - "11.6.0" + +# Always run two parallel builds: one on mac and one on linux +# the linux build will use wine to be able to build windows and +# linux apps +matrix: + include: + - os: osx + osx_image: xcode10.2 + language: node_js + node_js: "10" + env: + - ELECTRON_CACHE=$HOME/.cache/electron + - ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder + + - os: linux + services: docker + language: generic + +cache: + directories: + - node_modules + - $HOME/.cache/electron + - $HOME/.cache/electron-builder + +# add git lfs for large file support +before_install: + - | + if [ "$TRAVIS_OS_NAME" == "osx" ]; then + mkdir -p /tmp/git-lfs && curl -L https://github.com/github/git-lfs/releases/download/v2.3.1/git-lfs-$([ "$TRAVIS_OS_NAME" == "linux" ] && echo "linux" || echo "darwin")-amd64-2.3.1.tar.gz | tar -xz -C /tmp/git-lfs --strip-components 1 + export PATH="/tmp/git-lfs:$PATH" + fi +before_script: + - git lfs pull + +script: + - | + if [ "$TRAVIS_OS_NAME" == "linux" ]; then + docker run --rm \ + --env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS|APPVEYOR_|CSC_|_TOKEN|_KEY|AWS_|STRIP|BUILD_') \ + -v ${PWD}:/project \ + -v ~/.cache/electron:/root/.cache/electron \ + -v ~/.cache/electron-builder:/root/.cache/electron-builder \ + electronuserland/builder:wine \ + /bin/bash -c "yarn --link-duplicates --pure-lockfile && yarn release --linux --win" + else + yarn release + fi +before_cache: + - rm -rf $HOME/.cache/electron-builder/wine + +branches: + except: + - "/^v\\d+\\.\\d+\\.\\d+$/"