Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ci build test #175

Merged
merged 8 commits into from
Jul 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,9 @@ fusion-studio-extension/src/browser/style/index.css
# integration test files
cypress/videos/*
cypress/screenshots/*

# private
.notes

# node-gyp
build/
114 changes: 85 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,103 @@
os:
- linux
- osx
dist: focal
osx_image:
- xcode9.3
- xcode11

language: node_js

node_js:
- "10"
- 10
- 12

services:
- docker

addons:
apt:
sources:
- ubuntu-toolchain-r-test
update: true
packages:
- libx11-dev
- libxkbfile-dev
- libgconf-2-4
homebrew:
update: true
packages:
- yarn

env:
global:
- 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

matrix:
include:
- os: linux
- 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.0/fusion-studio-api-0.1.0.xar
services:
- docker
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libx11-dev
- libxkbfile-dev
- libgconf2-4
before_install:
- API_XAR=https://github.com/evolvedbinary/fusion-studio-api/releases/download/0.1.1/fusion-studio-api-0.1.1.xar
- PYTHON=/usr/bin/python
before_script:
- 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:
after_success:
- yarn run cypress run --record
- os: osx
osx_image: xcode11
addons:
homebrew:
packages:
- yarn
# - os: windows

env:
global:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
- YARN_GPG=no
- name: Ubuntu Xenial (16.04) / NodeJS 12 / Python 2
env:
- PYTHON=/usr/bin/python
dist: xenial
node_js: 12

- name: Ubuntu Focal (20.04) / NodeJS 14 / Python 3
dist: focal
node_js: 14

- name: macOS Catalina (10.15) / NodeJS 10 / Python 3
os: osx
osx_image: xcode12
node_js: 10

- name: macOS Catalina (10.15) / NodeJS 12 / Python 3
os: osx
osx_image: xcode12
node_js: 12

allow_failures:
- name: Ubuntu Focal (20.04) / NodeJS 14 / Python 3
dist: focal
node_js: 14

- name: macOS Catalina (10.15) / NodeJS 12 / Python 3
os: osx
osx_image: xcode12
node_js: 12


before_install:
- python --version
- npm i -g node-gyp

install:
- yarn
Expand All @@ -51,7 +107,7 @@ install:
- yarn start &
- cd ..

before_script:
script:
- yarn test

before_cache:
Expand Down
31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <path to 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`



Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
"lerna": "3.22.1",
"node-sass": "4.14.1"
},
"resolutions": {
"node-gyp": "^7.0.0",
"node-pre-gyp": "^0.15.0"
},
"workspaces": [
"fusion-studio-extension",
"browser-app",
Expand Down