Testing - Update build-windows-packages workflow for OCCT version 7.9.3

- Bump OCCT version from 7.9.2 to 7.9.3.
- Refactor file handling in the workflow to use Rename-Item instead of Copy-Item for better clarity and efficiency.
- Update artifact paths to include the new version in the filenames.
- Fix env.bat THIRDPARTY_DIR path for Debug builds to use a relative path.
This commit is contained in:
dpasukhi
2025-12-05 23:13:07 +00:00
parent 9ea6beb120
commit a016080bf6

View File

@@ -1,5 +1,5 @@
# This workflow builds OCCT Windows packages using prepared 3rd-party archives.
# It creates various package configurations (Release/Debug, with/without PCH) and signs DLLs.
# It creates various package configurations (Release/Debug, with/without PCH).
# The workflow is designed to build each package variant on separate machines for optimal isolation.
name: Build Windows Packages
@@ -14,11 +14,9 @@ on:
permissions:
contents: read
id-token: write
attestations: write
env:
OCCT_VERSION: '7.9.2'
OCCT_VERSION: '7.9.3'
THIRDPARTY_URL: 'https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip'
jobs:
@@ -108,18 +106,13 @@ jobs:
}
shell: pwsh
- name: Sign Release DLLs with GitHub attestation
uses: actions/attest-build-provenance@v1
with:
subject-path: '${{ github.workspace }}/occt-vc14-64/**/*.dll'
- name: Create OCCT Release package
run: |
$version = $env:OCCT_VERSION
$folderName = "opencascade-$version-vc14-64"
Copy-Item occt-vc14-64 $folderName -Recurse
Rename-Item occt-vc14-64 $folderName
Compress-Archive -Path $folderName -DestinationPath "$folderName.zip"
Remove-Item $folderName -Recurse -Force
Rename-Item $folderName occt-vc14-64
shell: pwsh
- name: Upload OCCT Release package
@@ -131,14 +124,19 @@ jobs:
- name: Create combined package (Release + 3rd-party)
run: |
Compress-Archive -Path 3rdparty-vc14-64,occt-vc14-64 -DestinationPath occt-vc14-64-combined.zip
$version = $env:OCCT_VERSION
$folderName = "opencascade-$version-vc14-64"
$thirdpartyName = "3rdparty-vc14-64"
Rename-Item occt-vc14-64 $folderName
Compress-Archive -Path $thirdpartyName,$folderName -DestinationPath "$folderName-combined.zip"
Rename-Item $folderName occt-vc14-64
shell: pwsh
- name: Upload combined Release package
uses: actions/upload-artifact@v4.4.3
with:
name: occt-combined-release-no-pch
path: occt-vc14-64-combined.zip
path: opencascade-${{ env.OCCT_VERSION }}-vc14-64-combined.zip
retention-days: 30
- name: Build and Install OCCT Debug (keeping Release files)
@@ -147,18 +145,24 @@ jobs:
cmake --build . --target install --config Debug
shell: pwsh
- name: Sign Debug DLLs with GitHub attestation
uses: actions/attest-build-provenance@v1
with:
subject-path: '${{ github.workspace }}/occt-vc14-64/**/*.dll'
- name: Fix env.bat THIRDPARTY_DIR path for Debug
run: |
$envBatPath = "${{ github.workspace }}/occt-vc14-64/env.bat"
if (Test-Path $envBatPath) {
$content = Get-Content $envBatPath -Raw
$content = $content -replace 'THIRDPARTY_DIR=.*3rdparty-vc14-64"', 'THIRDPARTY_DIR=..\3rdparty-vc14-64"'
Set-Content -Path $envBatPath -Value $content -NoNewline
Write-Host "Updated env.bat with relative THIRDPARTY_DIR path"
}
shell: pwsh
- name: Create OCCT Release+Debug package
run: |
$version = $env:OCCT_VERSION
$folderName = "opencascade-$version-vc14-64"
Copy-Item occt-vc14-64 $folderName -Recurse
Rename-Item occt-vc14-64 $folderName
Compress-Archive -Path $folderName -DestinationPath "opencascade-$version-vc14-64-with-debug.zip"
Remove-Item $folderName -Recurse -Force
Rename-Item $folderName occt-vc14-64
shell: pwsh
- name: Upload OCCT Release+Debug package
@@ -170,14 +174,19 @@ jobs:
- name: Create combined package (Release+Debug + 3rd-party)
run: |
Compress-Archive -Path 3rdparty-vc14-64,occt-vc14-64 -DestinationPath occt-vc14-64-combined.zip -Force
$version = $env:OCCT_VERSION
$folderName = "opencascade-$version-vc14-64"
$thirdpartyName = "3rdparty-vc14-64"
Rename-Item occt-vc14-64 $folderName
Compress-Archive -Path $thirdpartyName,$folderName -DestinationPath "$folderName-with-debug-combined.zip"
Rename-Item $folderName occt-vc14-64
shell: pwsh
- name: Upload combined Release+Debug package
uses: actions/upload-artifact@v4.4.3
with:
name: occt-combined-with-debug-no-pch
path: occt-vc14-64-combined.zip
path: opencascade-${{ env.OCCT_VERSION }}-vc14-64-with-debug-combined.zip
retention-days: 30
# Build OCCT with PCH (Release + Debug)
@@ -248,18 +257,13 @@ jobs:
}
shell: pwsh
- name: Sign Release DLLs with GitHub attestation
uses: actions/attest-build-provenance@v1
with:
subject-path: '${{ github.workspace }}/occt-vc14-64/**/*.dll'
- name: Create OCCT Release PCH package
run: |
$version = $env:OCCT_VERSION
$folderName = "opencascade-$version-vc14-64"
Copy-Item occt-vc14-64 $folderName -Recurse
Rename-Item occt-vc14-64 $folderName
Compress-Archive -Path $folderName -DestinationPath "opencascade-$version-vc14-64-pch.zip"
Remove-Item $folderName -Recurse -Force
Rename-Item $folderName occt-vc14-64
shell: pwsh
- name: Upload OCCT Release PCH package
@@ -271,14 +275,19 @@ jobs:
- name: Create combined PCH package (Release + 3rd-party)
run: |
Compress-Archive -Path 3rdparty-vc14-64,occt-vc14-64 -DestinationPath occt-vc14-64-combined.zip
$version = $env:OCCT_VERSION
$folderName = "opencascade-$version-vc14-64"
$thirdpartyName = "3rdparty-vc14-64"
Rename-Item occt-vc14-64 $folderName
Compress-Archive -Path $thirdpartyName,$folderName -DestinationPath "$folderName-pch-combined.zip"
Rename-Item $folderName occt-vc14-64
shell: pwsh
- name: Upload combined Release PCH package
uses: actions/upload-artifact@v4.4.3
with:
name: occt-combined-release-pch
path: occt-vc14-64-combined.zip
path: opencascade-${{ env.OCCT_VERSION }}-vc14-64-pch-combined.zip
retention-days: 30
- name: Build and Install OCCT Debug (keeping Release files)
@@ -287,18 +296,24 @@ jobs:
cmake --build . --target install --config Debug
shell: pwsh
- name: Sign Debug DLLs with GitHub attestation
uses: actions/attest-build-provenance@v1
with:
subject-path: '${{ github.workspace }}/occt-vc14-64/**/*.dll'
- name: Fix env.bat THIRDPARTY_DIR path for Debug
run: |
$envBatPath = "${{ github.workspace }}/occt-vc14-64/env.bat"
if (Test-Path $envBatPath) {
$content = Get-Content $envBatPath -Raw
$content = $content -replace 'THIRDPARTY_DIR=.*3rdparty-vc14-64"', 'THIRDPARTY_DIR=..\3rdparty-vc14-64"'
Set-Content -Path $envBatPath -Value $content -NoNewline
Write-Host "Updated env.bat with relative THIRDPARTY_DIR path"
}
shell: pwsh
- name: Create OCCT Release+Debug PCH package
run: |
$version = $env:OCCT_VERSION
$folderName = "opencascade-$version-vc14-64"
Copy-Item occt-vc14-64 $folderName -Recurse
Rename-Item occt-vc14-64 $folderName
Compress-Archive -Path $folderName -DestinationPath "opencascade-$version-vc14-64-pch-with-debug.zip"
Remove-Item $folderName -Recurse -Force
Rename-Item $folderName occt-vc14-64
shell: pwsh
- name: Upload OCCT Release+Debug PCH package
@@ -310,12 +325,17 @@ jobs:
- name: Create combined PCH package (Release+Debug + 3rd-party)
run: |
Compress-Archive -Path 3rdparty-vc14-64,occt-vc14-64 -DestinationPath occt-vc14-64-combined.zip -Force
$version = $env:OCCT_VERSION
$folderName = "opencascade-$version-vc14-64"
$thirdpartyName = "3rdparty-vc14-64"
Rename-Item occt-vc14-64 $folderName
Compress-Archive -Path $thirdpartyName,$folderName -DestinationPath "$folderName-pch-with-debug-combined.zip"
Rename-Item $folderName occt-vc14-64
shell: pwsh
- name: Upload combined Release+Debug PCH package
uses: actions/upload-artifact@v4.4.3
with:
name: occt-combined-with-debug-pch
path: occt-vc14-64-combined.zip
path: opencascade-${{ env.OCCT_VERSION }}-vc14-64-pch-with-debug-combined.zip
retention-days: 30