From 421ecca1f7bfdf1446726a2f93771768ea1ebb3e Mon Sep 17 00:00:00 2001 From: Yohei Yukawa Date: Tue, 25 Jun 2024 04:59:08 +0000 Subject: [PATCH] Enable minimum CI for Windows bazel build As a preparation to support Bazel for Windows build (#948), we start enabling an experimental CI rule for Windows bazel build. #codehealth PiperOrigin-RevId: 646330047 --- .github/workflows/windows.yaml | 51 ++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml index 949fbd395..2ba47d3ba 100644 --- a/.github/workflows/windows.yaml +++ b/.github/workflows/windows.yaml @@ -74,6 +74,57 @@ jobs: path: src/out_win/Release/Mozc64.msi if-no-files-found: warn + build_bazel: + # https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md + runs-on: windows-2022 + timeout-minutes: 120 + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: 'recursive' + + - name: Set up pip + shell: cmd + working-directory: .\src + run: | + python -m pip install six requests + + - name: Try to restore update_deps cache + uses: actions/cache@v4 + with: + path: src/third_party_cache + key: update_deps-${{ runner.os }}-${{ hashFiles('src/build_tools/update_deps.py') }} + + - name: Install Dependencies + shell: cmd + working-directory: .\src + # This command uses src/third_party_cache as the download cache. + run: | + python build_tools/update_deps.py + + - name: Biuld Qt + shell: cmd + working-directory: .\src + run: | + python build_tools/build_qt.py --release --confirm_license + + # This is needed only for GitHub Actions where free disk space is quite limited. + - name: Delete Qt src to save disk space + shell: cmd + working-directory: .\src + run: | + rmdir third_party\qt_src /s /q + + - name: build artifacts + shell: cmd + working-directory: .\src + env: + ANDROID_NDK_HOME: "" + run: | + bazel --bazelrc=windows.bazelrc build //win32/installer:artifacts --config oss_windows --verbose_failures --cpu=x64_windows + test: # https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md runs-on: windows-2022