# 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
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:
}
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
- 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)
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
- 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)
}
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
- 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)
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
- 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