-
Notifications
You must be signed in to change notification settings - Fork 123
87 lines (77 loc) · 2.61 KB
/
log4cxx-windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: log4cxx-windows
on: [push, pull_request]
jobs:
job:
name: ${{ matrix.os }}-${{ matrix.cxx }}-build-and-test
runs-on: ${{ matrix.os }}
timeout-minutes: 38
strategy:
fail-fast: false
matrix:
name: [windows-2019, windows-2022]
include:
- name: windows-2019
os: windows-2019
- name: windows-2022
os: windows-2022
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false # do not persist auth token in the local git config
path: main
- name: 'Restore Prebuilt Dependencies'
id: restore-vcpkg-cache
uses: actions/cache@v3
with:
path: vcpkg
key: ${{ runner.os }}-${{ matrix.name }}-cache-x64
- name: 'Checkout VCPKG'
if: steps.restore-vcpkg-cache.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: microsoft/vcpkg
path: vcpkg
ref: 2024.01.12
- name: 'Configure Dependencies'
if: steps.restore-vcpkg-cache.outputs.cache-hit != 'true'
id: runvcpkg
shell: pwsh
run: |
cd vcpkg
./bootstrap-vcpkg.bat
./vcpkg install apr apr-util fmt --triplet=x64-windows
- name: 'Install zip'
id: install-zip
shell: pwsh
run: |
$Env:PATH += ";C:\msys64\usr\bin"
pacman --noconfirm -S zip
- name: 'run cmake'
shell: pwsh
run: |
$THISDIR=Get-Location
cd main
mkdir build
cd build
cmake -DLOG4CXX_TEST_PROGRAM_PATH=C:\msys64\usr\bin -DLOG4CXX_CHAR=wchar_t -DLOG4CXX_ENABLE_ODBC=on "-DCMAKE_TOOLCHAIN_FILE=$THISDIR/vcpkg/scripts/buildsystems/vcpkg.cmake" ..
cmake --build .
- name: run unit tests
shell: pwsh
run: |
cd main
cd build
ctest -C Debug --output-on-failure -V