From d7f2ffaa1ebc6dc7ab140406f5eaa9c3921fcf1f Mon Sep 17 00:00:00 2001 From: Henry Heino <46334387+personalizedrefrigerator@users.noreply.github.com> Date: Thu, 12 Jun 2025 14:19:10 -0700 Subject: [PATCH] Chore: CI: Windows: Skip installing Rust (#12502) --- .../workflows/shared/setup-build-environment/action.yml | 1 + .github/workflows/ui-tests.yml | 5 +++++ packages/onenote-converter/build.js | 7 +++++++ 3 files changed, 13 insertions(+) diff --git a/.github/workflows/shared/setup-build-environment/action.yml b/.github/workflows/shared/setup-build-environment/action.yml index 6087de9263..2a0f49cdb8 100644 --- a/.github/workflows/shared/setup-build-environment/action.yml +++ b/.github/workflows/shared/setup-build-environment/action.yml @@ -49,6 +49,7 @@ runs: - uses: olegtarasov/get-tag@v2.1.4 - uses: dtolnay/rust-toolchain@stable + if: ${{ runner.os != 'Windows' }} - uses: actions/setup-node@v4 with: node-version: '18.18.0' diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml index 5aa16dfe0a..96b00b7941 100644 --- a/.github/workflows/ui-tests.yml +++ b/.github/workflows/ui-tests.yml @@ -16,6 +16,11 @@ jobs: uses: ./.github/workflows/shared/setup-build-environment - name: Build run: yarn install + env: + # The onenote-converter package uses Rust, which isn't installed on all CI + # runners. Since the onenote-converter doesn't have UI tests, it can be excluded + # from build: + SKIP_ONENOTE_CONVERTER_BUILD: 1 - name: Run UI tests shell: bash run: | diff --git a/packages/onenote-converter/build.js b/packages/onenote-converter/build.js index 67fd5cc300..24624e89dd 100644 --- a/packages/onenote-converter/build.js +++ b/packages/onenote-converter/build.js @@ -13,6 +13,13 @@ async function main() { return; } + // Sometimes the onenote-converter build needs to be disabled in CI. + if (process.env.SKIP_ONENOTE_CONVERTER_BUILD) { + // eslint-disable-next-line no-console + console.info('SKIP_ONENOTE_CONVERTER_BUILD was set. The onenote-converter package will not be built.'); + return; + } + const argv = yargs.argv; if (!argv.profile) throw new Error('OneNote build: profile value is missing'); if (!['release', 'dev'].includes(argv.profile)) throw new Error('OneNote build: profile value is invalid');