-
-
Notifications
You must be signed in to change notification settings - Fork 143
80 lines (70 loc) · 3.19 KB
/
test_windows22.yml
File metadata and controls
80 lines (70 loc) · 3.19 KB
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
name: Test on Windows 2022
on:
pull_request:
push:
paths:
- '.github/actions/**'
- '.github/workflows/test_windows22.yml'
- 'cmake/**'
- 'include/**'
- 'src/**'
- 'tests/**'
- 'CMakeLists.txt'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build_win:
runs-on: windows-2022
if: |
!contains(github.event.head_commit.message, '[test-macos]')
&& !contains(github.event.head_commit.message, '[test-linux]')
strategy:
fail-fast: false
matrix:
arch: [x64, x86]
bit7z_auto_format: [OFF, ON]
bit7z_detect_from_extension: [OFF, ON]
bit7z_regex_matching: [OFF, ON]
bit7z_use_native_string: [OFF, ON]
bit7z_auto_prefix_long_paths: [OFF, ON]
bit7z_use_system_codepage: [OFF, ON]
bit7z_path_sanitization: [OFF, ON]
bit7z_7zip_version: [23.01, 24.09]
exclude:
- bit7z_auto_format: OFF
bit7z_detect_from_extension: ON
- arch: x86
bit7z_7zip_version: 24.09
- arch: x86
bit7z_detect_from_extension: OFF
name: |
Windows (${{ matrix.arch }}), 7-Zip ${{ matrix.bit7z_7zip_version }}${{ (matrix.bit7z_auto_format == 'ON') && ', AUTO_FORMAT' || '' }}${{ (matrix.bit7z_detect_from_extension == 'ON') && ', DETECT_FROM_EXT' || '' }}${{ (matrix.bit7z_regex_matching == 'ON') && ', REGEX_MATCHING' || '' }}${{ matrix.bit7z_use_native_string == 'ON' && ', USE_NATIVE_STRING' || '' }}${{ matrix.bit7z_auto_prefix_long_paths == 'ON' && ', AUTO_PREFIX_LONG_PATHS' || '' }}${{ matrix.bit7z_use_system_codepage == 'ON' && ', USE_SYSTEM_CODEPAGE' || '' }}${{ matrix.bit7z_path_sanitization == 'ON' && ', PATH_SANITIZATION' || '' }}
steps:
- uses: actions/checkout@v4
- name: Cache x86 7z.dll
uses: actions/cache@v4
id: cache-x86-7z-dll
if: ${{ matrix.arch == 'x86' }}
with:
path: C:/Program Files (x86)/7-Zip/7z.dll
key: ${{ runner.os }}-${{ matrix.arch }}-7z.dll
- name: Install x86 7-Zip to get the 7z.dll
if: ${{ steps.cache-x86-7z-dll.outputs.cache-hit != 'true' && matrix.arch == 'x86' }}
shell: bash
run: |
curl -L https://7-zip.org/a/7z2301.exe --output 7z2301.exe
7z x 7z2301.exe 7z.dll -o"C:\Program Files (x86)\7-Zip"
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Building and testing bit7z
uses: ./.github/actions/ci_action
with:
arch: ${{ matrix.arch }}
c_compiler: cl
cpp_compiler: cl
sevenzip_version: ${{ matrix.bit7z_7zip_version }}
shell: pwsh
build_flags: |-
-DBIT7Z_TESTS_USE_SYSTEM_7ZIP=ON -DBIT7Z_AUTO_FORMAT=${{ matrix.bit7z_auto_format }} -DBIT7Z_DETECT_FROM_EXTENSION=${{ matrix.bit7z_detect_from_extension }} -DBIT7Z_REGEX_MATCHING=${{ matrix.bit7z_regex_matching }} -DBIT7Z_USE_NATIVE_STRING=${{ matrix.bit7z_use_native_string }} -DBIT7Z_AUTO_PREFIX_LONG_PATHS=${{ matrix.bit7z_auto_prefix_long_paths }} -DBIT7Z_USE_SYSTEM_CODEPAGE=${{ matrix.bit7z_use_system_codepage }} -DBIT7Z_PATH_SANITIZATION=${{ matrix.bit7z_path_sanitization }}