Skip to content

Commit 3a49299

Browse files
author
Akash Satheesan
authored
dev(ci): complete refactor
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 arm64 builds no longer support CentOS 7. If you need to use CentOS 7 on arm64, build `code-server` locally. For docs, see the yarn/npm section in `docs/install.md`.
1 parent 53ba8f8 commit 3a49299

File tree

15 files changed

+337
-209
lines changed

15 files changed

+337
-209
lines changed

.github/workflows/ci.yaml

+302-95
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/audit.sh

-12
This file was deleted.

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

+8-2
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ commands presented in the rest of this document.
8989

9090
## Debian, Ubuntu
9191

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

99102
## Fedora, CentOS, RHEL, SUSE
100103

104+
NOTE: The standalone arm64 .rpm does not support CentOS 7.
105+
Please upgrade or [build with yarn](#yarn-npm).
106+
101107
```bash
102108
curl -fOL https://github.com/cdr/code-server/releases/download/v3.9.2/code-server-3.9.2-amd64.rpm
103109
sudo rpm -i code-server-3.9.2-amd64.rpm
@@ -157,8 +163,8 @@ For more context, see [comment](https://github.com/cdr/code-server/issues/1730#i
157163
We recommend installing with `yarn` or `npm` when:
158164

159165
1. You aren't on `amd64` or `arm64`.
160-
2. If you're on Linux with glibc < v2.17 or glibcxx < v3.4.18
161-
3. You're running Alpine Linux. See [#1430](https://github.com/cdr/code-server/issues/1430#issuecomment-629883198)
166+
2. If you're on Linux with glibc < v2.17 or glibcxx < v3.4.18 on amd64, or glibc < v2.23 or glibcxx < v3.4.21 on arm64.
167+
3. You're running Alpine Linux, or are using a non-glibc libc. See [#1430](https://github.com/cdr/code-server/issues/1430#issuecomment-629883198)
162168

163169
**note:** Installing via `yarn` or `npm` builds native modules on install and so requires C dependencies.
164170
See [./npm.md](./npm.md) for installing these dependencies.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"parcel-bundler": "^1.12.4",
6969
"prettier": "^2.2.1",
7070
"prettier-plugin-sh": "^0.6.0",
71+
"shellcheck": "^1.0.0",
7172
"stylelint": "^13.0.0",
7273
"stylelint-config-recommended": "^4.0.0",
7374
"ts-node": "^9.1.1",

yarn.lock

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

7035+
shellcheck@^1.0.0:
7036+
version "1.0.0"
7037+
resolved "https://registry.yarnpkg.com/shellcheck/-/shellcheck-1.0.0.tgz#263479d92c3708d63d98883f896481461cf17cd0"
7038+
integrity sha512-CdKbWXOknBwE1wNQzAnwfLf7QNOu/yqyLSGBKoq2WuChEqfg7dnZJ1pHR2P463PbVpBRz3KGkYnXJCoQrPwtYA==
7039+
70357040
signal-exit@^3.0.2:
70367041
version "3.0.3"
70377042
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"

0 commit comments

Comments
 (0)