Skip to content

Commit

Permalink
Build debug and release in the same GitHub actions job
Browse files Browse the repository at this point in the history
  • Loading branch information
rikyoz committed Feb 8, 2025
1 parent d4f28b3 commit 7e5976c
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 27 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/test_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jobs:

matrix:
os: [macos-13, macos-14]
build_type: [Debug, Release]
c_compiler: [gcc-11, gcc-12, gcc-13, gcc-14, clang]
arch: [x64, arm64]
sevenzip_version: [23.01, 24.09]
Expand Down Expand Up @@ -65,7 +64,7 @@ jobs:
arch: arm64

name: |
macOS (${{ matrix.arch }}), ${{ matrix.c_compiler }}, ${{ matrix.build_type }}${{ matrix.bit7z_auto_format == 'ON' && ', AUTO_FORMAT' || '' }}${{ matrix.bit7z_regex_matching == 'ON' && ', REGEX_MATCHING' || '' }}${{ matrix.bit7z_link_libcpp == 'ON' && ', LINK_LIBCPP' || '' }}
macOS (${{ matrix.arch }}), ${{ matrix.c_compiler }}${{ matrix.bit7z_auto_format == 'ON' && ', AUTO_FORMAT' || '' }}${{ matrix.bit7z_regex_matching == 'ON' && ', REGEX_MATCHING' || '' }}${{ matrix.bit7z_link_libcpp == 'ON' && ', LINK_LIBCPP' || '' }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -94,14 +93,26 @@ jobs:
run:
brew install gcc@11

- name: Building and testing bit7z
- name: Building and testing bit7z (Debug)
uses: ./.github/actions/test_action
with:
arch: ${{ matrix.arch }}
c_compiler: ${{ matrix.c_compiler }}
cpp_compiler: ${{ matrix.cpp_compiler }}
sevenzip_version: ${{ matrix.sevenzip_version }}
enable_sanitizers: ${{ matrix.enable_sanitizers }}
build_type: ${{ matrix.build_type }}
build_flags: |
build_type: Debug
build_flags: |-
-DBIT7Z_TESTS_USE_SYSTEM_7ZIP=OFF -DBIT7Z_AUTO_FORMAT=${{ matrix.bit7z_auto_format }} -DBIT7Z_REGEX_MATCHING=${{ matrix.bit7z_regex_matching }} -DBIT7Z_LINK_LIBCPP=${{ matrix.bit7z_link_libcpp }}
- name: Building and testing bit7z (Release)
uses: ./.github/actions/test_action
with:
arch: ${{ matrix.arch }}
c_compiler: ${{ matrix.c_compiler }}
cpp_compiler: ${{ matrix.cpp_compiler }}
sevenzip_version: ${{ matrix.sevenzip_version }}
enable_sanitizers: ${{ matrix.enable_sanitizers }}
build_type: Release
build_flags: |-
-DBIT7Z_TESTS_USE_SYSTEM_7ZIP=OFF -DBIT7Z_AUTO_FORMAT=${{ matrix.bit7z_auto_format }} -DBIT7Z_REGEX_MATCHING=${{ matrix.bit7z_regex_matching }} -DBIT7Z_LINK_LIBCPP=${{ matrix.bit7z_link_libcpp }}
20 changes: 15 additions & 5 deletions .github/workflows/test_ubuntu22.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
matrix:
os: [ubuntu-22.04, ubuntu-22.04-arm]
arch: [x64, arm64]
build_type: [Debug, Release]
c_compiler: [gcc-9, gcc-10, gcc-11, gcc-12, clang-13, clang-14, clang-15]
bit7z_auto_format: [OFF, ON]
bit7z_regex_matching: [OFF, ON]
Expand Down Expand Up @@ -79,7 +78,7 @@ jobs:
bit7z_build_for_p7zip: ON

name: |
Ubuntu (${{ matrix.arch }}), ${{ matrix.c_compiler }}, ${{ 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_link_libcpp == 'ON') && ', LINK_LIBCPP' || '' }}${{ (matrix.bit7z_build_for_p7zip == 'ON') && ', BUILD_FOR_P7ZIP' || '' }}
Ubuntu (${{ matrix.arch }}), ${{ matrix.c_compiler }}, 7-Zip ${{ matrix.bit7z_7zip_version }}${{ (matrix.bit7z_auto_format == 'ON') && ', AUTO_FORMAT' || '' }}${{ (matrix.bit7z_regex_matching == 'ON') && ', REGEX_MATCHING' || '' }}${{ (matrix.bit7z_link_libcpp == 'ON') && ', LINK_LIBCPP' || '' }}${{ (matrix.bit7z_build_for_p7zip == 'ON') && ', BUILD_FOR_P7ZIP' || '' }}
steps:
- uses: actions/checkout@v4
Expand All @@ -94,13 +93,24 @@ jobs:
if: ${{ matrix.bit7z_link_libcpp == 'ON' && contains(matrix.c_compiler, 'clang-15') }}
run: sudo apt-get purge libc++-14-dev libc++abi-14-dev -y && sudo apt-get install libc++-15-dev libc++abi-15-dev -y

