Squashed commit of the following:

commit a5dd19643edd71ba3bcf9d120cc0ef20c1904104
Author: Łukasz Domeradzki <JustArchi@JustArchi.net>
Date:   Tue Mar 26 03:43:50 2024 +0100

    How about this one

commit 7f44554a5433931339dc479a6101f942c5d5fb97
Author: Łukasz Domeradzki <JustArchi@JustArchi.net>
Date:   Tue Mar 26 03:14:04 2024 +0100

    Here as well

commit 8593cd169949dc5876c1a3c4e4561d2ca38d7350
Author: Łukasz Domeradzki <JustArchi@JustArchi.net>
Date:   Tue Mar 26 03:13:36 2024 +0100

    Okay

commit 9d17fee1f8f9bd3ae91f144761885d10e52b67ae
Author: Łukasz Domeradzki <JustArchi@JustArchi.net>
Date:   Tue Mar 26 03:08:49 2024 +0100

    Restore everything first

commit 2835332dabf17a9dcdea3fc4f75e0c650add622c
Author: Łukasz Domeradzki <JustArchi@JustArchi.net>
Date:   Tue Mar 26 03:00:33 2024 +0100

    Ah right

commit 85e2db40c8d6c184e5732724ea928486456767e4
Author: Łukasz Domeradzki <JustArchi@JustArchi.net>
Date:   Tue Mar 26 02:59:31 2024 +0100

    And this?

commit 974cffb61782a4dbc83dfd93a66a627a69d04fd9
Author: Łukasz Domeradzki <JustArchi@JustArchi.net>
Date:   Tue Mar 26 02:33:52 2024 +0100

    Docker improvements

commit 95f40803615f7056f59a522b068600dfbb87b4de
Author: Łukasz Domeradzki <JustArchi@JustArchi.net>
Date:   Tue Mar 26 02:22:30 2024 +0100

    Misc

commit 0f5b526c603d5cfe0f29b4f4b8420d01f76161fc
Author: Łukasz Domeradzki <JustArchi@JustArchi.net>
Date:   Tue Mar 26 02:09:42 2024 +0100

    Make bundled plugins variant-specific

    Since we're including them as part of OS-specific builds, we can also limit their dependencies to those OSes exclusively.

    Might help cut some unnecessary dependencies.
This commit is contained in:
Łukasz Domeradzki
2024-03-26 04:42:31 +01:00
parent 721380b153
commit 30092cc326
3 changed files with 51 additions and 11 deletions

View File

