Update Travi CI distros (#1414)

* Update Travi CI distros

* Upgrade node to 12 and update CI scripts
This commit is contained in:
Felix Häusler 2019-10-02 03:15:25 +02:00 committed by Ran Luo
parent c0853f644b
commit 9325486547
3 changed files with 14 additions and 16 deletions

View File

@ -1,18 +1,20 @@
sudo: required
language: node_js
node_js:
- 10
- 12
matrix:
include:
- os: osx
osx_image: xcode9.2
osx_image: xcode9.4
env: CC=clang CXX=clang++ npm_config_clang=1 MARKTEXT_IS_STABLE=1 MARKTEXT_EXIT_ON_ERROR=1
compiler: clang
- os: linux
dist: trusty
dist: bionic
env: CC=clang CXX=clang++ npm_config_clang=1 MARKTEXT_IS_STABLE=1 MARKTEXT_EXIT_ON_ERROR=1 DISPLAY=:99.0
compiler: clang
services:
- xvfb
cache:
directories:
@ -53,7 +55,6 @@ install:
- yarn --version
# Fix cache between Linux and macOS build workers.
# - yarn cache clean vscode-ripgrep
- rm -rf node_modules/vscode-ripgrep
- yarn install --check-files --frozen-lockfile
@ -63,12 +64,11 @@ script:
- yarn run validate-licenses
# Unit and e2e tests
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then xvfb-run --server-args="-screen 0 1024x768x24" yarn run test ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then yarn run test ; fi
- yarn run test
# Build binaries
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then yarn run release:linux ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then yarn run release:mac ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then yarn run release:linux --publish always ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then yarn run release:mac --publish always ; fi
# Calculate checksums
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sha256sum build/marktext-*-x64.tar.gz ; fi

View File

@ -25,7 +25,7 @@ init:
- git config --global core.autocrlf input
install:
- ps: Install-Product node 10 $env:PLATFORM
- ps: Install-Product node 12 $env:PLATFORM
- node --version
- npm --version
@ -44,12 +44,10 @@ build_script:
- yarn run validate-licenses
- yarn run test
- yarn run release:win
- yarn run release:win --publish always
# calculate checksums
# Calculate checksums
- ps: get-filehash -Algorithm SHA256 "build\marktext-*.exe"
- ps: get-filehash -Algorithm SHA256 "build\marktext-*-win.zip"
test: off
# test_script:
# - yarn run test

View File

@ -7,9 +7,9 @@
"main": "./dist/electron/main.js",
"scripts": {
"release": "echo 'Please run \"build\" or \"release:{linux,mac,win}\"' && exit 1",
"release:linux": "node .electron-vue/build.js && electron-builder build --linux --publish always",
"release:mac": "node .electron-vue/build.js && electron-builder build --mac --publish always",
"release:win": "node .electron-vue/build.js && electron-builder build --win --publish always",
"release:linux": "node .electron-vue/build.js && electron-builder build --linux",
"release:mac": "node .electron-vue/build.js && electron-builder build --mac",
"release:win": "node .electron-vue/build.js && electron-builder build --win",
"build": "node .electron-vue/build.js && electron-builder",
"build:bin": "node .electron-vue/build.js && electron-builder --dir",
"build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js",