- Created custom upload-artifacts and download-artifacts actions with platform-specific logic
- Updated all existing workflows to use the new custom artifact actions
- Added extraction steps for tar.gz archives in the test summary workflow
shell: bash
- name: Upload install directory
- uses: actions/upload-artifact@v4.6.2
+ uses: ./.github/actions/upload-artifacts
with:
name: ${{ inputs.artifact-name }}
path: install
using: "composite"
steps:
- name: Download OCCT installation
- uses: actions/download-artifact@v4.3.0
+ uses: ./.github/actions/download-artifacts
with:
name: ${{ inputs.install-artifact-name }}
path: occt-install
using: "composite"
steps:
- name: Download OCCT installation
- uses: actions/download-artifact@v4.3.0
+ uses: ./.github/actions/download-artifacts
with:
name: ${{ inputs.install-artifact-name }}
path: occt-install
using: "composite"
steps:
- name: Download OCCT installation
- uses: actions/download-artifact@v4.3.0
+ uses: ./.github/actions/download-artifacts
with:
name: ${{ inputs.install-artifact-name }}
path: occt-install
using: "composite"
steps:
- name: Download OCCT installation
- uses: actions/download-artifact@v4.3.0
+ uses: ./.github/actions/download-artifacts
with:
name: ${{ inputs.install-artifact-name }}
path: occt-install
--- /dev/null
+name: 'Download Platform Artifacts'
+description: 'Download and extract artifacts with proper file permissions and symlinks (cross-platform)'
+inputs:
+ name:
+ description: 'Artifact name'
+ required: true
+ path:
+ description: 'Path to extract to (optional)'
+ required: false
+ default: '.'
+
+runs:
+ using: 'composite'
+ steps:
+ # For Windows, use standard GitHub action - no symlink issues
+ - name: Download artifacts (Windows)
+ if: runner.os == 'Windows'
+ uses: actions/download-artifact@v4.3.0
+ with:
+ name: ${{ inputs.name }}
+ path: ${{ inputs.path }}
+
+ # For Linux/Unix, use custom workaround to handle symlinks properly
+ - name: Download archive (Unix)
+ if: runner.os != 'Windows'
+ uses: actions/download-artifact@v4.3.0
+ with:
+ name: ${{ inputs.name }}
+ path: ./download-temp
+
+ - name: Extract archive (Unix)
+ if: runner.os != 'Windows'
+ shell: bash
+ run: |
+ EXTRACT_PATH="${{ inputs.path }}"
+ ARCHIVE_FILE="./download-temp/${{ inputs.name }}.tar.gz"
+
+ if [ ! -f "$ARCHIVE_FILE" ]; then
+ echo "Error: Archive file $ARCHIVE_FILE not found"
+ ls -la ./download-temp/
+ exit 1
+ fi
+
+ echo "Extracting $ARCHIVE_FILE to $EXTRACT_PATH"
+
+ # Extract and handle directory structure properly
+ if [ "$EXTRACT_PATH" != "." ]; then
+ # Extract to temp location first
+ mkdir -p temp-extract
+ tar -xzf "$ARCHIVE_FILE" -C temp-extract
+
+ # Move the extracted content to the desired path
+ if [ -d "temp-extract/install" ]; then
+ # Remove target directory if it exists to avoid nesting
+ rm -rf "$EXTRACT_PATH"
+ mv "temp-extract/install" "$EXTRACT_PATH"
+ else
+ # If archive doesn't contain install/, move everything
+ mkdir -p "$EXTRACT_PATH"
+ mv temp-extract/* "$EXTRACT_PATH/"
+ fi
+
+ # Clean up temp directory
+ rm -rf temp-extract
+ else
+ tar -xzf "$ARCHIVE_FILE" -C "$EXTRACT_PATH"
+ fi
+
+ echo "Extraction complete"
+ ls -la "$EXTRACT_PATH"
+
+ # Clean up temporary download directory
+ rm -rf ./download-temp
\ No newline at end of file
- name: Download and extract install directory
if: steps.check_failures.outputs.failed_count > 0
- uses: actions/download-artifact@v4.3.0
+ uses: ./.github/actions/download-artifacts
with:
name: ${{ inputs.install-artifact-name }}
path: install
using: "composite"
steps:
- name: Download and extract install directory
- uses: actions/download-artifact@v4.3.0
+ uses: ./.github/actions/download-artifacts
with:
name: ${{ inputs.install-artifact-name }}
path: install
shell: bash
- name: Download and extract install directory
- uses: actions/download-artifact@v4.3.0
+ uses: ./.github/actions/download-artifacts
with:
name: ${{ inputs.install-artifact-name }}
path: install
shell: bash
- name: Download and extract install directory
- uses: actions/download-artifact@v4.3.0
+ uses: ./.github/actions/download-artifacts
with:
name: install-linux-clang-x64
path: install
--- /dev/null
+name: 'Upload Platform Artifacts'
+description: 'Upload artifacts with proper file permissions and symlinks (cross-platform)'
+inputs:
+ name:
+ description: 'Artifact name'
+ required: true
+ path:
+ description: 'Path to archive'
+ required: true
+ retention-days:
+ description: 'Number of days to retain artifact'
+ required: false
+ default: '30'
+
+runs:
+ using: 'composite'
+ steps:
+ # For Windows, use standard GitHub action - no symlink issues
+ - name: Upload artifacts (Windows)
+ if: runner.os == 'Windows'
+ uses: actions/upload-artifact@v4.6.2
+ with:
+ name: ${{ inputs.name }}
+ path: ${{ inputs.path }}
+ retention-days: ${{ inputs.retention-days }}
+
+ # For Linux/Unix, use custom workaround to handle symlinks properly
+ - name: Create archive (Unix)
+ if: runner.os != 'Windows'
+ shell: bash
+ run: |
+ BASE_PATH="${{ inputs.path }}"
+ ARCHIVE_NAME="${{ inputs.name }}.tar.gz"
+
+ if [ -d "$BASE_PATH" ]; then
+ tar -czf "$ARCHIVE_NAME" -C "$(dirname "$BASE_PATH")" "$(basename "$BASE_PATH")"
+ elif [ -f "$BASE_PATH" ]; then
+ tar -czf "$ARCHIVE_NAME" -C "$(dirname "$BASE_PATH")" "$(basename "$BASE_PATH")"
+ else
+ echo "Error: Path $BASE_PATH does not exist"
+ exit 1
+ fi
+
+ echo "Created archive: $ARCHIVE_NAME"
+ ls -la "$ARCHIVE_NAME"
+
+ - name: Upload archive (Unix)
+ if: runner.os != 'Windows'
+ uses: actions/upload-artifact@v4.6.2
+ with:
+ name: ${{ inputs.name }}
+ path: ${{ inputs.name }}.tar.gz
+ retention-days: ${{ inputs.retention-days }}
\ No newline at end of file