@@ -45,6 +45,7 @@ jobs:
- name: Upload ASF-ui
uses: actions/upload-artifact@v4.3.1
with:
if-no-files-found: error
name: ASF-ui
path: ASF-ui/dist
@@ -128,28 +129,44 @@ jobs:
- name: Prepare for publishing on Unix
if: startsWith(matrix.os, 'macos-') || startsWith(matrix.os, 'ubuntu-')
env:
VARIANT: ${{ matrix.variant }}
shell: bash
run: |
set -euo pipefail
dotnet restore
dotnet build ArchiSteamFarm -c "$CONFIGURATION" -p:ContinuousIntegrationBuild=true -p:TargetLatestRuntimePatch=false -p:UseAppHost=false --nologo
if [ "$VARIANT" = 'generic' ]; then
variantArgs="-p:TargetLatestRuntimePatch=false -p:UseAppHost=false"
else
variantArgs="-r $VARIANT"
fi
dotnet restore $variantArgs
dotnet build ArchiSteamFarm -c "$CONFIGURATION" "-p:ASFVariant=${VARIANT}" -p:ContinuousIntegrationBuild=true --nologo $variantArgs
- name: Prepare for publishing on Windows
if: startsWith(matrix.os, 'windows-')
env:
VARIANT: ${{ matrix.variant }}
shell: pwsh
run: |
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
dotnet restore
if ($env:VARIANT -like 'generic*') {
$variantArgs = '-p:TargetLatestRuntimePatch=false', '-p:UseAppHost=false'
} else {
$variantArgs = '-r', "$env:VARIANT"
}
dotnet restore $variantArgs
if ($LastExitCode -ne 0) {
throw "Last command failed."
}
dotnet build ArchiSteamFarm -c "$env:CONFIGURATION" -p:ContinuousIntegrationBuild=true -p:TargetLatestRuntimePatch=false -p:UseAppHost=false --nologo
dotnet build ArchiSteamFarm -c "$env:CONFIGURATION" "-p:ASFVariant=$env:VARIANT" -p:ContinuousIntegrationBuild=true --nologo $variantArgs
if ($LastExitCode -ne 0) {
throw "Last command failed."
@@ -186,12 +203,19 @@ jobs:
if: startsWith(matrix.os, 'macos-') || startsWith(matrix.os, 'ubuntu-')
env:
MAX_JOBS: 4
VARIANT: ${{ matrix.variant }}
shell: bash
run: |
set -euo pipefail
publish() {
dotnet publish "$1" -c "$CONFIGURATION" -o "out/${1}" -p:ContinuousIntegrationBuild=true -p:TargetLatestRuntimePatch=false -p:UseAppHost=false --no-restore --nologo
if [ "$VARIANT" = 'generic' ]; then
variantArgs="-p:TargetLatestRuntimePatch=false -p:UseAppHost=false"
else
variantArgs="-r $VARIANT"
fi
dotnet publish "$1" -c "$CONFIGURATION" -o "out/${1}" "-p:ASFVariant=${VARIANT}" -p:ContinuousIntegrationBuild=true --nologo $variantArgs
}
for plugin in $PLUGINS_BUNDLED; do
@@ -208,6 +232,7 @@ jobs:
if: startsWith(matrix.os, 'windows-')
env:
MAX_JOBS: 4
VARIANT: ${{ matrix.variant }}
shell: pwsh
run: |
Set-StrictMode -Version Latest
@@ -223,7 +248,13 @@ jobs:
Set-Location "$env:GITHUB_WORKSPACE"
dotnet publish "$plugin" -c "$env:CONFIGURATION" -o "out\$plugin" -p:ContinuousIntegrationBuild=true -p:TargetLatestRuntimePatch=false -p:UseAppHost=false --no-restore --nologo
if ($env:VARIANT -like 'generic*') {
$variantArgs = '-p:TargetLatestRuntimePatch=false', '-p:UseAppHost=false'
} else {
$variantArgs = '-r', "$env:VARIANT"
}
dotnet publish "$plugin" -c "$env:CONFIGURATION" -o "out\$plugin" "-p:ASFVariant=$env:VARIANT" -p:ContinuousIntegrationBuild=true --nologo $variantArgs
if ($LastExitCode -ne 0) {
throw "Last command failed."
@@ -249,12 +280,13 @@ jobs:
if: ${{ matrix.os == 'ubuntu-latest' && matrix.variant == 'generic' }}
env:
MAX_JOBS: 4
VARIANT: ${{ matrix.variant }}
shell: bash
run: |
set -euo pipefail
publish() {
dotnet publish "$1" -c "$CONFIGURATION" -o "out/${1}" -p:ContinuousIntegrationBuild=true -p:TargetLatestRuntimePatch=false -p:UseAppHost=false --no-restore --nologo
dotnet publish "$1" -c "$CONFIGURATION" -o "out/${1}" "-p:ASFVariant=${VARIANT}" -p:ContinuousIntegrationBuild=true -p:TargetLatestRuntimePatch=false -p:UseAppHost=false --nologo
# By default use fastest compression
seven_zip_args="-mx=1"
@@ -294,6 +326,7 @@ jobs:
if: ${{ matrix.os == 'ubuntu-latest' && matrix.variant == 'generic' }}
uses: actions/upload-artifact@v4.3.1
with:
if-no-files-found: error
name: ArchiSteamFarm.OfficialPlugins.Monitoring
path: out/ArchiSteamFarm.OfficialPlugins.Monitoring.zip
@@ -454,6 +487,7 @@ jobs:
- name: Upload ASF-${{ matrix.variant }}
uses: actions/upload-artifact@v4.3.1
with:
if-no-files-found: error
name: ${{ matrix.os }}_ASF-${{ matrix.variant }}
path: out/ASF-${{ matrix.variant }}.zip
@@ -545,12 +579,14 @@ jobs:
- name: Upload SHA512SUMS
uses: actions/upload-artifact@v4.3.1
with:
if-no-files-found: error
name: SHA512SUMS
path: out/SHA512SUMS
- name: Upload SHA512SUMS.sign
uses: actions/upload-artifact@v4.3.1
with:
if-no-files-found: error
name: SHA512SUMS.sign
path: out/SHA512SUMS.sign

View File

@@ -51,8 +51,10 @@ RUN set -eu; \
fi; \
\
for plugin in $PLUGINS_BUNDLED; do \
dotnet publish "$plugin" -c "$CONFIGURATION" -o "out/plugins/$plugin" -p:ASFVariant=docker -p:ContinuousIntegrationBuild=true -p:UseAppHost=false -r "$asf_variant" --nologo --no-self-contained; \
done
dotnet publish "$plugin" -c "$CONFIGURATION" -o "out/plugins/$plugin" -p:ASFVariant=docker -p:ContinuousIntegrationBuild=true -p:UseAppHost=false -r "$asf_variant" --nologo & \
done; \
\
wait
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet:8.0${IMAGESUFFIX} AS runtime
ENV ASF_PATH /app

View File

@@ -51,8 +51,10 @@ RUN set -eu; \
fi; \
\
for plugin in $PLUGINS_BUNDLED; do \
dotnet publish "$plugin" -c "$CONFIGURATION" -o "out/plugins/$plugin" "-p:ASFVariant=${asf_variant}" -p:ContinuousIntegrationBuild=true -p:UseAppHost=false -r "$asf_variant" --nologo --no-self-contained; \
done
dotnet publish "$plugin" -c "$CONFIGURATION" -o "out/plugins/$plugin" "-p:ASFVariant=${asf_variant}" -p:ContinuousIntegrationBuild=true -p:UseAppHost=false -r "$asf_variant" --nologo & \
done; \
\
wait
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/runtime-deps:8.0${IMAGESUFFIX} AS runtime
ENV ASF_PATH /app