- name: Building and testing bit7z
- name: Building and testing bit7z (Debug)
uses: ./.github/actions/test_action
with:
arch: ${{ matrix.arch }}
c_compiler: ${{ matrix.c_compiler }}
cpp_compiler: ${{ matrix.cpp_compiler }}
sevenzip_version: ${{ matrix.bit7z_7zip_version }}
build_type: ${{ matrix.build_type }}
build_flags: |
build_type: Debug
build_flags: |-
-DBIT7Z_TESTS_USE_SYSTEM_7ZIP=${{ matrix.bit7z_build_for_p7zip }} -DBIT7Z_BUILD_FOR_P7ZIP=${{ matrix.bit7z_build_for_p7zip }} -DBIT7Z_AUTO_FORMAT=${{ matrix.bit7z_auto_format }} -DBIT7Z_REGEX_MATCHING=${{ matrix.bit7z_regex_matching }} -DBIT7Z_LINK_LIBCPP=${{ matrix.bit7z_link_libcpp }}
- name: Building and testing bit7z (Release)
uses: ./.github/actions/test_action
with:
arch: ${{ matrix.arch }}
c_compiler: ${{ matrix.c_compiler }}
cpp_compiler: ${{ matrix.cpp_compiler }}
sevenzip_version: ${{ matrix.bit7z_7zip_version }}
build_type: Release
build_flags: |-
-DBIT7Z_TESTS_USE_SYSTEM_7ZIP=${{ matrix.bit7z_build_for_p7zip }} -DBIT7Z_BUILD_FOR_P7ZIP=${{ matrix.bit7z_build_for_p7zip }} -DBIT7Z_AUTO_FORMAT=${{ matrix.bit7z_auto_format }} -DBIT7Z_REGEX_MATCHING=${{ matrix.bit7z_regex_matching }} -DBIT7Z_LINK_LIBCPP=${{ matrix.bit7z_link_libcpp }}
20 changes: 15 additions & 5 deletions .github/workflows/test_ubuntu24.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm]
arch: [x64, arm64]
build_type: [Debug, Release]
c_compiler: [gcc-13, gcc-14, clang-16, clang-17, clang-18]
bit7z_auto_format: [OFF, ON]
bit7z_regex_matching: [OFF, ON]
Expand Down Expand Up @@ -73,7 +72,7 @@ jobs:
bit7z_build_for_p7zip: ON

