Skip to content

Commit 9cf0afb

Browse files
committed
windows package: only zip on pull request
1 parent 0ccc3eb commit 9cf0afb

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/cmake.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,15 @@ jobs:
8484
- name: Build
8585
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
8686

87-
- name: Build Package
87+
- name: Build Windows Package
8888
if: matrix.os == 'windows-2022'
89-
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target package
89+
shell: pwsh
90+
run: |
91+
if ("${{ github.event_name }}" -eq "pull_request") {
92+
cpack --config build/CPackConfig.cmake -G ZIP -B build
93+
} else {
94+
cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --target package
95+
}
9096
9197
- name: Rename CUDA artifacts
9298
if: matrix.build_name == 'windows-2022-cuda'

0 commit comments

Comments
 (0)