Skip to content

Commit 0f8709e

Browse files
committed
[CI] Repack zip file without timestamp
Signed-off-by: Shen-Ta Hsieh <[email protected]>
1 parent 4843cca commit 0f8709e

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

.github/workflows/build.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Install dependency
2626
uses: crazy-max/ghaction-chocolatey@v1
2727
with:
28-
args: install cmake ninja vswhere
28+
args: install cmake ninja vswhere 7zip.install
2929
- name: Upgrade dependency
3030
uses: crazy-max/ghaction-chocolatey@v1
3131
with:
@@ -62,9 +62,19 @@ jobs:
6262
cmake -Bbuild -GNinja "-DCMAKE_SYSTEM_VERSION=$cmake_sys_ver" -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.rtlib }} -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=ZIP "-DCMAKE_INSTALL_PREFIX=$pwd\\prefix" -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS="lld;clang;clang-tools-extra" -DLLVM_ENABLE_DIA_SDK=OFF llvm-project\\llvm
6363
cmake --build build --target package
6464
65+
- name: Repack zip package
66+
run: |
67+
$name = (Get-Item build/LLVM-*.zip).Name
68+
$basename = (Get-Item build/LLVM-*.zip).BaseName
69+
Remove-Item -Recurse -Force "$basename"
70+
Expand-Archive -Path "build/$name" -DestinationPath "$pwd"
71+
Remove-Item "build/$name"
72+
7z a -mx=9 -tzip -mtm=off -mtc=off -mta=off "build/$name" "$basename"
73+
6574
- name: Upload Artifact
66-
uses: actions/upload-artifact@v2
75+
uses: actions/upload-artifact@v4
6776
with:
6877
name: llvm-${{ matrix.rtlib }}
6978
path: build/*.zip
7079
retention-days: 14
80+
compression-level: 0

.github/workflows/release.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Install dependency
3939
uses: crazy-max/ghaction-chocolatey@v1
4040
with:
41-
args: install cmake ninja vswhere
41+
args: install cmake ninja vswhere 7zip.install
4242
- name: Upgrade dependency
4343
uses: crazy-max/ghaction-chocolatey@v1
4444
with:
@@ -76,8 +76,17 @@ jobs:
7676
cmake -Bbuild -GNinja "-DCMAKE_SYSTEM_VERSION=$cmake_sys_ver" -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.rtlib }} -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=ZIP "-DCMAKE_INSTALL_PREFIX=$pwd\\prefix" -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS="lld;clang;clang-tools-extra" -DLLVM_ENABLE_DIA_SDK=OFF llvm-project\\llvm
7777
cmake --build build --target package
7878
79+
- name: Repack zip package
80+
run: |
81+
$name = (Get-Item build/LLVM-*.zip).Name
82+
$basename = (Get-Item build/LLVM-*.zip).BaseName
83+
Remove-Item -Recurse -Force "$basename"
84+
Expand-Archive -Path "build/$name" -DestinationPath "$pwd"
85+
Remove-Item "build/$name"
86+
7z a -mx=9 -tzip -mtm=off -mtc=off -mta=off "build/$name" "$basename"
87+
7988
- name: Upload LLVM zip package
8089
env:
8190
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8291
run: |
83-
gh release upload LLVM-17.0.6-win64-${{ matrix.rtlib }}.zip build/LLVM-17.0.6-win64.zip --clobber
92+
gh release upload LLVM-17.0.6-win64-${{ matrix.rtlib }}.zip build/*.zip --clobber

0 commit comments

Comments
 (0)