Skip to content

Commit

Permalink
ci: update the cache keys
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Dec 30, 2024
1 parent e498dcb commit b817aac
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ jobs:
cpp_arch: x64

env:
npm_config_zmq_draft: false
npm_config_zmq_shared: false
npm_config_arch: ${{ matrix.node_arch }}
npm_config_target_arch: ${{ matrix.node_arch }}
setup_node_arch: ${{ matrix.node_arch }}
Expand All @@ -63,9 +61,9 @@ jobs:
~/vcpkg
key:
# prettier-ignore
"cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch}}-ZMQ_DRAFT:${{env.npm_config_zmq_draft }}-${{hashFiles('./package.json') }}"
"cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch}}-${{hashFiles('./pnpm-lock.yaml', './vcpkg.json', './CMakeLists.txt') }}"
restore-keys: |
"cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch }}-ZMQ_DRAFT:${{ env.npm_config_zmq_draft }}-"
"cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch }}-"
- name: Env map
run: |
Expand Down Expand Up @@ -161,8 +159,8 @@ jobs:
max_attempts: 3
shell: bash
command: |
pnpm run test.unit || (rm -rf ./tmp && exit 1)
rm -rf ./tmp
pnpm run test.unit || (rm -rf ./tmp && mkdir -p ./tmp && exit 1)
rm -rf ./tmp && mkdir -p ./tmp
- name: Test Electron Windows/MacOS
if: "${{ !contains(matrix.os, 'ubuntu') && !matrix.dockerfile }}"
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,25 @@ jobs:
cpp_arch:
- x64
env:
npm_config_zmq_draft: false
npm_config_zmq_shared: false
npm_config_arch: ${{ matrix.node_arch }}
npm_config_target_arch: ${{ matrix.node_arch }}
setup_node_arch: ${{ matrix.node_arch }}

steps:
- uses: actions/checkout@v4


- name: Cache
uses: actions/cache@v4
with:
path: |
./node_modules/
./build/
~/vcpkg
key:
# prettier-ignore
"cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch}}-ZMQ_DRAFT:${{env.npm_config_zmq_draft }}-Node:${{ matrix.node_version}}-${{hashFiles('./package.json') }}-docs"
"docs-cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch}}-${{hashFiles('./pnpm-lock.yaml', './vcpkg.json', './CMakeLists.txt') }}"
restore-keys: |
"cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch }}-ZMQ_DRAFT:${{ env.npm_config_zmq_draft }}-Node:${{ matrix.node_version }}-"
"docs-cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch }}-"
- name: Env map
run: |
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@
"install": "node ./script/install.js",
"clean": "rimraf ./build ./prebuilds ./staging && run-p clean.lib clean.temp",
"clean.lib": "rimraf ./lib/",
"clean.release": "rimraf ./build/Release",
"clean.temp": "rimraf ./tmp && shx mkdir -p ./tmp",
"build.js": "run-s clean.lib && tsc -p ./src/tsconfig.json && run-s build.downlevel",
"build.downlevel": "downlevel-dts ./lib ./lib/ts3.7",
Expand Down

0 comments on commit b817aac

Please sign in to comment.