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)
This commit is contained in:
Archi 2021-08-01 13:11:51 +02:00
parent 4bdbbedfb1
commit a40bb74d35
No known key found for this signature in database
GPG key ID: 6B138B4C64555AEA
4 changed files with 13 additions and 10 deletions

View file

@ -3,7 +3,6 @@ name: ASF-ci
on: [push, pull_request] on: [push, pull_request]
env: env:
CONFIGURATION: Release
DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1 DOTNET_NOLOGO: 1
DOTNET_SDK_VERSION: 5.0.x DOTNET_SDK_VERSION: 5.0.x
@ -13,6 +12,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
configuration: [Debug, Release]
os: [macos-latest, ubuntu-latest, windows-latest] os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@ -31,15 +31,15 @@ jobs:
- name: Verify .NET Core - name: Verify .NET Core
run: dotnet --info run: dotnet --info
- name: Build ArchiSteamFarm and other projects - name: Build ${{ matrix.configuration }} ArchiSteamFarm and other projects
run: dotnet build -c "${{ env.CONFIGURATION }}" -p:ContinuousIntegrationBuild=true -p:UseAppHost=false --nologo run: dotnet build -c "${{ matrix.configuration }}" -p:ContinuousIntegrationBuild=true -p:UseAppHost=false --nologo
- name: Run ArchiSteamFarm.Tests - name: Run ${{ matrix.configuration }} ArchiSteamFarm.Tests
run: dotnet test ArchiSteamFarm.Tests -c "${{ env.CONFIGURATION }}" -p:ContinuousIntegrationBuild=true -p:UseAppHost=false --nologo run: dotnet test ArchiSteamFarm.Tests -c "${{ matrix.configuration }}" -p:ContinuousIntegrationBuild=true -p:UseAppHost=false --nologo
- name: Upload latest strings for translation on Crowdin - name: Upload latest strings for translation on Crowdin
continue-on-error: true 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 uses: crowdin/github-action@1.3.0
with: with:
crowdin_branch_name: main crowdin_branch_name: main

View file

@ -10,6 +10,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
configuration: [Debug, Release]
file: [Dockerfile, Dockerfile.Service] file: [Dockerfile, Dockerfile.Service]
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -23,10 +24,12 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.5.1 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 uses: docker/build-push-action@v2.6.1
with: with:
context: . context: .
file: ${{ matrix.file }} file: ${{ matrix.file }}
platforms: ${{ env.PLATFORMS }} 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 }}

View file

@ -9,10 +9,10 @@ RUN echo "node: $(node --version)" && \
npm run deploy --no-progress npm run deploy --no-progress
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:5.0${IMAGESUFFIX} AS build-dotnet FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:5.0${IMAGESUFFIX} AS build-dotnet
ARG CONFIGURATION=Release
ARG STEAM_TOKEN_DUMPER_TOKEN ARG STEAM_TOKEN_DUMPER_TOKEN
ARG TARGETARCH ARG TARGETARCH
ARG TARGETOS ARG TARGETOS
ENV CONFIGURATION Release
ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 ENV DOTNET_CLI_TELEMETRY_OPTOUT 1
ENV DOTNET_NOLOGO 1 ENV DOTNET_NOLOGO 1
ENV NET_CORE_VERSION net5.0 ENV NET_CORE_VERSION net5.0

View file

@ -9,10 +9,10 @@ RUN echo "node: $(node --version)" && \
npm run deploy --no-progress npm run deploy --no-progress
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:5.0${IMAGESUFFIX} AS build-dotnet FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:5.0${IMAGESUFFIX} AS build-dotnet
ARG CONFIGURATION=Release
ARG STEAM_TOKEN_DUMPER_TOKEN ARG STEAM_TOKEN_DUMPER_TOKEN
ARG TARGETARCH ARG TARGETARCH
ARG TARGETOS ARG TARGETOS
ENV CONFIGURATION Release
ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 ENV DOTNET_CLI_TELEMETRY_OPTOUT 1
ENV DOTNET_NOLOGO 1 ENV DOTNET_NOLOGO 1
ENV NET_CORE_VERSION net5.0 ENV NET_CORE_VERSION net5.0