Skip to content

Commit 97a4b37

Browse files
authored
feat: add node compile cache to build process (#3138)
## Proposed change feat: add node compile cache to build process <!-- Please include a summary of the changes and the related issue. Please also include relevant motivation and context. --> ## Related issues <!-- Please make sure to follow the [contribution guidelines](https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md) --> *- No issue associated -* <!-- * 🐛 Fix #issue --> <!-- * 🐛 Fix resolves #issue --> <!-- * 🚀 Feature #issue --> <!-- * 🚀 Feature resolves #issue --> <!-- * :octocat: Pull Request #issue -->
2 parents 50fbe07 + 5dbfd9e commit 97a4b37

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/main.yml

+9
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,21 @@ jobs:
4545
needs: [yarn_lock_check]
4646
env:
4747
NX_SKIP_NX_CACHE: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release') }}
48+
NODE_COMPILE_CACHE: ~/.cache/node-compilation
4849
steps:
4950
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5051
- uses: ./tools/github-actions/setup
5152
- uses: ./.github/actions/setup-java
5253
with:
5354
install-jdk: 'true'
55+
- name: Cache Node Compile
56+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
57+
with:
58+
path: |
59+
${{env.NODE_COMPILE_CACHE}}
60+
key: ${{ runner.os }}-node-compile-${{ hashFiles('yarn.lock') }}
61+
restore-keys: |
62+
${{ runner.os }}-node-compile
5463
- run: yarn build
5564
- uses: ./tools/github-actions/upload-build-output
5665

0 commit comments

Comments
 (0)