From db26bc964505af2ae3a15916defb54d9922c027e Mon Sep 17 00:00:00 2001 From: Duncan Paterson Date: Mon, 20 Jul 2020 15:01:26 +0200 Subject: [PATCH 1/8] testing all the environments see #174 --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5cf897e8..1d78fe89 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,14 @@ language: node_js node_js: + - "node" + - "12" - "10" matrix: include: - os: linux + dist: bionic env: - IMG=existdb/existdb:latest - API_XAR=https://github.com/evolvedbinary/fusion-studio-api/releases/download/0.1.0/fusion-studio-api-0.1.0.xar @@ -30,7 +33,7 @@ matrix: script: - yarn run cypress run --record - os: osx - osx_image: xcode11 + osx_image: xcode12 addons: homebrew: packages: From c9629564cfd82e57ef8c5d8e593530a6eb9a4a1e Mon Sep 17 00:00:00 2001 From: Adam Retter Date: Thu, 16 Jul 2020 18:51:06 +0200 Subject: [PATCH 2/8] Make sure to use the latest API --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1d78fe89..c16ab18c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,8 +10,8 @@ matrix: - os: linux dist: bionic env: - - IMG=existdb/existdb:latest - - API_XAR=https://github.com/evolvedbinary/fusion-studio-api/releases/download/0.1.0/fusion-studio-api-0.1.0.xar + - IMG=existdb/existdb:5.2.0 + - API_XAR=https://github.com/evolvedbinary/fusion-studio-api/releases/download/0.1.1/fusion-studio-api-0.1.1.xar services: - docker addons: From 671f12efb0bcbfa32babb60b728fcb669245d990 Mon Sep 17 00:00:00 2001 From: Duncan Paterson Date: Mon, 20 Jul 2020 15:08:40 +0200 Subject: [PATCH 3/8] add python, go to 18.04 ubuntu --- .travis.yml | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c16ab18c..fd340f3b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,5 @@ +os: linux +dist: bionic language: node_js node_js: @@ -7,8 +9,33 @@ node_js: matrix: include: - - os: linux - dist: bionic + - language: python + python: 2.7 + env: + - IMG=existdb/existdb:5.2.0 + - API_XAR=https://github.com/evolvedbinary/fusion-studio-api/releases/download/0.1.1/fusion-studio-api-0.1.1.xar + services: + - docker + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - libx11-dev + - libxkbfile-dev + - libgconf2-4 + before_install: + - docker pull $IMG + - docker create --name exist-ci -p 8080:8080 $IMG + - wget $API_XAR + - docker cp ./*.xar exist-ci:exist/autodeploy + - docker start exist-ci + - rm *.xar + - sleep 10 + script: + - yarn run cypress run --record + - language: python + python: 3.8 env: - IMG=existdb/existdb:5.2.0 - API_XAR=https://github.com/evolvedbinary/fusion-studio-api/releases/download/0.1.1/fusion-studio-api-0.1.1.xar From 102515eeb30aaa7d103c70a0312318d5b39d57e8 Mon Sep 17 00:00:00 2001 From: Duncan Paterson Date: Mon, 20 Jul 2020 18:12:43 +0200 Subject: [PATCH 4/8] force node-gyp > 7.0 see https://classic.yarnpkg.com/en/docs/selective-version-resolutions/#toc-limitations-Caveats --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index 8b8e7efa..6054b73c 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,9 @@ "lerna": "3.22.1", "node-sass": "4.14.1" }, + "resolutions": { + "node-gyp": "^7.0.0" + }, "workspaces": [ "fusion-studio-extension", "browser-app", From 814447f46d80e7743b468db79c21ff9d59941743 Mon Sep 17 00:00:00 2001 From: Duncan Paterson Date: Tue, 21 Jul 2020 13:04:57 +0200 Subject: [PATCH 5/8] add node-pre-gyp resolution some changes to gitignore documenting the saga --- .gitignore | 6 ++++++ package.json | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7df0a00b..db3155b6 100644 --- a/.gitignore +++ b/.gitignore @@ -74,3 +74,9 @@ fusion-studio-extension/src/browser/style/index.css # integration test files cypress/videos/* cypress/screenshots/* + +# private +.notes + +# node-gyp +build/ diff --git a/package.json b/package.json index 6054b73c..2a6ea100 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "node-sass": "4.14.1" }, "resolutions": { - "node-gyp": "^7.0.0" + "node-gyp": "^7.0.0", + "node-pre-gyp": "^0.15.0" }, "workspaces": [ "fusion-studio-extension", From f7b2886885f81cd0b501e11f8d3451f6a7e58801 Mon Sep 17 00:00:00 2001 From: Duncan Paterson Date: Tue, 21 Jul 2020 13:44:05 +0200 Subject: [PATCH 6/8] doc(readme): node-gyp errors of doom --- README.md | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 91792395..9fbf6b71 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,37 @@ If you don't know what Theia is, then you likely want the full [Fusion Studio ID * [Fusion Studio API](https://github.com/evolvedbinary/fusion-studio-api) a compatible exist or fusion database. #### For building -* [Node 10](https://nodejs.org/dist/v10.16.3/). Tested with v10.16.3 (it should be installed with [nvm](https://github.com/nvm-sh/nvm)) -* [Yarn](https://yarnpkg.com). Tested with v1.17.3 (it should be installed with [nvm](https://github.com/nvm-sh/nvm)). -* [Python 2](https://www.python.org/). Tested with 2.7.16 +* [Node 10](https://nodejs.org/dist/v10.16.3/) `>= 10.16.3` (it should be installed with [nvm](https://github.com/nvm-sh/nvm)) +* [Yarn](https://yarnpkg.com) `> 1.15.x`(it should be installed with [nvm](https://github.com/nvm-sh/nvm)). +* [Python](https://www.python.org/) (it should be installed with [pyenv](https://github.com/pyenv/pyenv)) + * Due to upstream constraints from [theia](https://theia-ide.org) we override the inherited hard dependency on Python 2. Systems that ship with python2 pre-installed fusion-studio should continue to build normally + * Build errors with node-gyp are unfortunately common on systems with multiple python installations. On systems that no longer include python2, or on macOS >10.14 we recommend using python 3.8, and configuring the build environment accordingly. The following assumes you used nvm and pyenv to install your desired versions. + 1. Make sure your system and shell use the correct python environment: + - ```bash + python --version + ``` + It should point to `Python 3.8.x` + - Set an environment variable to force node-gyp to use this version, e.g. `3.8.3` + ```bash + echo 'export NODE_GYP_FORCE_PYTHON="~/.pyenv/versions/3.8.3/bin/python3"' >> ~/.zshrc + ``` + For bash users replace `.zshrc` with `bashrc` + 1. Install node-gyp globally: + ```shell + npm i -g node-gyp + ``` + If prompted reinstall or update `npm`. + 1. If you are still encountering node-gyp related errors, set npm to always use the global node-gyp installation. + ``` + npm config set node_gyp + ``` * Windows platforms only: * Microsoft Visual Studio 2015 C++. Tested with Community Edition +* MacOS Catalina only: + * You might have to reinstall Xcode CLI tools, check [Catalina](https://github.com/nodejs/node-gyp/blob/master/macOS_Catalina.md) for a one line acid test, and to help you further debug problems. #### For Testing -* [cypress.js](https://www.cypress.io) v3.2.0 +* [cypress.js](https://www.cypress.io)`>=4.1.0` From dbae37d179734e267dbf177823c192a9a519ff07 Mon Sep 17 00:00:00 2001 From: Duncan Paterson Date: Tue, 21 Jul 2020 13:46:12 +0200 Subject: [PATCH 7/8] ci(travis): adjust the build --- .travis.yml | 130 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 76 insertions(+), 54 deletions(-) diff --git a/.travis.yml b/.travis.yml index fd340f3b..17f13ec7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,30 +1,40 @@ os: linux -dist: bionic +dist: xenial + language: node_js -node_js: - - "node" - - "12" - - "10" +services: + - docker + +addons: + apt: + sources: + - ubuntu-toolchain-r-test + update: true + packages: + - libx11-dev + - libxkbfile-dev + - libgconf-2-4 + homebrew: + update: true + packages: + - yarn -matrix: +env: + global: + - ELECTRON_CACHE=$HOME/.cache/electron + - ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder + - YARN_GPG=no + +jobs: include: - - language: python - python: 2.7 + - name: Ubuntu Xenial (16.04) / NodeJS 10 / Python 2 / Cypress + node_js: 10 env: - - IMG=existdb/existdb:5.2.0 + - IMG=existdb/existdb:latest - API_XAR=https://github.com/evolvedbinary/fusion-studio-api/releases/download/0.1.1/fusion-studio-api-0.1.1.xar - services: - - docker - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - libx11-dev - - libxkbfile-dev - - libgconf2-4 before_install: + - python --version - docker pull $IMG - docker create --name exist-ci -p 8080:8080 $IMG - wget $API_XAR @@ -34,44 +44,56 @@ matrix: - sleep 10 script: - yarn run cypress run --record - - language: python - python: 3.8 - env: - - IMG=existdb/existdb:5.2.0 - - API_XAR=https://github.com/evolvedbinary/fusion-studio-api/releases/download/0.1.1/fusion-studio-api-0.1.1.xar - services: - - docker - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - libx11-dev - - libxkbfile-dev - - libgconf2-4 + + - name: Ubuntu Xenial (16.04) / NodeJS 12 / Python 2 + node_js: 12 before_install: - - docker pull $IMG - - docker create --name exist-ci -p 8080:8080 $IMG - - wget $API_XAR - - docker cp ./*.xar exist-ci:exist/autodeploy - - docker start exist-ci - - rm *.xar - - sleep 10 - script: - - yarn run cypress run --record - - os: osx + - python --version + + - name: Ubuntu Focal (20.04) / NodeJS 10 / Python 3 + dist: focal + node_js: 10 + before_install: + - python --version + + - name: Ubuntu Focal (20.04) / NodeJS 12 / Python 3 + dist: focal + node_js: 12 + before_install: + - python --version + + - name: macOS High Sierra (10.13) / NodeJS 10 / Python 2 + os: osx + osx_image: xcode9.3 + node_js: 10 + before_install: + - python --version + + - name: macOS Catalina (10.15) / NodeJS 10 / Python 2 + os: osx osx_image: xcode12 - addons: - homebrew: - packages: - - yarn - # - os: windows + node_js: 10 + before_install: + - python --version -env: - global: - - ELECTRON_CACHE=$HOME/.cache/electron - - ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder - - YARN_GPG=no + - name: macOS Catalina (10.15) / NodeJS 10 / Python 3 + os: osx + osx_image: xcode12 + node_js: 10 + env: + - PYTHON=/usr/bin/python3 + before_install: + - $PYTHON --version + + allow_failures: + - name: Ubuntu Focal (20.04) / NodeJS 14 / Python 3 + dist: focal + node_js: 14 + before_install: + - python --version + + + # - os: windows install: - yarn From ba79cb9b7775d405af891e21f8df064d34898b55 Mon Sep 17 00:00:00 2001 From: Duncan Paterson Date: Tue, 21 Jul 2020 19:01:01 +0200 Subject: [PATCH 8/8] Refactor ci matrix (#1) * fix(ci): use exclude and allow_failure requires top level matrix expansion * (ci): refactor to remove duplicate matrix expansions * ci(travis): test global install * ci(travis): global python3 * fixup(ci): final cleanup --- .travis.yml | 78 ++++++++++++++++++++++++++++------------------------- 1 file changed, 41 insertions(+), 37 deletions(-) diff --git a/.travis.yml b/.travis.yml index 17f13ec7..c65074a4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,17 @@ -os: linux -dist: xenial +os: + - linux + - osx +dist: focal +osx_image: + - xcode9.3 + - xcode11 language: node_js +node_js: + - 10 + - 12 + services: - docker @@ -25,16 +34,26 @@ env: - ELECTRON_CACHE=$HOME/.cache/electron - ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder - YARN_GPG=no + - PYTHON=/usr/bin/python3 jobs: + exclude: + - os: osx + osx_image: xcode9.3 + node_js: 12 + - os: osx + osx_image: xcode11 + node_js: 12 + include: - name: Ubuntu Xenial (16.04) / NodeJS 10 / Python 2 / Cypress + dist: xenial node_js: 10 env: - IMG=existdb/existdb:latest - API_XAR=https://github.com/evolvedbinary/fusion-studio-api/releases/download/0.1.1/fusion-studio-api-0.1.1.xar - before_install: - - python --version + - PYTHON=/usr/bin/python + before_script: - docker pull $IMG - docker create --name exist-ci -p 8080:8080 $IMG - wget $API_XAR @@ -42,58 +61,43 @@ jobs: - docker start exist-ci - rm *.xar - sleep 10 - script: + after_success: - yarn run cypress run --record - name: Ubuntu Xenial (16.04) / NodeJS 12 / Python 2 + env: + - PYTHON=/usr/bin/python + dist: xenial node_js: 12 - before_install: - - python --version - - name: Ubuntu Focal (20.04) / NodeJS 10 / Python 3 - dist: focal - node_js: 10 - before_install: - - python --version - - - name: Ubuntu Focal (20.04) / NodeJS 12 / Python 3 + - name: Ubuntu Focal (20.04) / NodeJS 14 / Python 3 dist: focal - node_js: 12 - before_install: - - python --version - - - name: macOS High Sierra (10.13) / NodeJS 10 / Python 2 - os: osx - osx_image: xcode9.3 - node_js: 10 - before_install: - - python --version + node_js: 14 - - name: macOS Catalina (10.15) / NodeJS 10 / Python 2 + - name: macOS Catalina (10.15) / NodeJS 10 / Python 3 os: osx osx_image: xcode12 node_js: 10 - before_install: - - python --version - - name: macOS Catalina (10.15) / NodeJS 10 / Python 3 + - name: macOS Catalina (10.15) / NodeJS 12 / Python 3 os: osx osx_image: xcode12 - node_js: 10 - env: - - PYTHON=/usr/bin/python3 - before_install: - - $PYTHON --version + node_js: 12 allow_failures: - name: Ubuntu Focal (20.04) / NodeJS 14 / Python 3 dist: focal node_js: 14 - before_install: - - python --version + + - name: macOS Catalina (10.15) / NodeJS 12 / Python 3 + os: osx + osx_image: xcode12 + node_js: 12 - # - os: windows +before_install: + - python --version + - npm i -g node-gyp install: - yarn @@ -103,7 +107,7 @@ install: - yarn start & - cd .. -before_script: +script: - yarn test before_cache: