mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-09 14:47:56 -05:00
chore(ci): cache node build in workflows
Building Node is failing often due to network error. Caching a successful build will allow more reliable workflows.
This commit is contained in:
28
.github/workflows/aws_tfhe_fast_tests.yml
vendored
28
.github/workflows/aws_tfhe_fast_tests.yml
vendored
@@ -191,10 +191,36 @@ jobs:
|
||||
run: |
|
||||
make test_user_doc
|
||||
|
||||
- name: Get Node version
|
||||
run: |
|
||||
echo "NODE_VERSION=$(make node_version)" >> "${GITHUB_ENV}"
|
||||
|
||||
- name: Node cache restoration
|
||||
id: node-cache
|
||||
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a #v4.1.2
|
||||
with:
|
||||
path: |
|
||||
~/.nvm
|
||||
~/.npm
|
||||
key: node-${{ env.NODE_VERSION }}
|
||||
|
||||
- name: Install Node
|
||||
if: steps.node-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
make install_node
|
||||
|
||||
- name: Node cache save
|
||||
uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a #v4.1.2
|
||||
if: steps.node-cache.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: |
|
||||
~/.nvm
|
||||
~/.npm
|
||||
key: node-${{ env.NODE_VERSION }}
|
||||
|
||||
- name: Run js on wasm API tests
|
||||
if: needs.should-run.outputs.wasm_test == 'true'
|
||||
run: |
|
||||
make install_node
|
||||
make test_nodejs_wasm_api_ci
|
||||
|
||||
- name: Gen Keys if required
|
||||
|
||||
28
.github/workflows/aws_tfhe_wasm_tests.yml
vendored
28
.github/workflows/aws_tfhe_wasm_tests.yml
vendored
@@ -55,9 +55,35 @@ jobs:
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- name: Install web resources
|
||||
- name: Get Node version
|
||||
run: |
|
||||
echo "NODE_VERSION=$(make node_version)" >> "${GITHUB_ENV}"
|
||||
|
||||
- name: Node cache restoration
|
||||
id: node-cache
|
||||
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a #v4.1.2
|
||||
with:
|
||||
path: |
|
||||
~/.nvm
|
||||
~/.npm
|
||||
key: node-${{ env.NODE_VERSION }}
|
||||
|
||||
- name: Install Node
|
||||
if: steps.node-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
make install_node
|
||||
|
||||
- name: Node cache save
|
||||
uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a #v4.1.2
|
||||
if: steps.node-cache.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: |
|
||||
~/.nvm
|
||||
~/.npm
|
||||
key: node-${{ env.NODE_VERSION }}
|
||||
|
||||
- name: Install web resources
|
||||
run: |
|
||||
make install_chrome_browser
|
||||
make install_chrome_web_driver
|
||||
|
||||
|
||||
28
.github/workflows/benchmark_wasm_client.yml
vendored
28
.github/workflows/benchmark_wasm_client.yml
vendored
@@ -102,9 +102,35 @@ jobs:
|
||||
with:
|
||||
toolchain: nightly
|
||||
|
||||
- name: Install web resources
|
||||
- name: Get Node version
|
||||
run: |
|
||||
echo "NODE_VERSION=$(make node_version)" >> "${GITHUB_ENV}"
|
||||
|
||||
- name: Node cache restoration
|
||||
id: node-cache
|
||||
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a #v4.1.2
|
||||
with:
|
||||
path: |
|
||||
~/.nvm
|
||||
~/.npm
|
||||
key: node-${{ env.NODE_VERSION }}
|
||||
|
||||
- name: Install Node
|
||||
if: steps.node-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
make install_node
|
||||
|
||||
- name: Node cache save
|
||||
uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a #v4.1.2
|
||||
if: steps.node-cache.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: |
|
||||
~/.nvm
|
||||
~/.npm
|
||||
key: node-${{ env.NODE_VERSION }}
|
||||
|
||||
- name: Install web resources
|
||||
run: |
|
||||
make install_${{ matrix.browser }}_browser
|
||||
make install_${{ matrix.browser }}_web_driver
|
||||
|
||||
|
||||
4
Makefile
4
Makefile
@@ -122,6 +122,10 @@ install_node:
|
||||
$(SHELL) -i -c 'nvm install $(NODE_VERSION)' || \
|
||||
( echo "Unable to install node, unknown error." && exit 1 )
|
||||
|
||||
.PHONY: node_version # Return Node version that will be installed
|
||||
node_version:
|
||||
@echo "$(NODE_VERSION)"
|
||||
|
||||
.PHONY: install_dieharder # Install dieharder for apt distributions or macOS
|
||||
install_dieharder:
|
||||
@dieharder -h > /dev/null 2>&1 || \
|
||||
|
||||
Reference in New Issue
Block a user