@@ -41,21 +41,17 @@ jobs:
41
41
- name : Install helm
42
42
43
43
44
- # NOTE@jsjoeio
45
- # disabling this until we can audit the build process
46
- # and the usefulness of this step
47
- # See: https://github.com/coder/code-server/issues/4287
48
- # - name: Fetch dependencies from cache
49
- # id: cache-yarn
50
- # uses: actions/cache@v2
51
- # with:
52
- # path: "**/node_modules"
53
- # key: yarn-build-${{ hashFiles('**/yarn.lock') }}
54
- # restore-keys: |
55
- # yarn-build-
44
+ - name : Fetch dependencies from cache
45
+ id : cache-yarn
46
+ uses : actions/cache@v2
47
+ with :
48
+ path : " **/node_modules"
49
+ key : yarn-build-${{ hashFiles('**/yarn.lock') }}
50
+ restore-keys : |
51
+ yarn-build-
56
52
57
53
- name : Install dependencies
58
- # if: steps.cache-yarn.outputs.cache-hit != 'true'
54
+ if : steps.cache-yarn.outputs.cache-hit != 'true'
59
55
run : yarn --frozen-lockfile
60
56
61
57
- name : Run yarn fmt
@@ -119,38 +115,30 @@ jobs:
119
115
with :
120
116
node-version : " 14"
121
117
122
- # TODO@Teffen investigate why this omits code-oss-dev/node_modules
123
- # - name: Fetch dependencies from cache
124
- # id: cache-yarn
125
- # uses: actions/cache@v2
126
- # with:
127
- # path: |
128
- # "**/node_modules"
129
- # "**/vendor/modules"
130
- # "**/lib/vscode/node_modules"
131
- # key: yarn-build-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/vendor/yarn.lock') }}
132
- # restore-keys: |
133
- # yarn-build-
118
+ - name : Fetch dependencies from cache
119
+ id : cache-yarn
120
+ uses : actions/cache@v2
121
+ with :
122
+ path : " **/node_modules"
123
+ key : yarn-build-${{ hashFiles('**/yarn.lock') }}
124
+ restore-keys : |
125
+ yarn-build-
134
126
135
127
- name : Install dependencies
136
- # if: steps.cache-yarn.outputs.cache-hit != 'true'
128
+ if : steps.cache-yarn.outputs.cache-hit != 'true'
137
129
run : yarn --frozen-lockfile
138
130
139
131
- name : Build code-server
140
132
run : yarn build
141
133
142
- # Parse the hash of the latest commit inside lib/vscode
143
- # use this to avoid rebuilding it if nothing changed
144
- # How it works: the `git log` command fetches the hash of the last commit
145
- # that changed a file inside `lib/vscode`. If a commit changes any file in there,
146
- # the hash returned will change, and we rebuild vscode. If the hash did not change,
147
- # (for example, a change to `src/` or `docs/`), we reuse the same build as last time.
148
- # This saves a lot of time in CI, as compiling VSCode can take anywhere from 5-10 minutes.
134
+ # Get Code's git hash. When this changes it means the content is
135
+ # different and we need to rebuild. Use VSCODE_CACHE_VERSION to force a
136
+ # rebuild.
149
137
- name : Get latest lib/vscode rev
150
138
id : vscode-rev
151
- run : echo "::set-output name=rev::$(jq -r '.devDependencies["code-oss-dev"]' lib/vscode/package.json | sed -r 's|.*#(.*)$|\1|' )"
139
+ run : echo "::set-output name=rev::$(git rev-parse HEAD:./ lib/vscode)"
152
140
153
- - name : Attempt to fetch vscode build from cache
141
+ - name : Fetch Code build from cache
154
142
id : cache-vscode-2
155
143
uses : actions/cache@v2
156
144
with :
0 commit comments