Skip to content

Commit

Permalink
.github/workflows/windows.yml: Install expat via vcpkg.
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@1920346 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Ivan Zhakov committed Sep 1, 2024
1 parent 87a9bd8 commit a7e53f2
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,28 @@ jobs:
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ${{ matrix.os }}

env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"

steps:
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install dependencies
run: vcpkg install --triplet ${{ matrix.triplet }} expat

- uses: actions/checkout@v4
with:
repository: apache/apr
ref: 1.7.x
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 }}
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

- name: Build APR
run: cmake --build ${{github.workspace}}/apr/out/build --config ${{ matrix.build-type }}
Expand All @@ -46,7 +59,7 @@ jobs:
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 }}
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

- name: Build
# Build your program with the given configuration
Expand Down

0 comments on commit a7e53f2

Please sign in to comment.