From 4989f65a0b7432c832a0250f9c7f8381614cb6a7 Mon Sep 17 00:00:00 2001 From: Xuwznln <18435084+Xuwznln@users.noreply.github.com> Date: Sun, 12 Oct 2025 22:45:05 +0800 Subject: [PATCH] Fix nested conda pack --- .github/workflows/conda-pack-build.yml | 65 +++++++++++--------------- scripts/create_readme.py | 11 +++-- 2 files changed, 36 insertions(+), 40 deletions(-) diff --git a/.github/workflows/conda-pack-build.yml b/.github/workflows/conda-pack-build.yml index 370a9787..be938651 100644 --- a/.github/workflows/conda-pack-build.yml +++ b/.github/workflows/conda-pack-build.yml @@ -283,29 +283,24 @@ jobs: ls -lh dist-package/ echo "" - - name: Create Windows ZIP archive + - name: Finalize Windows distribution package if: steps.should_build.outputs.should_build == 'true' && matrix.platform == 'win-64' run: | echo ========================================== - echo Creating Windows ZIP archive (ZIP64 support for large files)... - echo Archive: unilab-pack-${{ matrix.platform }}.zip - echo Contents: install_unilab.bat + unilab-env-${{ matrix.platform }}.tar.gz + extras + echo Windows distribution package ready echo. - - rem Use Python script with ZIP64 support instead of PowerShell Compress-Archive - rem PowerShell Compress-Archive has a 2GB limitation - python scripts\create_zip_archive.py dist-package unilab-pack-${{ matrix.platform }}.zip - + echo Package will be uploaded as artifact + echo GitHub Actions will automatically create ZIP + echo. + echo Contents: + dir /b dist-package + echo. + echo Users will download a ZIP containing: + echo - install_unilab.bat + echo - unilab-env-${{ matrix.platform }}.tar.gz + echo - verify_installation.py + echo - README.txt echo ========================================== - echo. - echo Final package created: - dir unilab-pack-* - echo. - echo Users can now: - echo 1. Download unilab-pack-${{ matrix.platform }}.zip - echo 2. Extract it - echo 3. Run install_unilab.bat - echo. - name: Create Unix/Linux TAR.GZ archive if: steps.should_build.outputs.should_build == 'true' && matrix.platform != 'win-64' @@ -333,7 +328,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: unilab-pack-${{ matrix.platform }}-${{ github.event.inputs.branch }} - path: unilab-pack-* + path: dist-package/ retention-days: 90 if-no-files-found: error @@ -347,17 +342,13 @@ jobs: echo Branch: ${{ github.event.inputs.branch }} echo Python version: 3.11.11 echo. - echo Package contents: - echo - unilab-pack-${{ matrix.platform }}.zip - echo - unilab-env-${{ matrix.platform }}.tar.gz (packed environment) - echo - install_unilab.bat - echo - verify_installation.py - echo - README.txt + echo Distribution package contents: + dir dist-package echo. - echo Package size: - dir unilab-pack-* + echo Artifact name: unilab-pack-${{ matrix.platform }}-${{ github.event.inputs.branch }} echo. - echo Download the artifact and run the install script! + echo After download, extract the ZIP and run: + echo install_unilab.bat echo ========================================== - name: Display package info (Unix) @@ -371,15 +362,15 @@ jobs: echo "Branch: ${{ github.event.inputs.branch }}" echo "Python version: 3.11.11" echo "" - echo "Package contents:" - echo " - unilab-pack-${{ matrix.platform }}.tar.gz" - echo " - unilab-env-${{ matrix.platform }}.tar.gz (packed environment)" - echo " - install_unilab.sh" - echo " - verify_installation.py" - echo " - README.txt" + echo "Distribution package contents:" + ls -lh dist-package/ echo "" - echo "Package size:" - ls -lh unilab-pack-* + echo "Package size (tar.gz):" + ls -lh unilab-pack-*.tar.gz echo "" - echo "Download the artifact and run the install script!" + echo "Artifact name: unilab-pack-${{ matrix.platform }}-${{ github.event.inputs.branch }}" + echo "" + echo "After download:" + echo " - Windows/macOS: Extract ZIP, then: tar -xzf unilab-pack-${{ matrix.platform }}.tar.gz" + echo " - Linux: Extract ZIP (or download tar.gz directly), run install_unilab.sh" echo "==========================================" diff --git a/scripts/create_readme.py b/scripts/create_readme.py index 545b13b8..51982edf 100644 --- a/scripts/create_readme.py +++ b/scripts/create_readme.py @@ -44,7 +44,7 @@ def get_readme_content(platform: str, branch: str) -> str: archive_ext = "zip" install_script = "install_unilab.bat" platform_instructions = """Windows: - 1. Extract unilab-pack-win-64.zip + 1. Extract the downloaded ZIP file 2. Double-click install_unilab.bat (or run in cmd) 3. Follow the prompts""" else: @@ -52,9 +52,14 @@ def get_readme_content(platform: str, branch: str) -> str: install_script = "install_unilab.sh" platform_name = {"linux-64": "linux-64", "osx-64": "osx-64", "osx-arm64": "osx-arm64"}.get(platform, platform) platform_instructions = f"""macOS/Linux: - 1. Extract unilab-pack-{platform_name}.tar.gz + 1. Download and extract unilab-pack-{platform_name}.tar.gz 2. Run: bash install_unilab.sh - 3. Follow the prompts""" + 3. Follow the prompts + + Alternative (if downloaded from GitHub Actions): + 1. Extract the artifact ZIP file + 2. Extract unilab-pack-{platform_name}.tar.gz inside + 3. Run: bash install_unilab.sh""" # Generate README content readme = f"""UniLabOS Conda-Pack Environment