Skip to content

Commit a372bd7

Browse files
Update build.yml
1 parent 6a68643 commit a372bd7

File tree

1 file changed

+16
-23
lines changed

1 file changed

+16
-23
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,34 +21,27 @@ jobs:
2121
with:
2222
node-version: '20.18.1'
2323

24-
- name: Cache Yarn
25-
uses: actions/cache@v3
24+
- name: Install Python
25+
uses: actions/setup-python@v4
2626
with:
27-
path: |
28-
~/.npm
29-
~/.cache/yarn
30-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
31-
restore-keys: |
32-
${{ runner.os }}-yarn-
33-
34-
- name: Set up Python and MSVS
35-
run: |
36-
set PYTHON=C:\hostedtoolcache\windows\Python\3.9.0\x64\python.exe
37-
set GYP_MSVS_VERSION=2022
27+
python-version: '3.9'
28+
29+
- name: Install Visual Studio Build Tools
30+
run: npm install -g windows-build-tools@5.2.2
31+
shell: pwsh
3832

39-
- name: Fix OpenSSL Issue
33+
- name: Set up node-gyp environment
4034
run: |
41-
set npm_config_openssl_no_asm=true
35+
npm config set python "$(which python)"
36+
npm config set msvs_version 2019
37+
shell: bash
4238

43-
- name: Install Yarn
44-
run: npm install -g yarn && yarn config set ignore-engines true
39+
- name: Install dependencies
40+
run: yarn install --frozen-lockfile
4541

46-
- name: Clear Cache and Reinstall
47-
run: |
48-
npm cache clean --force
49-
yarn cache clean
50-
Remove-Item -Recurse -Force node_modules,yarn.lock -ErrorAction SilentlyContinue
51-
yarn install --frozen-lockfile
42+
- name: Force node-gyp rebuild
43+
run: yarn rebuild --arch=x64
44+
shell: bash
5245

5346
- name: Run build script
5447
run: .\build.bat

0 commit comments

Comments
 (0)