Skip to content

Commit e2b83ad

Browse files
committed
copy sample to the image, update workflows/main.yml
1 parent 57a8933 commit e2b83ad

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

.dockerignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
**
2-
!redist/**
1+
tests/build*/**
2+
tests/3rdparty/packages*/*

.github/workflows/main.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ jobs:
1515
- name: Checkout Repository
1616
uses: actions/checkout@v4
1717

18+
- name: Setup environment
19+
shell: pwsh
20+
run: |
21+
Set-MpPreference -DisableRealtimeMonitoring $true
22+
1823
- name: Restore Cached Image TAR
1924
uses: actions/cache@v4
2025
with:
@@ -56,19 +61,19 @@ jobs:
5661
- name: Run Nano Container
5762
shell: pwsh
5863
run: |
59-
docker run -di --name orphan -v "${{ github.workspace }}:C:\app" app:latest
64+
docker run -di --name orphan app:latest
6065
6166
- name: Nano Container - Configure CMake Project
6267
shell: pwsh
6368
run: |
64-
docker exec -w "C:\app\tests" -i orphan cmd /c cmake --preset configure-msvc-winsdk
69+
docker exec orphan cmake --preset configure-msvc-winsdk
6570
6671
- name: Nano Container - Build the Project
6772
shell: pwsh
6873
run: |
69-
docker exec -w "C:\app\tests" -i orphan cmd /c cmake --build --preset build-msvc-winsdk --config Release
74+
docker exec orphan cmake --build --preset build-msvc-winsdk --config Release
7075
7176
- name: Nano Container - Test the Project
7277
shell: pwsh
7378
run: |
74-
docker exec -w "C:\app\tests\build-ct\src" -i orphan cmd /c ctest -C Release --stop-on-failure --verbose
79+
docker exec -w "C:\sample\tests\build-ct\src" orphan ctest -C Release --stop-on-failure --verbose

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ VS_INSTANCE_LOCATION=C:\BuildTools `
152152
MSVC_VERSION=${MSVC_VERSION} `
153153
MSVC_TOOLSET_DIR=C:\BuildTools\VC\Tools\MSVC\${MSVC_VERSION} `
154154
PATH="C:\Windows\system32;C:\Windows;C:\Program Files\PowerShell;C:\Git\cmd;C:\Git\bin;C:\Git\usr\bin;C:\Git\mingw64\bin;C:\CMake\cmake-${CMAKE_VERSION}-windows-x86_64\bin;C:\Python;C:\Nasm;C:\Nasm\nasm-${NASM_VERSION};C:\Ninja;"
155-
RUN git config --global --add safe.directory '*'
156155

156+
COPY . sample/
157+
WORKDIR C:\sample\tests
157158
CMD ["pwsh.exe", "-NoLogo", "-NoProfile", "-ExecutionPolicy", "Bypass"]

0 commit comments

Comments
 (0)