Skip to content

Commit cd7f46a

Browse files
author
Akash Satheesan
committed
chore(ci): rewrite CI workflow
Nearly completely replace the original GitHub actions workflow. Changes: - Move from `.sh` files in `ci/steps` to steps in the workflow. - Move from using docker images for environment to manual setup. - Upgrade nfpm to v2.3.1 BREAKING CHANGE: official builds no longer support CentOS 7. If you need to use CentOS 7, build `code-server` locally. For docs, See the yarn/npm section in `docs/install.md`.
1 parent 8ed5b73 commit cd7f46a

File tree

14 files changed

+280
-210
lines changed

14 files changed

+280
-210
lines changed

.github/workflows/ci.yaml

+246-109
Large diffs are not rendered by default.

ci/build/build-packages.sh

+6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ main() {
88
cd "$(dirname "${0}")/../.."
99
source ./ci/lib.sh
1010

11+
# Allow us to override architecture
12+
# we use this for our Linux ARM64 cross compile builds
13+
if [ "$#" -eq 1 ] && [ "$1" ]; then
14+
ARCH=$1
15+
fi
16+
1117
mkdir -p release-packages
1218

1319
release_archive

ci/build/nfpm.yaml

+13-7
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,16 @@ description: |
1010
vendor: "Coder"
1111
homepage: "https://github.com/cdr/code-server"
1212
license: "MIT"
13-
files:
14-
./ci/build/code-server-nfpm.sh: /usr/bin/code-server
15-
./ci/build/[email protected]: /usr/lib/systemd/system/[email protected]
16-
# Only included for backwards compat with previous releases that shipped
17-
# the user service. See #1997
18-
./ci/build/code-server-user.service: /usr/lib/systemd/user/code-server.service
19-
./release-standalone/**/*: "/usr/lib/code-server/"
13+
14+
contents:
15+
- src: ./ci/build/code-server-nfpm.sh
16+
dst: /usr/bin/code-server
17+
18+
- src: ./ci/build/[email protected]
19+
dst: /usr/lib/systemd/system/[email protected]
20+
21+
- src: ./ci/build/code-server-user.service
22+
dst: /usr/lib/systemd/user/code-server.service
23+
24+
- src: ./release-standalone/**/*
25+
dst: /usr/lib/code-server/

ci/images/centos7/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ ENV PATH=/usr/local/go/bin:$GOPATH/bin:$PATH
2626

2727
# Install Go dependencies
2828
ENV GO111MODULE=on
29-
RUN go get github.com/goreleaser/nfpm/cmd/nfpm@v1.9.0
29+
RUN go get github.com/goreleaser/nfpm/cmd/nfpm@v2.3.1
3030

3131
RUN curl -fsSL https://get.docker.com | sh

ci/images/debian10/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ ENV PATH=/usr/local/go/bin:$GOPATH/bin:$PATH
3939

4040
# Install Go dependencies
4141
ENV GO111MODULE=on
42-
RUN go get github.com/goreleaser/nfpm/cmd/nfpm@v1.9.0
42+
RUN go get github.com/goreleaser/nfpm/cmd/nfpm@v2.3.1
4343

4444
RUN VERSION="$(curl -fsSL https://storage.googleapis.com/kubernetes-release/release/stable.txt)" && \
4545
curl -fsSL "https://storage.googleapis.com/kubernetes-release/release/$VERSION/bin/linux/amd64/kubectl" > /usr/local/bin/kubectl \

ci/steps/fmt.sh

-12
This file was deleted.

ci/steps/lint.sh

-12
This file was deleted.

ci/steps/release-packages.sh

-26
This file was deleted.

ci/steps/release.sh

-17
This file was deleted.

ci/steps/test-e2e.sh

-12
This file was deleted.

ci/steps/test-unit.sh

-12
This file was deleted.

docs/install.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ commands presented in the rest of this document.
8888

8989
## Debian, Ubuntu
9090

91+
NOTE: The standalone .deb does not support Ubuntu <16.04.
92+
Please upgrade or [build with yarn](#yarn-npm).
93+
9194
```bash
9295
curl -fOL https://github.com/cdr/code-server/releases/download/v3.9.2/code-server_3.9.2_amd64.deb
9396
sudo dpkg -i code-server_3.9.2_amd64.deb
@@ -97,6 +100,9 @@ sudo systemctl enable --now code-server@$USER
97100

98101
## Fedora, CentOS, RHEL, SUSE
99102

103+
NOTE: The standalone .rpm does not support CentOS 7.
104+
Please upgrade or [build with yarn](#yarn-npm).
105+
100106
```bash
101107
curl -fOL https://github.com/cdr/code-server/releases/download/v3.9.2/code-server-3.9.2-amd64.rpm
102108
sudo rpm -i code-server-3.9.2-amd64.rpm
@@ -139,7 +145,7 @@ To upgrade run: `yarn global upgrade code-server --latest`
139145
We recommend installing with `yarn` or `npm` when:
140146

141147
1. You aren't on `amd64` or `arm64`.
142-
2. If you're on Linux with glibc < v2.17 or glibcxx < v3.4.18
148+
2. If you're on Linux with glibc < v2.23 or glibcxx < v3.4.21
143149
3. You're running Alpine Linux. See [#1430](https://github.com/cdr/code-server/issues/1430#issuecomment-629883198)
144150

145151
**note:** Installing via `yarn` or `npm` builds native modules on install and so requires C dependencies.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"parcel-bundler": "^1.12.4",
6666
"prettier": "^2.2.1",
6767
"prettier-plugin-sh": "^0.6.0",
68+
"shellcheck": "^1.0.0",
6869
"stylelint": "^13.0.0",
6970
"stylelint-config-recommended": "^4.0.0",
7071
"ts-node": "^9.1.1",

yarn.lock

+5
Original file line numberDiff line numberDiff line change
@@ -6903,6 +6903,11 @@ shebang-regex@^3.0.0:
69036903
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
69046904
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
69056905

6906+
shellcheck@^1.0.0:
6907+
version "1.0.0"
6908+
resolved "https://registry.yarnpkg.com/shellcheck/-/shellcheck-1.0.0.tgz#263479d92c3708d63d98883f896481461cf17cd0"
6909+
integrity sha512-CdKbWXOknBwE1wNQzAnwfLf7QNOu/yqyLSGBKoq2WuChEqfg7dnZJ1pHR2P463PbVpBRz3KGkYnXJCoQrPwtYA==
6910+
69066911
signal-exit@^3.0.2:
69076912
version "3.0.3"
69086913
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"

0 commit comments

Comments
 (0)