From b817aac1eec37c7f6ea57bed8e172c5395e29b7b Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Mon, 30 Dec 2024 15:14:41 -0800 Subject: [PATCH] ci: update the cache keys --- .github/workflows/CI.yml | 10 ++++------ .github/workflows/docs.yml | 9 ++++----- package.json | 1 - 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 21e62cfa..5b1b3262 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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 }} @@ -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: | @@ -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 }}" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b13a696f..b7cbb54a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -20,8 +20,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 }} @@ -29,17 +27,18 @@ jobs: 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: | diff --git a/package.json b/package.json index 94cec5c3..46e4a7ef 100644 --- a/package.json +++ b/package.json @@ -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",