From a767f9a93a88ff1ca7c0990b5d8f0aa59d0f6899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=85=E6=88=8E=E6=B0=8F?= Date: Thu, 7 Mar 2024 00:08:38 +0800 Subject: [PATCH] ci(windows): add msvc x64 build --- .github/workflows/windows-build.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 767475b79b..e90b73baad 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -16,9 +16,11 @@ jobs: fail-fast: false matrix: compiler: [msvc, clang] + arch: [x64] include: - { compiler: msvc, cc: cl, cxx: cl } - { compiler: clang, cc: clang, cxx: clang++ } + - { compiler: msvc, arch: x86, cross_arch: x64_x86 } env: boost_version: 1.84.0 BOOST_ROOT: ${{ github.workspace }}\deps\boost-1.84.0 @@ -47,7 +49,7 @@ jobs: if: ${{ matrix.compiler == 'msvc' }} uses: ilammy/msvc-dev-cmd@v1 with: - arch: x86 + arch: ${{ matrix.cross_arch || matrix.arch }} - name: Configure Ninja run: pip install ninja @@ -68,7 +70,7 @@ jobs: with: path: | ${{ env.BOOST_ROOT }}.7z - key: ${{ runner.os }}-boost-${{ env.boost_version }}-${{ matrix.compiler }}-src + key: ${{ runner.os }}-boost-${{ env.boost_version }}-src - name: Download Boost source if: steps.cache-boost-src.outputs.cache-hit != 'true' @@ -93,7 +95,7 @@ jobs: include lib share - key: ${{ runner.os }}-${{ matrix.compiler }}-${{ hashFiles('submodule-status') }} + key: ${{ runner.os }}-${{ matrix.compiler }}-${{ matrix.arch }}-${{ hashFiles('submodule-status') }} - name: Build dependencies if: steps.cache-deps.outputs.cache-hit != 'true' @@ -107,17 +109,17 @@ jobs: - name: Create distributable run: | - 7z a rime-${{ env.git_ref_name }}-${{ runner.os }}-${{ matrix.compiler }}.7z ` + 7z a rime-${{ env.git_ref_name }}-${{ runner.os }}-${{ matrix.compiler }}-${{ matrix.arch }}.7z ` dist version-info.txt - 7z a -x'!*/.placeholder' rime-deps-${{ env.git_ref_name }}-${{ runner.os }}-${{ matrix.compiler }}.7z ` + 7z a -x'!*/.placeholder' rime-deps-${{ env.git_ref_name }}-${{ runner.os }}-${{ matrix.compiler }}-${{ matrix.arch }}.7z ` bin include lib share - name: Upload artifacts uses: actions/upload-artifact@v3 with: path: | - rime-${{ env.git_ref_name }}-${{ runner.os }}-${{ matrix.compiler }}.7z - rime-deps-${{ env.git_ref_name }}-${{ runner.os }}-${{ matrix.compiler }}.7z + rime-${{ env.git_ref_name }}-${{ runner.os }}-${{ matrix.compiler }}-${{ matrix.arch }}.7z + rime-deps-${{ env.git_ref_name }}-${{ runner.os }}-${{ matrix.compiler }}-${{ matrix.arch }}.7z build-mingw: runs-on: windows-latest