Skip to content

Commit 480f5e2

Browse files
committed
Add back travis since github actions is trash
1 parent 0d31a51 commit 480f5e2

File tree

6 files changed

+59
-185
lines changed

6 files changed

+59
-185
lines changed

.github/workflows/code.yml

-66
This file was deleted.

.github/workflows/release.yml

-113
This file was deleted.

.travis.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
language: minimal
2+
3+
jobs:
4+
include:
5+
- stage: Code
6+
name: Format
7+
script: ./ci/image/run.sh "yarn && yarn vscode && yarn fmt"
8+
- name: Lint
9+
script: ./ci/image/run.sh "yarn && yarn vscode && yarn lint"
10+
- name: Test
11+
script: ./ci/image/run.sh "yarn && yarn vscode && yarn test"
12+
13+
- stage: Release
14+
name: Linux Release
15+
script: travis_wait 60 ./ci/image/run.sh "yarn && yarn vscode && ci/release.sh"
16+
- name: Linux ARM64 Release
17+
script: travis_wait 60 ./ci/image/run.sh "yarn && yarn vscode && ci/release.sh"
18+
arch: arm64
19+
- name: MacOS Release
20+
os: osx
21+
language: node_js
22+
node_js: 12
23+
script: yarn && yarn vscode && travis_wait 60 ci/release.sh
24+
25+
stages:
26+
- name: Code
27+
- name: Release
28+
if: $TRAVIS_TAG != ""
29+
30+
deploy:
31+
- provider: releases
32+
edge: true
33+
draft: true
34+
tag_name: $TRAVIS_TAG
35+
name: $TRAVIS_TAG
36+
file:
37+
- release/*.tar.gz
38+
- release/*.zip
39+
on:
40+
tags: true
41+
condition: $TRAVIS_BUILD_STAGE_NAME == Release
42+
43+
cache:
44+
timeout: 600
45+
yarn: true

ci/build.ts

-3
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,6 @@ class Builder {
248248
if (process.env.MINIFY) {
249249
await this.task(`restricting ${name} to production dependencies`, async () => {
250250
await util.promisify(cp.exec)("yarn --production --ignore-scripts", { cwd: buildPath })
251-
if (name === "code-server") {
252-
await util.promisify(cp.exec)("yarn postinstall", { cwd: buildPath })
253-
}
254251
})
255252
}
256253
}

ci/image/run.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
main() {
6+
cd "$(dirname "$0")/../.."
7+
imageTag="$(docker build -q ci/image)"
8+
docker run -t --rm -v "$(yarn cache dir):/usr/local/share/.cache/yarn/v6" -v "$PWD:/repo" -w /repo "$imageTag" "$@"
9+
}
10+
11+
main "$@"

ci/release.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set -euo pipefail
77
function main() {
88
cd "$(dirname "${0}")/.."
99

10-
local code_server_version=${VERSION:-${TRAVIS_TAG:-${DRONE_TAG:-}}}
10+
local code_server_version=${VERSION-${TRAVIS_TAG-}}
1111
if [[ -z $code_server_version ]]; then
1212
code_server_version=$(grep version ./package.json | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[:space:]')
1313
fi
@@ -16,8 +16,8 @@ function main() {
1616
YARN_CACHE_FOLDER="$(pwd)/yarn-cache"
1717
export YARN_CACHE_FOLDER
1818

19-
# Always minify and package on tags since that's when releases are pushed.
20-
if [[ -n ${DRONE_TAG:-} || -n ${TRAVIS_TAG:-} ]]; then
19+
# Always minify and package on CI since that's when releases are pushed.
20+
if [[ ${CI-} ]]; then
2121
export MINIFY="true"
2222
export PACKAGE="true"
2323
fi

0 commit comments

Comments
 (0)