From 4d54ce358df80747783527f0e10e03cbce41ec6e Mon Sep 17 00:00:00 2001 From: Oz Date: Thu, 4 Jul 2024 18:12:05 +0200 Subject: [PATCH] Add Windows Server 2019 runner --- .../{test_windows.yml => test_windows19.yml} | 6 +-- .github/workflows/test_windows22.yml | 49 +++++++++++++++++++ 2 files changed, 52 insertions(+), 3 deletions(-) rename .github/workflows/{test_windows.yml => test_windows19.yml} (95%) create mode 100644 .github/workflows/test_windows22.yml diff --git a/.github/workflows/test_windows.yml b/.github/workflows/test_windows19.yml similarity index 95% rename from .github/workflows/test_windows.yml rename to .github/workflows/test_windows19.yml index a619217d..f37cea83 100644 --- a/.github/workflows/test_windows.yml +++ b/.github/workflows/test_windows19.yml @@ -1,10 +1,10 @@ -name: Test on Windows +name: Test on Windows 2019 on: pull_request: push: paths: - '.github/actions/**' - - '.github/workflows/test_windows.yml' + - '.github/workflows/test_windows19.yml' - 'cmake/**' - 'include/**' - 'src/**' @@ -13,7 +13,7 @@ on: jobs: build_win: - runs-on: windows-latest + runs-on: windows-2019 if: | !contains(github.event.head_commit.message, '[test-macos]') && !contains(github.event.head_commit.message, '[test-linux]') diff --git a/.github/workflows/test_windows22.yml b/.github/workflows/test_windows22.yml new file mode 100644 index 00000000..cffd9b7b --- /dev/null +++ b/.github/workflows/test_windows22.yml @@ -0,0 +1,49 @@ +name: Test on Windows 2022 +on: + pull_request: + push: + paths: + - '.github/actions/**' + - '.github/workflows/test_windows22.yml' + - 'cmake/**' + - 'include/**' + - 'src/**' + - 'tests/**' + - 'CMakeLists.txt' + +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: + build_type: [Debug, Release] + bit7z_auto_format: [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: [22.01, 23.01] + + name: | + Windows, ${{ matrix.build_type }}, 7-Zip ${{ matrix.bit7z_7zip_version }}${{ (matrix.bit7z_auto_format == 'ON') && ', AUTO_FORMAT' || '' }}${{ (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: Building and testing bit7z + uses: ./.github/actions/test_action + with: + c_compiler: cl + cpp_compiler: cl + build_type: ${{ matrix.build_type }} + sevenzip_version: ${{ matrix.bit7z_7zip_version }} + shell: pwsh + build_flags: | + -DBIT7Z_TESTS_USE_SYSTEM_7ZIP=ON -DBIT7Z_AUTO_FORMAT=${{ matrix.bit7z_auto_format }} -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 }} \ No newline at end of file