Improve build time in CI through caching native modules (#482)

* Improve caching of hak native modules

* Avoid double-hashing

* Skip native installs where cache is hit

* Include Electron version in the hash, it affects the ABI

* Add missing step IDs

* Add comments
This commit is contained in:
Michael Telatynski
2022-12-13 14:12:40 +00:00
committed by GitHub
parent 6508e171db
commit 2f48519dce
4 changed files with 30 additions and 4 deletions

View File

@@ -26,6 +26,12 @@ jobs:
- name: Fetch Element Web
run: yarn run fetch --noverify -d ${{ inputs.config }} ${{ inputs.version }}
# We split this out to save the build_* scripts having to do it to make use of `hashFiles` in the cache action
- name: Generate cache hash files
run: |
yarn run --silent electron --version > electronVersion
cat package.json | jq -c .hakDependencies > hakDependencies.json
- uses: actions/upload-artifact@v3
with:
name: webapp
@@ -33,3 +39,5 @@ jobs:
path: |
webapp.asar
package.json
electronVersion
hakDependencies.json