Skip to content

Commit

Permalink
[CI] Repack zip file without timestamp
Browse files Browse the repository at this point in the history
Signed-off-by: Shen-Ta Hsieh <[email protected]>
  • Loading branch information
ibmibmibm committed Jun 14, 2024
1 parent 4843cca commit 0f8709e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Install dependency
uses: crazy-max/ghaction-chocolatey@v1
with:
args: install cmake ninja vswhere
args: install cmake ninja vswhere 7zip.install
- name: Upgrade dependency
uses: crazy-max/ghaction-chocolatey@v1
with:
Expand Down Expand Up @@ -62,9 +62,19 @@ jobs:
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
cmake --build build --target package
- name: Repack zip package
run: |
$name = (Get-Item build/LLVM-*.zip).Name
$basename = (Get-Item build/LLVM-*.zip).BaseName
Remove-Item -Recurse -Force "$basename"
Expand-Archive -Path "build/$name" -DestinationPath "$pwd"
Remove-Item "build/$name"
7z a -mx=9 -tzip -mtm=off -mtc=off -mta=off "build/$name" "$basename"
- name: Upload Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: llvm-${{ matrix.rtlib }}
path: build/*.zip
retention-days: 14
compression-level: 0
13 changes: 11 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Install dependency
uses: crazy-max/ghaction-chocolatey@v1
with:
args: install cmake ninja vswhere
args: install cmake ninja vswhere 7zip.install
- name: Upgrade dependency
uses: crazy-max/ghaction-chocolatey@v1
with:
Expand Down Expand Up @@ -76,8 +76,17 @@ jobs:
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
cmake --build build --target package
- name: Repack zip package
run: |
$name = (Get-Item build/LLVM-*.zip).Name
$basename = (Get-Item build/LLVM-*.zip).BaseName
Remove-Item -Recurse -Force "$basename"
Expand-Archive -Path "build/$name" -DestinationPath "$pwd"
Remove-Item "build/$name"
7z a -mx=9 -tzip -mtm=off -mtc=off -mta=off "build/$name" "$basename"
- name: Upload LLVM zip package
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload LLVM-17.0.6-win64-${{ matrix.rtlib }}.zip build/LLVM-17.0.6-win64.zip --clobber
gh release upload LLVM-17.0.6-win64-${{ matrix.rtlib }}.zip build/*.zip --clobber

0 comments on commit 0f8709e

Please sign in to comment.