Skip to content

Commit eb3cf30

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

File tree

8 files changed

+62
-201
lines changed

8 files changed

+62
-201
lines changed

.github/workflows/code.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 0 additions & 113 deletions
This file was deleted.

.travis.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
target_commitish: $TRAVIS_COMMIT
36+
name: $TRAVIS_TAG
37+
file:
38+
- release/*.tar.gz
39+
- release/*.zip
40+
on:
41+
tags: true
42+
condition: $TRAVIS_BUILD_STAGE_NAME == Release
43+
44+
cache:
45+
timeout: 600
46+
yarn: true

ci/build.ts

Lines changed: 0 additions & 3 deletions
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/Dockerfile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,8 @@ FROM node:12
33
RUN apt-get update && apt-get install -y \
44
libxkbfile-dev \
55
libx11-dev \
6-
libsecret-1-dev \
7-
dumb-init
6+
libsecret-1-dev
87

98
RUN curl -L https://github.com/mvdan/sh/releases/download/v3.0.1/shfmt_v3.0.1_linux_amd64 > /usr/local/bin/shfmt && chmod +x /usr/local/bin/shfmt
109

11-
COPY entrypoint.sh /bin/entrypoint.sh
12-
13-
ENV PAGER=cat
14-
ENV CI=true
15-
16-
ENTRYPOINT ["dumb-init", "/bin/entrypoint.sh"]
10+
ENTRYPOINT ["/bin/bash", "-c"]

ci/image/entrypoint.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

ci/image/run.sh

Lines changed: 11 additions & 0 deletions
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 -e CI -e GITHUB_TOKEN -v "$(yarn cache dir):/usr/local/share/.cache/yarn/v6" -v "$PWD:/repo" -w /repo "$imageTag" "$*"
9+
}
10+
11+
main "$@"

ci/release.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,14 @@ 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
1414
export VERSION=$code_server_version
1515

16-
YARN_CACHE_FOLDER="$(pwd)/yarn-cache"
17-
export YARN_CACHE_FOLDER
18-
19-
# Always minify and package on tags since that's when releases are pushed.
20-
if [[ -n ${DRONE_TAG:-} || -n ${TRAVIS_TAG:-} ]]; then
16+
# Always minify and package on CI since that's when releases are pushed.
17+
if [[ ${CI:-} ]]; then
2118
export MINIFY="true"
2219
export PACKAGE="true"
2320
fi

0 commit comments

Comments
 (0)