Skip to content

Commit

Permalink
[Test] Fix build of 7z.so for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rikyoz committed Oct 28, 2023
1 parent 1dc18d2 commit 36f3e5b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
24 changes: 23 additions & 1 deletion .github/actions/test_action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,31 @@ runs:
-DCMAKE_BUILD_TYPE=${{ inputs.build_type }}
-DBIT7Z_BUILD_TESTS=ON
-DBIT7Z_ENABLE_SANITIZERS=ON
-DBIT7Z_7ZIP_VERSION=${{ inputs.sevenzip_version }}
-DBIT7Z_7ZIP_VERSION="${{ inputs.sevenzip_version }}"
${{ inputs.build_flags }}
-S ${{ github.workspace }}
- name: Build 7z.so for tests (Ubuntu)
shell: bash
if: runner.os == 'Linux'
run: |
git clone --depth 1 https://github.com/rikyoz/7-Zip ${{ github.workspace }}/../7-zip
git -C ${{ github.workspace }}/../7-zip fetch --tags
git -C ${{ github.workspace }}/../7-zip checkout v${{ inputs.sevenzip_version }}
cd ${{ github.workspace }}/../7-zip/CPP/7zip/Bundles/Format7zF/
make -j -f ../../cmpl_gcc.mak
cp b/g/7z.so ${{ github.workspace }}/bin/x64/7z.so
- name: Build 7z.so for tests (macOS)
shell: bash
if: runner.os == 'macOS'
run: |
git clone --depth 1 https://github.com/rikyoz/7-Zip ${{ github.workspace }}/../7-zip
git -C ${{ github.workspace }}/../7-zip fetch --tags
git -C ${{ github.workspace }}/../7-zip checkout v${{ inputs.sevenzip_version }}
cd ${{ github.workspace }}/../7-zip/CPP/7zip/Bundles/Format7zF/
make -j -f ../../cmpl_mac_x64.mak
cp b/m_x64/7z.so ${{ github.workspace }}/bin/x64/7z.so
- name: Build bit7z
shell: ${{ inputs.shell }}
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/test_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,6 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: Build 7z.so for tests
shell: bash
run: |
mkdir -p ${{ github.workspace }}/bin/x64/
git clone --depth 1 https://github.com/rikyoz/7-Zip ${{ github.workspace }}/../7-zip
git -C ${{ github.workspace }}/../7-zip fetch --tags
git -C ${{ github.workspace }}/../7-zip checkout v${{ matrix.bit7z_7zip_version }}
cd ${{ github.workspace }}/../7-zip/CPP/7zip/Bundles/Format7zF/
make -j -f ../../cmpl_mac_x64.mak
cp b/m_x64/7z.so ${{ github.workspace }}/bin/x64/7z.so

- name: Building and testing bit7z
uses: ./.github/actions/test_action
Expand Down
17 changes: 3 additions & 14 deletions .github/workflows/test_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,11 @@ jobs:
- c_compiler: gcc
bit7z_link_libcpp: ON

steps:
- name: Build 7z.so for tests
shell: bash
run: |
mkdir -p ${{ github.workspace }}/bin/x64/
git clone --depth 1 https://github.com/rikyoz/7-Zip ${{ github.workspace }}/../7-zip
git -C ${{ github.workspace }}/../7-zip fetch --tags
git -C ${{ github.workspace }}/../7-zip checkout v${{ matrix.bit7z_7zip_version }}
cd ${{ github.workspace }}/../7-zip/CPP/7zip/Bundles/Format7zF/
make -j -f ../../cmpl_gcc.mak
cp b/g/7z.so ${{ github.workspace }}/bin/x64/7z.so
steps:
- uses: actions/checkout@v3

- uses: ./.github/actions/test_action
name: Building and testing bit7z
- name: Building and testing bit7z
uses: ./.github/actions/test_action
with:
c_compiler: ${{ matrix.c_compiler }}
cpp_compiler: ${{ matrix.cpp_compiler }}
Expand Down

0 comments on commit 36f3e5b

Please sign in to comment.