mirror of
https://github.com/marktext/marktext.git
synced 2025-05-03 14:52:15 +08:00
Update Travi CI distros (#1414)
* Update Travi CI distros * Upgrade node to 12 and update CI scripts
This commit is contained in:
parent
c0853f644b
commit
9325486547
16
.travis.yml
16
.travis.yml
@ -1,18 +1,20 @@
|
|||||||
sudo: required
|
sudo: required
|
||||||
language: node_js
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- 10
|
- 12
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: osx
|
- 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
|
env: CC=clang CXX=clang++ npm_config_clang=1 MARKTEXT_IS_STABLE=1 MARKTEXT_EXIT_ON_ERROR=1
|
||||||
compiler: clang
|
compiler: clang
|
||||||
- os: linux
|
- 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
|
env: CC=clang CXX=clang++ npm_config_clang=1 MARKTEXT_IS_STABLE=1 MARKTEXT_EXIT_ON_ERROR=1 DISPLAY=:99.0
|
||||||
compiler: clang
|
compiler: clang
|
||||||
|
services:
|
||||||
|
- xvfb
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
@ -53,7 +55,6 @@ install:
|
|||||||
- yarn --version
|
- yarn --version
|
||||||
|
|
||||||
# Fix cache between Linux and macOS build workers.
|
# Fix cache between Linux and macOS build workers.
|
||||||
# - yarn cache clean vscode-ripgrep
|
|
||||||
- rm -rf node_modules/vscode-ripgrep
|
- rm -rf node_modules/vscode-ripgrep
|
||||||
|
|
||||||
- yarn install --check-files --frozen-lockfile
|
- yarn install --check-files --frozen-lockfile
|
||||||
@ -63,12 +64,11 @@ script:
|
|||||||
- yarn run validate-licenses
|
- yarn run validate-licenses
|
||||||
|
|
||||||
# Unit and e2e tests
|
# Unit and e2e tests
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then xvfb-run --server-args="-screen 0 1024x768x24" yarn run test ; fi
|
- yarn run test
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then yarn run test ; fi
|
|
||||||
|
|
||||||
# Build binaries
|
# Build binaries
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then yarn run release:linux ; fi
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then yarn run release:linux --publish always ; fi
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then yarn run release:mac ; fi
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then yarn run release:mac --publish always ; fi
|
||||||
|
|
||||||
# Calculate checksums
|
# Calculate checksums
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sha256sum build/marktext-*-x64.tar.gz ; fi
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sha256sum build/marktext-*-x64.tar.gz ; fi
|
||||||
|
@ -25,7 +25,7 @@ init:
|
|||||||
- git config --global core.autocrlf input
|
- git config --global core.autocrlf input
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- ps: Install-Product node 10 $env:PLATFORM
|
- ps: Install-Product node 12 $env:PLATFORM
|
||||||
|
|
||||||
- node --version
|
- node --version
|
||||||
- npm --version
|
- npm --version
|
||||||
@ -44,12 +44,10 @@ build_script:
|
|||||||
- yarn run validate-licenses
|
- yarn run validate-licenses
|
||||||
- yarn run test
|
- 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-*.exe"
|
||||||
- ps: get-filehash -Algorithm SHA256 "build\marktext-*-win.zip"
|
- ps: get-filehash -Algorithm SHA256 "build\marktext-*-win.zip"
|
||||||
|
|
||||||
test: off
|
test: off
|
||||||
# test_script:
|
|
||||||
# - yarn run test
|
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
"main": "./dist/electron/main.js",
|
"main": "./dist/electron/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"release": "echo 'Please run \"build\" or \"release:{linux,mac,win}\"' && exit 1",
|
"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:linux": "node .electron-vue/build.js && electron-builder build --linux",
|
||||||
"release:mac": "node .electron-vue/build.js && electron-builder build --mac --publish always",
|
"release:mac": "node .electron-vue/build.js && electron-builder build --mac",
|
||||||
"release:win": "node .electron-vue/build.js && electron-builder build --win --publish always",
|
"release:win": "node .electron-vue/build.js && electron-builder build --win",
|
||||||
"build": "node .electron-vue/build.js && electron-builder",
|
"build": "node .electron-vue/build.js && electron-builder",
|
||||||
"build:bin": "node .electron-vue/build.js && electron-builder --dir",
|
"build:bin": "node .electron-vue/build.js && electron-builder --dir",
|
||||||
"build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js",
|
"build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js",
|
||||||
|
Loading…
Reference in New Issue
Block a user