Skip to content

Commit

Permalink
.github/workflows/windows.yml: Use Ninja generator.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.7.x@1920351 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Ivan Zhakov committed Sep 1, 2024
1 parent 8f7086c commit 4591313
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ jobs:
- name: Default
os: windows-latest
triplet: x64-windows
toolset: v143
arch: x64
build-type: Debug
generator: "Visual Studio 17 2022"
generator: Ninja
fail-fast: false

name: "MSVC ${{ matrix.toolset }} ${{ matrix.arch }} [${{ matrix.build-type }}] test-static=${{ matrix.test-static }} on ${{ matrix.os }}"
name: "MSVC ${{ matrix.arch }} [${{ matrix.build-type }}] test-static=${{ matrix.test-static }} on ${{ matrix.os }}"
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
Expand All @@ -48,24 +47,39 @@ jobs:
path: apr

- name: Configure APR
run: cmake -B ${{github.workspace}}/apr/out/build -S ${{github.workspace}}/apr -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -G "${{ matrix.generator }}" -A ${{ matrix.arch }} -T ${{ matrix.toolset }} -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }}
cmake -B ${{github.workspace}}/apr/out/build -S ${{github.workspace}}/apr -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -G "${{ matrix.generator }}" -A ${{ matrix.arch }} -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
- name: Build APR
run: cmake --build ${{github.workspace}}/apr/out/build --config ${{ matrix.build-type }}
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }}
cmake --build ${{github.workspace}}/apr/out/build --config ${{ matrix.build-type }}
- name: Install APR
run: cmake --install ${{github.workspace}}/apr/out/build --config ${{ matrix.build-type }}
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }}
cmake --install ${{github.workspace}}/apr/out/build --config ${{ matrix.build-type }}
- uses: actions/checkout@v4
with:
path: apu

- name: Configure CMake
run: cmake -B ${{github.workspace}}/apu/build -S ${{github.workspace}}/apu -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DAPR_BUILD_TESTAPR=ON -DTEST_STATIC_LIBS=${{ matrix.test-static }} -G "${{ matrix.generator }}" -A ${{ matrix.arch }} -T ${{ matrix.toolset }} -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }}
cmake -B ${{github.workspace}}/apu/build -S ${{github.workspace}}/apu -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DAPR_BUILD_TESTAPR=ON -DTEST_STATIC_LIBS=${{ matrix.test-static }} -G "${{ matrix.generator }}" -A ${{ matrix.arch }} -T ${{ matrix.toolset }} -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/apu/build --config ${{ matrix.build-type }}
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }}
cmake --build ${{github.workspace}}/apu/build --config ${{ matrix.build-type }}
- name: Test
working-directory: ${{github.workspace}}/apu/build
Expand Down

0 comments on commit 4591313

Please sign in to comment.