Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit a5dd196
Author: Łukasz Domeradzki <[email protected]>
Date:   Tue Mar 26 03:43:50 2024 +0100

    How about this one

commit 7f44554
Author: Łukasz Domeradzki <[email protected]>
Date:   Tue Mar 26 03:14:04 2024 +0100

    Here as well

commit 8593cd1
Author: Łukasz Domeradzki <[email protected]>
Date:   Tue Mar 26 03:13:36 2024 +0100

    Okay

commit 9d17fee
Author: Łukasz Domeradzki <[email protected]>
Date:   Tue Mar 26 03:08:49 2024 +0100

    Restore everything first

commit 2835332
Author: Łukasz Domeradzki <[email protected]>
Date:   Tue Mar 26 03:00:33 2024 +0100

    Ah right

commit 85e2db4
Author: Łukasz Domeradzki <[email protected]>
Date:   Tue Mar 26 02:59:31 2024 +0100

    And this?

commit 974cffb
Author: Łukasz Domeradzki <[email protected]>
Date:   Tue Mar 26 02:33:52 2024 +0100

    Docker improvements

commit 95f4080
Author: Łukasz Domeradzki <[email protected]>
Date:   Tue Mar 26 02:22:30 2024 +0100

    Misc

commit 0f5b526
Author: Łukasz Domeradzki <[email protected]>
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.
  • Loading branch information
JustArchi committed Mar 26, 2024
1 parent 721380b commit 30092cc
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 11 deletions.
50 changes: 43 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
- name: Upload ASF-ui
uses: actions/[email protected]
with:
if-no-files-found: error
name: ASF-ui
path: ASF-ui/dist

Expand Down Expand Up @@ -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."
Expand Down Expand Up @@ -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
Expand All @@ -208,6 +232,7 @@ jobs:
if: startsWith(matrix.os, 'windows-')
env:
MAX_JOBS: 4
VARIANT: ${{ matrix.variant }}
shell: pwsh
run: |
Set-StrictMode -Version Latest
Expand All @@ -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."
Expand All @@ -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"
Expand Down Expand Up @@ -294,6 +326,7 @@ jobs:
if: ${{ matrix.os == 'ubuntu-latest' && matrix.variant == 'generic' }}
uses: actions/[email protected]
with:
if-no-files-found: error
name: ArchiSteamFarm.OfficialPlugins.Monitoring
path: out/ArchiSteamFarm.OfficialPlugins.Monitoring.zip

Expand Down Expand Up @@ -454,6 +487,7 @@ jobs:
- name: Upload ASF-${{ matrix.variant }}
uses: actions/[email protected]
with:
if-no-files-found: error
name: ${{ matrix.os }}_ASF-${{ matrix.variant }}
path: out/ASF-${{ matrix.variant }}.zip

Expand Down Expand Up @@ -545,12 +579,14 @@ jobs:
- name: Upload SHA512SUMS
uses: actions/[email protected]
with:
if-no-files-found: error
name: SHA512SUMS
path: out/SHA512SUMS

- name: Upload SHA512SUMS.sign
uses: actions/[email protected]
with:
if-no-files-found: error
name: SHA512SUMS.sign
path: out/SHA512SUMS.sign

Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile.Service
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 30092cc

Please sign in to comment.