Skip to content

Commit c12ac54

Browse files
committed
use 3 compression level by default and go max power 22 ultra for CI
1 parent 37d65eb commit c12ac54

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ jobs:
4343
echo "CACHE_HIT=true" >> $env:GITHUB_ENV
4444
}
4545
46-
- name: Build Image Without Cache
46+
- name: Build Image
4747
if: env.CACHE_HIT != 'true'
4848
shell: pwsh
4949
run: |
50-
docker build -t app:latest .
50+
docker build --isolation process --build-arg "IMPL_COMPRESSION_OPTIONS=-T0 --ultra" --build-arg "IMPL_COMPRESSION_LEVEL=22" -t app:latest .
5151
5252
- name: Save Docker Image to TAR
5353
if: env.CACHE_HIT != 'true'
@@ -67,13 +67,18 @@ jobs:
6767
- name: Run Nano Container
6868
shell: pwsh
6969
run: |
70-
docker run -di --name orphan app:latest
70+
docker run --isolation process -di --name orphan app:latest
7171
7272
- name: Inspect Nano Container
7373
shell: pwsh
7474
run: |
7575
docker inspect orphan
7676
77+
- name: Nano Container - Unpack Artifacts
78+
shell: pwsh
79+
run: |
80+
docker exec C:\unpack.ps1
81+
7782
- name: Nano Container - Configure CMake Project
7883
shell: pwsh
7984
run: |

Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ ARG MSVC_VERSION=14.43.34808
2727
ARG CLANGCL_VERSION=19.1.1
2828

2929
ARG IMPL_ARTIFACTS_DIR="C:\artifacts"
30-
ARG IMPL_COMPRESSION_ARGS=-T0
30+
ARG IMPL_COMPRESSION_OPTIONS=-T0
31+
ARG IMPL_COMPRESSION_LEVEL=3
3132

3233
ARG IMPL_NANO_BASE=mcr.microsoft.com/powershell
3334
ARG IMPL_NANO_TAG=lts-nanoserver-ltsc2022
@@ -187,12 +188,13 @@ COPY --link --from=git ["${IMPL_ARTIFACTS_DIR}", "C:/pack/Git"]
187188
COPY --link --from=zstd ["${IMPL_ARTIFACTS_DIR}", "C:/compress"]
188189

189190
ARG ZSTD_VERSION
190-
ARG IMPL_COMPRESSION_ARGS
191+
ARG IMPL_COMPRESSION_OPTIONS
192+
ARG IMPL_COMPRESSION_LEVEL
191193

192194
WORKDIR C:\pack
193195
RUN $dirs = Get-ChildItem -Directory | ForEach-Object { $_.Name }; $dirs; `
194-
tar -cf artifacts.tar @dirs; dir artifacts.tar; `
195-
& "C:\compress\zstd-v$env:ZSTD_VERSION-win64\zstd.exe" $env:IMPL_COMPRESSION_ARGS artifacts.tar; dir artifacts.tar.zst; `
196+
tar -cf artifacts.tar @dirs; dir artifacts.tar; $compressionOpts = $env:IMPL_COMPRESSION_OPTIONS -split ' '; `
197+
& "C:\compress\zstd-v$env:ZSTD_VERSION-win64\zstd.exe" @compressionOpts artifacts.tar "-$env:IMPL_COMPRESSION_LEVEL"; dir artifacts.tar.zst; `
196198
rm artifacts.tar
197199

198200
# ---------------- FINAL IMAGE ----------------

0 commit comments

Comments
 (0)