name: |
Ubuntu (${{ matrix.arch }}), ${{ matrix.c_compiler }}, ${{ 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_link_libcpp == 'ON') && ', LINK_LIBCPP' || '' }}${{ (matrix.bit7z_build_for_p7zip == 'ON') && ', BUILD_FOR_P7ZIP' || '' }}
Ubuntu (${{ matrix.arch }}), ${{ matrix.c_compiler }}, 7-Zip ${{ matrix.bit7z_7zip_version }}${{ (matrix.bit7z_auto_format == 'ON') && ', AUTO_FORMAT' || '' }}${{ (matrix.bit7z_regex_matching == 'ON') && ', REGEX_MATCHING' || '' }}${{ (matrix.bit7z_link_libcpp == 'ON') && ', LINK_LIBCPP' || '' }}${{ (matrix.bit7z_build_for_p7zip == 'ON') && ', BUILD_FOR_P7ZIP' || '' }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -116,13 +115,24 @@ jobs:
sudo mkdir -p /usr/lib/p7zip
sudo cp ${{ github.workspace }}/build/p7zip/bin/7z.so /usr/lib/p7zip/7z.so
- name: Building and testing bit7z
- name: Building and testing bit7z (Debug)
uses: ./.github/actions/test_action
with:
arch: ${{ matrix.arch }}
c_compiler: ${{ matrix.c_compiler }}
cpp_compiler: ${{ matrix.cpp_compiler }}
sevenzip_version: ${{ matrix.bit7z_7zip_version }}
build_type: ${{ matrix.build_type }}
build_flags: |
build_type: Debug
build_flags: |-
-DBIT7Z_TESTS_USE_SYSTEM_7ZIP=${{ matrix.bit7z_build_for_p7zip }} -DBIT7Z_BUILD_FOR_P7ZIP=${{ matrix.bit7z_build_for_p7zip }} -DBIT7Z_AUTO_FORMAT=${{ matrix.bit7z_auto_format }} -DBIT7Z_REGEX_MATCHING=${{ matrix.bit7z_regex_matching }} -DBIT7Z_LINK_LIBCPP=${{ matrix.bit7z_link_libcpp }}
- name: Building and testing bit7z (Release)
uses: ./.github/actions/test_action
with:
arch: ${{ matrix.arch }}
c_compiler: ${{ matrix.c_compiler }}
cpp_compiler: ${{ matrix.cpp_compiler }}
sevenzip_version: ${{ matrix.bit7z_7zip_version }}
build_type: Release
build_flags: |-
-DBIT7Z_TESTS_USE_SYSTEM_7ZIP=${{ matrix.bit7z_build_for_p7zip }} -DBIT7Z_BUILD_FOR_P7ZIP=${{ matrix.bit7z_build_for_p7zip }} -DBIT7Z_AUTO_FORMAT=${{ matrix.bit7z_auto_format }} -DBIT7Z_REGEX_MATCHING=${{ matrix.bit7z_regex_matching }} -DBIT7Z_LINK_LIBCPP=${{ matrix.bit7z_link_libcpp }}
20 changes: 15 additions & 5 deletions .github/workflows/test_windows19.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
fail-fast: false

matrix:
build_type: [Debug, Release]
bit7z_auto_format: [OFF, ON]
bit7z_regex_matching: [OFF, ON]
bit7z_use_native_string: [OFF, ON]
Expand All @@ -36,18 +35,29 @@ jobs:
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' || '' }}
Windows, 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
- name: Building and testing bit7z (Debug)
uses: ./.github/actions/test_action
with:
c_compiler: cl
cpp_compiler: cl
build_type: ${{ matrix.build_type }}
build_type: Debug
sevenzip_version: ${{ matrix.bit7z_7zip_version }}
shell: pwsh
build_flags: |
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 }}
- name: Building and testing bit7z (Release)
uses: ./.github/actions/test_action
with:
c_compiler: cl
cpp_compiler: cl
build_type: Release
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 }}
18 changes: 14 additions & 4 deletions .github/workflows/test_windows22.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
fail-fast: false

matrix:
build_type: [Debug, Release]
bit7z_auto_format: [OFF, ON]
bit7z_regex_matching: [OFF, ON]
bit7z_use_native_string: [OFF, ON]
Expand All @@ -41,13 +40,24 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Building and testing bit7z
- name: Building and testing bit7z (Debug)
uses: ./.github/actions/test_action
with:
c_compiler: cl
cpp_compiler: cl
build_type: ${{ matrix.build_type }}
build_type: Debug
sevenzip_version: ${{ matrix.bit7z_7zip_version }}
shell: pwsh
build_flags: |
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 }}
- name: Building and testing bit7z (Release)
uses: ./.github/actions/test_action
with:
c_compiler: cl
cpp_compiler: cl
build_type: Release
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 }}
17 changes: 14 additions & 3 deletions .github/workflows/test_windows25.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
fail-fast: false

matrix:
build_type: [Debug, Release]
bit7z_auto_format: [OFF, ON]
bit7z_regex_matching: [OFF, ON]
bit7z_use_native_string: [OFF, ON]
Expand All @@ -41,12 +40,24 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Building and testing bit7z
- name: Building and testing bit7z (Debug)
uses: ./.github/actions/test_action
with:
c_compiler: gcc
cpp_compiler: g++
build_type: ${{ matrix.build_type }}
build_type: Debug
sevenzip_version: ${{ matrix.bit7z_7zip_version }}
shell: bash
path: C:\msys64\usr\bin
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 }} -DBIT7Z_VS_LIBNAME_OUTDIR_STYLE=ON -G "MinGW Makefiles"
- name: Building and testing bit7z (Release)
uses: ./.github/actions/test_action
with:
c_compiler: gcc
cpp_compiler: g++
build_type: Release
sevenzip_version: ${{ matrix.bit7z_7zip_version }}
shell: bash
path: C:\msys64\usr\bin
Expand Down

0 comments on commit 7e5976c

Please sign in to comment.