diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9eabf36155..0f77394b8a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,11 @@ jobs: with: python-version: "3.14" + - name: Setup node.js for rapydscript + uses: actions/setup-node@v6 + with: + node-version: "latest" + - name: Install calibre dependencies run: python setup/unix-ci.py install diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index fc88c36390..6662c11da9 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -51,6 +51,11 @@ jobs: languages: ${{ matrix.language }} trap-caching: false + - name: Setup node.js for rapydscript + uses: actions/setup-node@v6 + with: + node-version: "latest" + - name: Install calibre dependencies if: matrix.language == 'c' run: diff --git a/setup/unix-ci.py b/setup/unix-ci.py index d2f841283d..c110c5fc40 100644 --- a/setup/unix-ci.py +++ b/setup/unix-ci.py @@ -237,17 +237,21 @@ def check_dependencies() -> None: def main(): action = sys.argv[1] - if iswindows: - import runpy - m = runpy.run_path('setup/win-ci.py') - return m['main']() + if action == 'install': # WebEngine is flaky in macOS CI so install rapydscript so bootstrap wont fail - run('npm', 'install', 'rapydscript-ng') + npm = 'npm.cmd' if iswindows else 'npm' + run(npm, 'install', 'rapydscript-ng') root = subprocess.check_output(['npm', 'root']).decode().strip() with open(os.environ['GITHUB_PATH'], 'a') as f: print(os.path.abspath(os.path.join(root, '.bin')), file=f) + if iswindows: + import runpy + m = runpy.run_path('setup/win-ci.py') + return m['main']() + + if action == 'install': install_bundle() if not ismacos: install_linux_deps() diff --git a/setup/win-ci.py b/setup/win-ci.py index 0de19999bc..ec98877bb5 100644 --- a/setup/win-ci.py +++ b/setup/win-ci.py @@ -91,6 +91,7 @@ def main(): q = sys.argv[-1] setup_env() if q == 'bootstrap': + subprocess.check_call(['rapydscript', '--version']) build() elif q == 'test': test()