From ab06fa58319aa8bab31232ed6feb830d29449de4 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 16:25:45 +0000 Subject: [PATCH 1/4] ci: replace thedoctor0/zip-release with in-repo composite action Replace the external thedoctor0/zip-release GitHub Action with a local composite action at .github/actions/zip-release that uses built-in runner tools (zip on Linux/macOS, 7z on Windows). Includes a temporary test workflow to verify the zip action produces correct output on all three platforms. Co-Authored-By: rlamb@launchdarkly.com --- .github/actions/sdk-release/action.yml | 48 ++---- .github/actions/zip-release/action.yml | 21 +++ .github/workflows/test-zip-release.yml | 230 +++++++++++++++++++++++++ 3 files changed, 267 insertions(+), 32 deletions(-) create mode 100644 .github/actions/zip-release/action.yml create mode 100644 .github/workflows/test-zip-release.yml diff --git a/.github/actions/sdk-release/action.yml b/.github/actions/sdk-release/action.yml index 846f12f01..6a1541ad5 100644 --- a/.github/actions/sdk-release/action.yml +++ b/.github/actions/sdk-release/action.yml @@ -73,18 +73,16 @@ runs: - name: Archive Release Linux - GCC/x64/Static if: runner.os == 'Linux' - uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1 + uses: ./.github/actions/zip-release with: path: 'build-static/release' - type: 'zip' filename: 'linux-gcc-x64-static.zip' - name: Archive Release Linux - GCC/x64/Dynamic if: runner.os == 'Linux' - uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1 + uses: ./.github/actions/zip-release with: path: 'build-dynamic/release' - type: 'zip' filename: 'linux-gcc-x64-dynamic.zip' - name: Determine CURL artifact suffix for server SDK @@ -100,18 +98,16 @@ runs: - name: Archive Release Linux - GCC/x64/Static/CURL if: runner.os == 'Linux' - uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1 + uses: ./.github/actions/zip-release with: path: 'build-static-curl/release' - type: 'zip' filename: 'linux-gcc-x64-static-curl${{ steps.curl-suffix-linux.outputs.suffix }}.zip' - name: Archive Release Linux - GCC/x64/Dynamic/CURL if: runner.os == 'Linux' - uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1 + uses: ./.github/actions/zip-release with: path: 'build-dynamic-curl/release' - type: 'zip' filename: 'linux-gcc-x64-dynamic-curl${{ steps.curl-suffix-linux.outputs.suffix }}.zip' - name: Hash Linux Build Artifacts for provenance @@ -165,34 +161,30 @@ runs: - name: Archive Release Windows - MSVC/x64/Static if: runner.os == 'Windows' - uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1 + uses: ./.github/actions/zip-release with: path: 'build-static/release' - type: 'zip' filename: 'windows-msvc-x64-static.zip' - name: Archive Release Windows - MSVC/x64/Dynamic if: runner.os == 'Windows' - uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1 + uses: ./.github/actions/zip-release with: path: 'build-dynamic/release' - type: 'zip' filename: 'windows-msvc-x64-dynamic.zip' - name: Archive Release Windows - MSVC/x64/Static/Debug if: runner.os == 'Windows' - uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1 + uses: ./.github/actions/zip-release with: path: 'build-static-debug/release' - type: 'zip' filename: 'windows-msvc-x64-static-debug.zip' - name: Archive Release Windows - MSVC/x64/Dynamic/Debug if: runner.os == 'Windows' - uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1 + uses: ./.github/actions/zip-release with: path: 'build-dynamic-debug/release' - type: 'zip' filename: 'windows-msvc-x64-dynamic-debug.zip' - name: Determine CURL artifact suffix for server SDK @@ -208,34 +200,30 @@ runs: - name: Archive Release Windows - MSVC/x64/Static/CURL if: runner.os == 'Windows' - uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1 + uses: ./.github/actions/zip-release with: path: 'build-static-curl/release' - type: 'zip' filename: 'windows-msvc-x64-static-curl${{ steps.curl-suffix-windows.outputs.suffix }}.zip' - name: Archive Release Windows - MSVC/x64/Dynamic/CURL if: runner.os == 'Windows' - uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1 + uses: ./.github/actions/zip-release with: path: 'build-dynamic-curl/release' - type: 'zip' filename: 'windows-msvc-x64-dynamic-curl${{ steps.curl-suffix-windows.outputs.suffix }}.zip' - name: Archive Release Windows - MSVC/x64/Static/Debug/CURL if: runner.os == 'Windows' - uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1 + uses: ./.github/actions/zip-release with: path: 'build-static-debug-curl/release' - type: 'zip' filename: 'windows-msvc-x64-static-debug-curl${{ steps.curl-suffix-windows.outputs.suffix }}.zip' - name: Archive Release Windows - MSVC/x64/Dynamic/Debug/CURL if: runner.os == 'Windows' - uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1 + uses: ./.github/actions/zip-release with: path: 'build-dynamic-debug-curl/release' - type: 'zip' filename: 'windows-msvc-x64-dynamic-debug-curl${{ steps.curl-suffix-windows.outputs.suffix }}.zip' - name: Hash Windows Build Artifacts for provenance @@ -278,18 +266,16 @@ runs: - name: Archive Release Mac - AppleClang/${{ inputs.mac_artifact_arch }}/Static if: runner.os == 'macOS' - uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1 + uses: ./.github/actions/zip-release with: path: 'build-static/release' - type: 'zip' filename: 'mac-clang-${{ inputs.mac_artifact_arch }}-static.zip' - name: Archive Release Mac - AppleClang/${{ inputs.mac_artifact_arch }}/Dynamic if: runner.os == 'macOS' - uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1 + uses: ./.github/actions/zip-release with: path: 'build-dynamic/release' - type: 'zip' filename: 'mac-clang-${{ inputs.mac_artifact_arch }}-dynamic.zip' - name: Determine CURL artifact suffix for server SDK @@ -305,18 +291,16 @@ runs: - name: Archive Release Mac - AppleClang/${{ inputs.mac_artifact_arch }}/Static/CURL if: runner.os == 'macOS' - uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1 + uses: ./.github/actions/zip-release with: path: 'build-static-curl/release' - type: 'zip' filename: 'mac-clang-${{ inputs.mac_artifact_arch }}-static-curl${{ steps.curl-suffix-macos.outputs.suffix }}.zip' - name: Archive Release Mac - AppleClang/${{ inputs.mac_artifact_arch }}/Dynamic/CURL if: runner.os == 'macOS' - uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1 + uses: ./.github/actions/zip-release with: path: 'build-dynamic-curl/release' - type: 'zip' filename: 'mac-clang-${{ inputs.mac_artifact_arch }}-dynamic-curl${{ steps.curl-suffix-macos.outputs.suffix }}.zip' - name: Hash Mac Build Artifacts for provenance diff --git a/.github/actions/zip-release/action.yml b/.github/actions/zip-release/action.yml new file mode 100644 index 000000000..8ab833fd0 --- /dev/null +++ b/.github/actions/zip-release/action.yml @@ -0,0 +1,21 @@ +name: 'Zip Release' +description: 'Creates a zip archive from a specified path. Works on Linux, macOS, and Windows using built-in runner tools.' +inputs: + path: + description: 'The path to archive (relative to working directory).' + required: true + filename: + description: 'The output zip filename.' + required: true +runs: + using: composite + steps: + - name: Create zip (Linux/macOS) + if: runner.os != 'Windows' + shell: bash + run: zip -r "${{ inputs.filename }}" ${{ inputs.path }} + + - name: Create zip (Windows) + if: runner.os == 'Windows' + shell: bash + run: 7z a -tzip "${{ inputs.filename }}" ${{ inputs.path }} diff --git a/.github/workflows/test-zip-release.yml b/.github/workflows/test-zip-release.yml new file mode 100644 index 000000000..2d87c585b --- /dev/null +++ b/.github/workflows/test-zip-release.yml @@ -0,0 +1,230 @@ +# Temporary workflow to verify the zip-release composite action produces +# identical output to the old thedoctor0/zip-release action. +# This workflow should be removed after verification. + +name: Test zip-release action + +on: + push: + branches: + - 'devin/*replace-zip-release*' + +jobs: + test-zip: + strategy: + matrix: + os: [ubuntu-22.04, windows-2022, macos-13] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 + + - name: Create test directory structure + shell: bash + run: | + # Mimic the build output structure used by sdk-release + mkdir -p build-static/release/include + mkdir -p build-static/release/lib + echo "// test header" > build-static/release/include/launchdarkly.h + echo "static lib content" > build-static/release/lib/liblaunchdarkly.a + echo "README" > build-static/release/README.md + + mkdir -p build-dynamic/release/include + mkdir -p build-dynamic/release/lib + echo "// test header" > build-dynamic/release/include/launchdarkly.h + echo "dynamic lib content" > build-dynamic/release/lib/liblaunchdarkly.so + echo "README" > build-dynamic/release/README.md + + - name: Zip with new action (static) + uses: ./.github/actions/zip-release + with: + path: 'build-static/release' + filename: 'test-static.zip' + + - name: Zip with new action (dynamic) + uses: ./.github/actions/zip-release + with: + path: 'build-dynamic/release' + filename: 'test-dynamic.zip' + + - name: Verify zip files exist with correct names + shell: bash + run: | + echo "=== Checking zip files exist ===" + ls -la test-static.zip test-dynamic.zip + echo "PASS: Both zip files exist" + + - name: Verify zip contents (no extra root folder) + shell: bash + run: | + if [ "$RUNNER_OS" = "Windows" ]; then + echo "=== Contents of test-static.zip ===" + 7z l test-static.zip + echo "" + echo "=== Contents of test-dynamic.zip ===" + 7z l test-dynamic.zip + + # Verify the path structure inside the zip + echo "" + echo "=== Verifying path structure ===" + STATIC_LIST=$(7z l -slt test-static.zip | grep "^Path = " | sed 's/^Path = //') + echo "Files in static zip:" + echo "$STATIC_LIST" + + # Check that paths start with build-static/release (matching old behavior) + if echo "$STATIC_LIST" | grep -q "build-static/release/include/launchdarkly.h"; then + echo "PASS: Static zip contains correct path structure" + elif echo "$STATIC_LIST" | grep -q "build-static\\\\release\\\\include\\\\launchdarkly.h"; then + echo "PASS: Static zip contains correct path structure (Windows paths)" + else + echo "FAIL: Unexpected path structure in static zip" + exit 1 + fi + else + echo "=== Contents of test-static.zip ===" + unzip -l test-static.zip + echo "" + echo "=== Contents of test-dynamic.zip ===" + unzip -l test-dynamic.zip + + # Verify the path structure inside the zip + echo "" + echo "=== Verifying path structure ===" + STATIC_LIST=$(unzip -l test-static.zip | tail -n +4 | head -n -2 | awk '{print $4}') + echo "Files in static zip:" + echo "$STATIC_LIST" + + # Check that paths start with build-static/release (matching old behavior) + if echo "$STATIC_LIST" | grep -q "build-static/release/include/launchdarkly.h"; then + echo "PASS: Static zip contains correct path structure" + else + echo "FAIL: Unexpected path structure in static zip" + exit 1 + fi + + DYNAMIC_LIST=$(unzip -l test-dynamic.zip | tail -n +4 | head -n -2 | awk '{print $4}') + echo "Files in dynamic zip:" + echo "$DYNAMIC_LIST" + + if echo "$DYNAMIC_LIST" | grep -q "build-dynamic/release/lib/liblaunchdarkly.so"; then + echo "PASS: Dynamic zip contains correct path structure" + else + echo "FAIL: Unexpected path structure in dynamic zip" + exit 1 + fi + fi + + - name: Test platform-specific filenames match sdk-release expectations + shell: bash + run: | + if [ "$RUNNER_OS" = "Linux" ]; then + EXPECTED_NAMES=("linux-gcc-x64-static.zip" "linux-gcc-x64-dynamic.zip" "linux-gcc-x64-static-curl.zip" "linux-gcc-x64-dynamic-curl.zip") + elif [ "$RUNNER_OS" = "Windows" ]; then + EXPECTED_NAMES=("windows-msvc-x64-static.zip" "windows-msvc-x64-dynamic.zip" "windows-msvc-x64-static-debug.zip" "windows-msvc-x64-dynamic-debug.zip") + elif [ "$RUNNER_OS" = "macOS" ]; then + EXPECTED_NAMES=("mac-clang-x64-static.zip" "mac-clang-x64-dynamic.zip") + fi + + echo "=== Testing platform-specific filenames ===" + for NAME in "${EXPECTED_NAMES[@]}"; do + # Create a test dir and zip it with the expected name + mkdir -p test-dir/release/lib + echo "test" > test-dir/release/lib/test.a + done + + - name: Generate all expected zip filenames + shell: bash + run: | + # Test that the action can produce each expected filename + mkdir -p dummy/release/lib + echo "test" > dummy/release/lib/test.a + + - name: Zip with expected Linux filenames + if: runner.os == 'Linux' + uses: ./.github/actions/zip-release + with: + path: 'dummy/release' + filename: 'linux-gcc-x64-static.zip' + + - name: Zip with expected Linux dynamic filename + if: runner.os == 'Linux' + uses: ./.github/actions/zip-release + with: + path: 'dummy/release' + filename: 'linux-gcc-x64-dynamic.zip' + + - name: Zip with expected Linux curl static filename + if: runner.os == 'Linux' + uses: ./.github/actions/zip-release + with: + path: 'dummy/release' + filename: 'linux-gcc-x64-static-curl.zip' + + - name: Zip with expected Linux curl dynamic filename + if: runner.os == 'Linux' + uses: ./.github/actions/zip-release + with: + path: 'dummy/release' + filename: 'linux-gcc-x64-dynamic-curl.zip' + + - name: Zip with expected Windows filenames + if: runner.os == 'Windows' + uses: ./.github/actions/zip-release + with: + path: 'dummy/release' + filename: 'windows-msvc-x64-static.zip' + + - name: Zip with expected Windows dynamic filename + if: runner.os == 'Windows' + uses: ./.github/actions/zip-release + with: + path: 'dummy/release' + filename: 'windows-msvc-x64-dynamic.zip' + + - name: Zip with expected Windows static debug filename + if: runner.os == 'Windows' + uses: ./.github/actions/zip-release + with: + path: 'dummy/release' + filename: 'windows-msvc-x64-static-debug.zip' + + - name: Zip with expected Windows dynamic debug filename + if: runner.os == 'Windows' + uses: ./.github/actions/zip-release + with: + path: 'dummy/release' + filename: 'windows-msvc-x64-dynamic-debug.zip' + + - name: Zip with expected macOS filenames + if: runner.os == 'macOS' + uses: ./.github/actions/zip-release + with: + path: 'dummy/release' + filename: 'mac-clang-x64-static.zip' + + - name: Zip with expected macOS dynamic filename + if: runner.os == 'macOS' + uses: ./.github/actions/zip-release + with: + path: 'dummy/release' + filename: 'mac-clang-x64-dynamic.zip' + + - name: Verify all expected filenames were created + shell: bash + run: | + echo "=== Verifying all expected zip files ===" + if [ "$RUNNER_OS" = "Linux" ]; then + ls -la linux-gcc-x64-static.zip linux-gcc-x64-dynamic.zip linux-gcc-x64-static-curl.zip linux-gcc-x64-dynamic-curl.zip + echo "PASS: All Linux zip filenames match expectations" + elif [ "$RUNNER_OS" = "Windows" ]; then + ls -la windows-msvc-x64-static.zip windows-msvc-x64-dynamic.zip windows-msvc-x64-static-debug.zip windows-msvc-x64-dynamic-debug.zip + echo "PASS: All Windows zip filenames match expectations" + elif [ "$RUNNER_OS" = "macOS" ]; then + ls -la mac-clang-x64-static.zip mac-clang-x64-dynamic.zip + echo "PASS: All macOS zip filenames match expectations" + fi + + - name: Upload artifacts for inspection + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + with: + name: zip-test-${{ runner.os }} + path: '*.zip' From ea564509002a79e2ac66682691198e1ef4c86508 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 16:32:23 +0000 Subject: [PATCH 2/4] ci: fix macOS runner to macos-15 in test workflow Co-Authored-By: rlamb@launchdarkly.com --- .github/workflows/test-zip-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-zip-release.yml b/.github/workflows/test-zip-release.yml index 2d87c585b..53083d09f 100644 --- a/.github/workflows/test-zip-release.yml +++ b/.github/workflows/test-zip-release.yml @@ -13,7 +13,7 @@ jobs: test-zip: strategy: matrix: - os: [ubuntu-22.04, windows-2022, macos-13] + os: [ubuntu-22.04, windows-2022, macos-15] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 From 41940005d9fa1e77b8938808497f628e7889ae24 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 16:33:20 +0000 Subject: [PATCH 3/4] ci: fix macOS compatibility in test workflow (use zipinfo) Co-Authored-By: rlamb@launchdarkly.com --- .github/workflows/test-zip-release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-zip-release.yml b/.github/workflows/test-zip-release.yml index 53083d09f..951692233 100644 --- a/.github/workflows/test-zip-release.yml +++ b/.github/workflows/test-zip-release.yml @@ -86,10 +86,10 @@ jobs: echo "=== Contents of test-dynamic.zip ===" unzip -l test-dynamic.zip - # Verify the path structure inside the zip + # Verify the path structure inside the zip using zipinfo echo "" echo "=== Verifying path structure ===" - STATIC_LIST=$(unzip -l test-static.zip | tail -n +4 | head -n -2 | awk '{print $4}') + STATIC_LIST=$(zipinfo -1 test-static.zip) echo "Files in static zip:" echo "$STATIC_LIST" @@ -101,7 +101,7 @@ jobs: exit 1 fi - DYNAMIC_LIST=$(unzip -l test-dynamic.zip | tail -n +4 | head -n -2 | awk '{print $4}') + DYNAMIC_LIST=$(zipinfo -1 test-dynamic.zip) echo "Files in dynamic zip:" echo "$DYNAMIC_LIST" From 069781c3287cebb36a30ba0cffa9f77e1b4aa039 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 16:51:46 +0000 Subject: [PATCH 4/4] ci: remove temporary test-zip-release workflow after verification Co-Authored-By: rlamb@launchdarkly.com --- .github/workflows/test-zip-release.yml | 230 ------------------------- 1 file changed, 230 deletions(-) delete mode 100644 .github/workflows/test-zip-release.yml diff --git a/.github/workflows/test-zip-release.yml b/.github/workflows/test-zip-release.yml deleted file mode 100644 index 951692233..000000000 --- a/.github/workflows/test-zip-release.yml +++ /dev/null @@ -1,230 +0,0 @@ -# Temporary workflow to verify the zip-release composite action produces -# identical output to the old thedoctor0/zip-release action. -# This workflow should be removed after verification. - -name: Test zip-release action - -on: - push: - branches: - - 'devin/*replace-zip-release*' - -jobs: - test-zip: - strategy: - matrix: - os: [ubuntu-22.04, windows-2022, macos-15] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 - - - name: Create test directory structure - shell: bash - run: | - # Mimic the build output structure used by sdk-release - mkdir -p build-static/release/include - mkdir -p build-static/release/lib - echo "// test header" > build-static/release/include/launchdarkly.h - echo "static lib content" > build-static/release/lib/liblaunchdarkly.a - echo "README" > build-static/release/README.md - - mkdir -p build-dynamic/release/include - mkdir -p build-dynamic/release/lib - echo "// test header" > build-dynamic/release/include/launchdarkly.h - echo "dynamic lib content" > build-dynamic/release/lib/liblaunchdarkly.so - echo "README" > build-dynamic/release/README.md - - - name: Zip with new action (static) - uses: ./.github/actions/zip-release - with: - path: 'build-static/release' - filename: 'test-static.zip' - - - name: Zip with new action (dynamic) - uses: ./.github/actions/zip-release - with: - path: 'build-dynamic/release' - filename: 'test-dynamic.zip' - - - name: Verify zip files exist with correct names - shell: bash - run: | - echo "=== Checking zip files exist ===" - ls -la test-static.zip test-dynamic.zip - echo "PASS: Both zip files exist" - - - name: Verify zip contents (no extra root folder) - shell: bash - run: | - if [ "$RUNNER_OS" = "Windows" ]; then - echo "=== Contents of test-static.zip ===" - 7z l test-static.zip - echo "" - echo "=== Contents of test-dynamic.zip ===" - 7z l test-dynamic.zip - - # Verify the path structure inside the zip - echo "" - echo "=== Verifying path structure ===" - STATIC_LIST=$(7z l -slt test-static.zip | grep "^Path = " | sed 's/^Path = //') - echo "Files in static zip:" - echo "$STATIC_LIST" - - # Check that paths start with build-static/release (matching old behavior) - if echo "$STATIC_LIST" | grep -q "build-static/release/include/launchdarkly.h"; then - echo "PASS: Static zip contains correct path structure" - elif echo "$STATIC_LIST" | grep -q "build-static\\\\release\\\\include\\\\launchdarkly.h"; then - echo "PASS: Static zip contains correct path structure (Windows paths)" - else - echo "FAIL: Unexpected path structure in static zip" - exit 1 - fi - else - echo "=== Contents of test-static.zip ===" - unzip -l test-static.zip - echo "" - echo "=== Contents of test-dynamic.zip ===" - unzip -l test-dynamic.zip - - # Verify the path structure inside the zip using zipinfo - echo "" - echo "=== Verifying path structure ===" - STATIC_LIST=$(zipinfo -1 test-static.zip) - echo "Files in static zip:" - echo "$STATIC_LIST" - - # Check that paths start with build-static/release (matching old behavior) - if echo "$STATIC_LIST" | grep -q "build-static/release/include/launchdarkly.h"; then - echo "PASS: Static zip contains correct path structure" - else - echo "FAIL: Unexpected path structure in static zip" - exit 1 - fi - - DYNAMIC_LIST=$(zipinfo -1 test-dynamic.zip) - echo "Files in dynamic zip:" - echo "$DYNAMIC_LIST" - - if echo "$DYNAMIC_LIST" | grep -q "build-dynamic/release/lib/liblaunchdarkly.so"; then - echo "PASS: Dynamic zip contains correct path structure" - else - echo "FAIL: Unexpected path structure in dynamic zip" - exit 1 - fi - fi - - - name: Test platform-specific filenames match sdk-release expectations - shell: bash - run: | - if [ "$RUNNER_OS" = "Linux" ]; then - EXPECTED_NAMES=("linux-gcc-x64-static.zip" "linux-gcc-x64-dynamic.zip" "linux-gcc-x64-static-curl.zip" "linux-gcc-x64-dynamic-curl.zip") - elif [ "$RUNNER_OS" = "Windows" ]; then - EXPECTED_NAMES=("windows-msvc-x64-static.zip" "windows-msvc-x64-dynamic.zip" "windows-msvc-x64-static-debug.zip" "windows-msvc-x64-dynamic-debug.zip") - elif [ "$RUNNER_OS" = "macOS" ]; then - EXPECTED_NAMES=("mac-clang-x64-static.zip" "mac-clang-x64-dynamic.zip") - fi - - echo "=== Testing platform-specific filenames ===" - for NAME in "${EXPECTED_NAMES[@]}"; do - # Create a test dir and zip it with the expected name - mkdir -p test-dir/release/lib - echo "test" > test-dir/release/lib/test.a - done - - - name: Generate all expected zip filenames - shell: bash - run: | - # Test that the action can produce each expected filename - mkdir -p dummy/release/lib - echo "test" > dummy/release/lib/test.a - - - name: Zip with expected Linux filenames - if: runner.os == 'Linux' - uses: ./.github/actions/zip-release - with: - path: 'dummy/release' - filename: 'linux-gcc-x64-static.zip' - - - name: Zip with expected Linux dynamic filename - if: runner.os == 'Linux' - uses: ./.github/actions/zip-release - with: - path: 'dummy/release' - filename: 'linux-gcc-x64-dynamic.zip' - - - name: Zip with expected Linux curl static filename - if: runner.os == 'Linux' - uses: ./.github/actions/zip-release - with: - path: 'dummy/release' - filename: 'linux-gcc-x64-static-curl.zip' - - - name: Zip with expected Linux curl dynamic filename - if: runner.os == 'Linux' - uses: ./.github/actions/zip-release - with: - path: 'dummy/release' - filename: 'linux-gcc-x64-dynamic-curl.zip' - - - name: Zip with expected Windows filenames - if: runner.os == 'Windows' - uses: ./.github/actions/zip-release - with: - path: 'dummy/release' - filename: 'windows-msvc-x64-static.zip' - - - name: Zip with expected Windows dynamic filename - if: runner.os == 'Windows' - uses: ./.github/actions/zip-release - with: - path: 'dummy/release' - filename: 'windows-msvc-x64-dynamic.zip' - - - name: Zip with expected Windows static debug filename - if: runner.os == 'Windows' - uses: ./.github/actions/zip-release - with: - path: 'dummy/release' - filename: 'windows-msvc-x64-static-debug.zip' - - - name: Zip with expected Windows dynamic debug filename - if: runner.os == 'Windows' - uses: ./.github/actions/zip-release - with: - path: 'dummy/release' - filename: 'windows-msvc-x64-dynamic-debug.zip' - - - name: Zip with expected macOS filenames - if: runner.os == 'macOS' - uses: ./.github/actions/zip-release - with: - path: 'dummy/release' - filename: 'mac-clang-x64-static.zip' - - - name: Zip with expected macOS dynamic filename - if: runner.os == 'macOS' - uses: ./.github/actions/zip-release - with: - path: 'dummy/release' - filename: 'mac-clang-x64-dynamic.zip' - - - name: Verify all expected filenames were created - shell: bash - run: | - echo "=== Verifying all expected zip files ===" - if [ "$RUNNER_OS" = "Linux" ]; then - ls -la linux-gcc-x64-static.zip linux-gcc-x64-dynamic.zip linux-gcc-x64-static-curl.zip linux-gcc-x64-dynamic-curl.zip - echo "PASS: All Linux zip filenames match expectations" - elif [ "$RUNNER_OS" = "Windows" ]; then - ls -la windows-msvc-x64-static.zip windows-msvc-x64-dynamic.zip windows-msvc-x64-static-debug.zip windows-msvc-x64-dynamic-debug.zip - echo "PASS: All Windows zip filenames match expectations" - elif [ "$RUNNER_OS" = "macOS" ]; then - ls -la mac-clang-x64-static.zip mac-clang-x64-dynamic.zip - echo "PASS: All macOS zip filenames match expectations" - fi - - - name: Upload artifacts for inspection - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 - with: - name: zip-test-${{ runner.os }} - path: '*.zip'