From 5b4241590ccda43b3236805ab4ce4db0bc83c032 Mon Sep 17 00:00:00 2001 From: David Sungaila Date: Wed, 3 Jul 2024 10:26:42 +0200 Subject: [PATCH] Update dockerfiles --- .github/workflows/dotnet.yml | 32 ++++++++++++++++---------------- src/Tests/Dockerfiles/linux | 3 --- src/Tests/Dockerfiles/windows | 3 --- 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index ad5c1ffd..084fcada 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -244,30 +244,30 @@ jobs: uses: actions/checkout@main with: fetch-depth: 0 - - name: aotconsole linux + - name: console linux if: runner.os == 'Linux' && (success() || failure()) - run: docker build -t aotconsole -f src/FrameworkTests/AotConsole/Dockerfiles/linux . && docker run --rm -t aotconsole - - name: aotconsole linux-chiseled + run: docker build -t console -f src/FrameworkTests/AotConsole/Dockerfiles/linux . && docker run --rm -t console + - name: console linux-chiseled if: runner.os == 'Linux' && (success() || failure()) - run: docker build -t aotconsole -f src/FrameworkTests/AotConsole/Dockerfiles/linux-chiseled . && docker run --rm -t aotconsole - - name: aotconsole linux-aot + run: docker build -t console -f src/FrameworkTests/AotConsole/Dockerfiles/linux-chiseled . && docker run --rm -t console + - name: console linux-aot if: runner.os == 'Linux' && (success() || failure()) - run: docker build -t aotconsole -f src/FrameworkTests/AotConsole/Dockerfiles/linux-aot . && docker run --rm -t aotconsole - - name: aotconsole linux-aot-chiseled + run: docker build -t console -f src/FrameworkTests/AotConsole/Dockerfiles/linux-aot . && docker run --rm -t console + - name: console linux-aot-chiseled if: runner.os == 'Linux' && (success() || failure()) - run: docker build -t aotconsole -f src/FrameworkTests/AotConsole/Dockerfiles/linux-aot-chiseled . && docker run --rm -t aotconsole - - name: aotconsole windows + run: docker build -t console -f src/FrameworkTests/AotConsole/Dockerfiles/linux-aot-chiseled . && docker run --rm -t console + - name: console windows if: runner.os == 'Windows' && (success() || failure()) - run: docker build -t aotconsole -f src/FrameworkTests/AotConsole/Dockerfiles/windows . && docker run --rm -t aotconsole - - name: aotconsole windows-aot + run: docker build -t console -f src/FrameworkTests/AotConsole/Dockerfiles/windows . && docker run --rm -t console + - name: console windows-aot if: runner.os == 'Windows' && (success() || failure()) - run: docker build -t aotconsole -f src/FrameworkTests/AotConsole/Dockerfiles/windows-aot . && docker run --rm -t aotconsole - - name: test-client linux + run: docker build -t console -f src/FrameworkTests/AotConsole/Dockerfiles/windows-aot . && docker run --rm -t console + - name: unittests linux if: runner.os == 'Linux' && (success() || failure()) - run: docker build -t test-client --build-arg TARGET_FRAMEWORK=net8.0 -f src/Tests/Dockerfiles/linux . && docker run --rm --mount type=bind,source=${{ github.workspace }}/src/Tests,target=/app/TestResults -t test-client net8.0/PDFtoImage.Tests.dll - - name: test-client windows + run: docker build -t unittests --build-arg TARGET_FRAMEWORK=net8.0 -f src/Tests/Dockerfiles/linux . && docker run --rm --mount type=bind,source=${{ github.workspace }}/src/Tests,target=/app/TestResults -t unittests net8.0/PDFtoImage.Tests.dll + - name: unittests windows if: runner.os == 'Windows' && (success() || failure()) - run: docker build -t test-client --build-arg TARGET_FRAMEWORK=net8.0 -f src/Tests/Dockerfiles/windows . && docker run --rm --mount type=bind,source=${{ github.workspace }}/src/Tests,target=/app/TestResults -t test-client net8.0/PDFtoImage.Tests.dll + run: docker build -t unittests --build-arg TARGET_FRAMEWORK=net8.0 -f src/Tests/Dockerfiles/windows . && docker run --rm --mount type=bind,source=${{ github.workspace }}/src/Tests,target=/app/TestResults -t unittests net8.0/PDFtoImage.Tests.dll - name: Upload test results if: success() || failure() uses: actions/upload-artifact@main diff --git a/src/Tests/Dockerfiles/linux b/src/Tests/Dockerfiles/linux index 4f096b6a..b06c55af 100644 --- a/src/Tests/Dockerfiles/linux +++ b/src/Tests/Dockerfiles/linux @@ -14,9 +14,6 @@ RUN dotnet build "./Tests/Tests.csproj" -c $BUILD_CONFIGURATION -o /app/build/$T FROM build AS publish ARG BUILD_CONFIGURATION=Release -RUN apt update && apt install -y \ - clang \ - zlib1g-dev RUN dotnet publish "./Tests/Tests.csproj" -c $BUILD_CONFIGURATION -o /app/publish --no-restore -f $TARGET_FRAMEWORK FROM base AS final diff --git a/src/Tests/Dockerfiles/windows b/src/Tests/Dockerfiles/windows index 029e5b86..3c571ae1 100644 --- a/src/Tests/Dockerfiles/windows +++ b/src/Tests/Dockerfiles/windows @@ -14,9 +14,6 @@ RUN dotnet build "./Tests/Tests.csproj" -c $BUILD_CONFIGURATION -o /app/build/$T FROM build AS publish ARG BUILD_CONFIGURATION=Release -RUN apt update && apt install -y \ - clang \ - zlib1g-dev RUN dotnet publish "./Tests/Tests.csproj" -c $BUILD_CONFIGURATION -o /app/publish --no-restore -f $TARGET_FRAMEWORK FROM base AS final