From a40bb74d35d52fc37bd5cacf3e9f5c89448286a0 Mon Sep 17 00:00:00 2001 From: Archi Date: Sun, 1 Aug 2021 13:11:51 +0200 Subject: [PATCH] CI: Enable build also for debug configuration With more and more conditionals depending on the configuration it starts making sense to build and test also debug build (it was broken for a short while) --- .github/workflows/ci.yml | 12 ++++++------ .github/workflows/docker-ci.yml | 7 +++++-- Dockerfile | 2 +- Dockerfile.Service | 2 +- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f35f3a95..ff12cceea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,6 @@ name: ASF-ci on: [push, pull_request] env: - CONFIGURATION: Release DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_NOLOGO: 1 DOTNET_SDK_VERSION: 5.0.x @@ -13,6 +12,7 @@ jobs: strategy: fail-fast: false matrix: + configuration: [Debug, Release] os: [macos-latest, ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} @@ -31,15 +31,15 @@ jobs: - name: Verify .NET Core run: dotnet --info - - name: Build ArchiSteamFarm and other projects - run: dotnet build -c "${{ env.CONFIGURATION }}" -p:ContinuousIntegrationBuild=true -p:UseAppHost=false --nologo + - name: Build ${{ matrix.configuration }} ArchiSteamFarm and other projects + run: dotnet build -c "${{ matrix.configuration }}" -p:ContinuousIntegrationBuild=true -p:UseAppHost=false --nologo - - name: Run ArchiSteamFarm.Tests - run: dotnet test ArchiSteamFarm.Tests -c "${{ env.CONFIGURATION }}" -p:ContinuousIntegrationBuild=true -p:UseAppHost=false --nologo + - name: Run ${{ matrix.configuration }} ArchiSteamFarm.Tests + run: dotnet test ArchiSteamFarm.Tests -c "${{ matrix.configuration }}" -p:ContinuousIntegrationBuild=true -p:UseAppHost=false --nologo - name: Upload latest strings for translation on Crowdin continue-on-error: true - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && startsWith(matrix.os, 'ubuntu-') }} + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.configuration == 'Release' && startsWith(matrix.os, 'ubuntu-') }} uses: crowdin/github-action@1.3.0 with: crowdin_branch_name: main diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index f06f2dc14..f7537ee23 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -10,6 +10,7 @@ jobs: strategy: fail-fast: false matrix: + configuration: [Debug, Release] file: [Dockerfile, Dockerfile.Service] runs-on: ubuntu-latest @@ -23,10 +24,12 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1.5.1 - - name: Build Docker image from ${{ matrix.file }} + - name: Build ${{ matrix.configuration }} Docker image from ${{ matrix.file }} uses: docker/build-push-action@v2.6.1 with: context: . file: ${{ matrix.file }} platforms: ${{ env.PLATFORMS }} - build-args: STEAM_TOKEN_DUMPER_TOKEN=${{ secrets.STEAM_TOKEN_DUMPER_TOKEN }} + build-args: | + CONFIGURATION=${{ matrix.configuration }} + STEAM_TOKEN_DUMPER_TOKEN=${{ secrets.STEAM_TOKEN_DUMPER_TOKEN }} diff --git a/Dockerfile b/Dockerfile index 2f91c6f22..1cb18c43d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,10 +9,10 @@ RUN echo "node: $(node --version)" && \ npm run deploy --no-progress FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:5.0${IMAGESUFFIX} AS build-dotnet +ARG CONFIGURATION=Release ARG STEAM_TOKEN_DUMPER_TOKEN ARG TARGETARCH ARG TARGETOS -ENV CONFIGURATION Release ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 ENV DOTNET_NOLOGO 1 ENV NET_CORE_VERSION net5.0 diff --git a/Dockerfile.Service b/Dockerfile.Service index 343fdb0f6..6995b6d62 100644 --- a/Dockerfile.Service +++ b/Dockerfile.Service @@ -9,10 +9,10 @@ RUN echo "node: $(node --version)" && \ npm run deploy --no-progress FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:5.0${IMAGESUFFIX} AS build-dotnet +ARG CONFIGURATION=Release ARG STEAM_TOKEN_DUMPER_TOKEN ARG TARGETARCH ARG TARGETOS -ENV CONFIGURATION Release ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 ENV DOTNET_NOLOGO 1 ENV NET_CORE_VERSION net5.0