|
62 | 62 | -G "Visual Studio 17 2022" ` |
63 | 63 | -DCMAKE_BUILD_TYPE=Release ` |
64 | 64 | -DCMAKE_PREFIX_PATH="$env:HIGHS_DIR" ` |
65 | | - -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}\dist" |
| 65 | + -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}\dist" ` |
| 66 | + -DBUILD_SHARED_LIBS=OFF ` |
| 67 | + -DJRES_VERSION="${{ inputs.version }}" |
66 | 68 |
|
67 | 69 | - name: Add Build Dir to PATH |
68 | 70 | shell: pwsh |
@@ -106,15 +108,32 @@ jobs: |
106 | 108 | $assetName = "jres-solver-${{ env.SAFE_VERSION }}-windows-${{ env.SAFE_ARCH }}.zip" |
107 | 109 | echo "ASSET_NAME=$assetName" >> $env:GITHUB_ENV |
108 | 110 |
|
109 | | - - name: Create Release Zip |
| 111 | + - name: Package (Curated Selection) |
110 | 112 | shell: pwsh |
111 | 113 | run: | |
112 | | - $assetPath = "$env:ASSET_NAME" |
113 | | - $source = "${{ github.workspace }}\dist" |
114 | | - Write-Host "Zipping staged artifacts from $source..." |
| 114 | + $pkg = "package" |
| 115 | + New-Item -ItemType Directory -Path "$pkg\bin" -Force | Out-Null |
| 116 | + New-Item -ItemType Directory -Path "$pkg\lib" -Force | Out-Null |
| 117 | + New-Item -ItemType Directory -Path "$pkg\include\jres_solver" -Force | Out-Null |
| 118 | +
|
| 119 | + Write-Host "Packaging Binary Artifacts..." |
| 120 | + |
| 121 | + # Executables |
| 122 | + Copy-Item "dist\bin\jres_solver.exe" -Destination "$pkg\bin\" |
| 123 | + Copy-Item "dist\bin\jres_formatter.exe" -Destination "$pkg\bin\" |
115 | 124 | |
116 | | - # Compress the whole 'dist' folder structure (bin, lib, include) |
117 | | - Get-ChildItem $source -Recurse | Compress-Archive -DestinationPath $assetPath |
| 125 | + # Library (static) |
| 126 | + if (Test-Path "dist\lib\jres_solver.lib") { |
| 127 | + Copy-Item "dist\lib\jres_solver.lib" -Destination "$pkg\lib\" |
| 128 | + } |
| 129 | + |
| 130 | + # Specific Header |
| 131 | + Copy-Item "dist\include\jres_solver\jres_solver.hpp" -Destination "$pkg\include\jres_solver\" |
| 132 | +
|
| 133 | + # Zip the package folder |
| 134 | + $assetPath = "$env:ASSET_NAME" |
| 135 | + Write-Host "Zipping curated package to $assetPath..." |
| 136 | + Get-ChildItem -Path $pkg | Compress-Archive -DestinationPath $assetPath |
118 | 137 |
|
119 | 138 | # --------------------------------------------------------- |
120 | 139 | # Generate Signature (Checksum) |
|
0 commit comments