Skip to content

Commit

Permalink
Merge pull request #2617 from planetarium/release/210
Browse files Browse the repository at this point in the history
Release 210
  • Loading branch information
U-lis authored Oct 28, 2024
2 parents 37398fd + 294d5d1 commit 9a05060
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 553 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/push_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,16 @@ jobs:
docker build . \
-f ${{ matrix.docker.dockerfile }}.amd64 \
-t ${{ matrix.docker.repo }}:git-${{ github.sha }}-amd64 \
--build-arg COMMIT=git-${{ github.sha }}
--build-arg COMMIT=git-${{ github.sha }} \
--build-arg TARGETPLATFORM=linux/amd64
docker push ${{ matrix.docker.repo }}:git-${{ github.sha }}-amd64
- name: build-and-push-arm64v8
run: |
docker build . \
-f ${{ matrix.docker.dockerfile }}.arm64v8 \
-t ${{ matrix.docker.repo }}:git-${{ github.sha }}-arm64v8 \
--build-arg COMMIT=git-${{ github.sha }}
--build-arg COMMIT=git-${{ github.sha }} \
--build-arg TARGETPLATFORM=linux/arm64
docker push ${{ matrix.docker.repo }}:git-${{ github.sha }}-arm64v8
- name: merge-manifest-and-push
run: |
Expand Down
28 changes: 23 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy AS build-env
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
WORKDIR /app
ARG COMMIT
ARG TARGETPLATFORM

# Copy csproj and restore as distinct layers
COPY ./Lib9c/Lib9c/Lib9c.csproj ./Lib9c/
Expand All @@ -16,23 +17,40 @@ RUN dotnet restore NineChronicles.Headless.Executable

# Copy everything else and build
COPY . ./
RUN dotnet publish NineChronicles.Headless.Executable/NineChronicles.Headless.Executable.csproj \
RUN <<EOF
#!/bin/bash
echo "TARGETPLATFROM=$TARGETPLATFORM"
if [[ "$TARGETPLATFORM" = "linux/amd64" ]]
then
dotnet publish NineChronicles.Headless.Executable/NineChronicles.Headless.Executable.csproj \
-c Release \
-r linux-x64 \
-o out \
--self-contained \
--version-suffix $COMMIT
elif [[ "$TARGETPLATFORM" = "linux/arm64" ]]
then
dotnet publish NineChronicles.Headless.Executable/NineChronicles.Headless.Executable.csproj \
-c Release \
-r linux-arm64 \
-o out \
--self-contained \
--version-suffix $COMMIT
else
echo "Not supported target platform: '$TARGETPLATFORM'."
exit -1
fi
EOF

# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:8.0
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
RUN apt-get update && apt-get install -y libc6-dev
COPY --from=build-env /app/out .

# Install native deps & utilities for production
RUN apt-get update \
&& apt-get install -y --allow-unauthenticated \
libc6-dev jq curl \
libc6-dev liblz4-dev zlib1g-dev libsnappy-dev libzstd-dev jq curl \
&& rm -rf /var/lib/apt/lists/*

VOLUME /data
Expand Down
23 changes: 21 additions & 2 deletions Dockerfile.ACC
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy AS build-env
WORKDIR /app
ARG COMMIT
ARG TARGETPLATFORM

# Copy csproj and restore as distinct layers
COPY ./Lib9c/Lib9c/Lib9c.csproj ./Lib9c/
Expand All @@ -13,15 +14,33 @@ RUN dotnet restore NineChronicles.Headless.AccessControlCenter

# Copy everything else and build
COPY . ./
RUN dotnet publish NineChronicles.Headless.AccessControlCenter/NineChronicles.Headless.AccessControlCenter.csproj \
RUN <<EOF
#!/bin/bash
echo "TARGETPLATFROM=$TARGETPLATFORM"
if [[ "$TARGETPLATFORM" = "linux/amd64" ]]
then
dotnet publish NineChronicles.Headless.AccessControlCenter/NineChronicles.Headless.AccessControlCenter.csproj \
-c Release \
-r linux-x64 \
-o out \
--self-contained \
--version-suffix $COMMIT
elif [[ "$TARGETPLATFORM" = "linux/arm64" ]]
then
dotnet publish NineChronicles.Headless.AccessControlCenter/NineChronicles.Headless.AccessControlCenter.csproj \
-c Release \
-r linux-arm64 \
-o out \
--self-contained \
--version-suffix $COMMIT
else
echo "Not supported target platform: '$TARGETPLATFORM'."
exit -1
fi
EOF

# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:8.0
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
RUN apt-get update && apt-get install -y libc6-dev
COPY --from=build-env /app/out .
Expand Down
2 changes: 1 addition & 1 deletion Lib9c
Submodule Lib9c updated 95 files
+1 −1 .Lib9c.DevExtensions.Tests/Action/CreateOrReplaceAvatarTest.cs
+53 −1 .Lib9c.Tests/Action/BattleArenaTest.cs
+62 −0 .Lib9c.Tests/Action/CancelProductRegistrationTest.cs
+3 −3 .Lib9c.Tests/Action/ClaimStakeRewardTest.cs
+40 −40 .Lib9c.Tests/Action/CustomEquipmentCraft/CustomEquipmentCraftTest.cs
+1 −1 .Lib9c.Tests/Action/EndPledgeTest.cs
+60 −0 .Lib9c.Tests/Action/EventDungeonBattleTest.cs
+1 −1 .Lib9c.Tests/Action/Garages/DeliverToOthersGaragesTest.cs
+1 −1 .Lib9c.Tests/Action/Garages/UnloadFromMyGaragesTest.cs
+6 −7 .Lib9c.Tests/Action/GrindingTest.cs
+74 −0 .Lib9c.Tests/Action/HackAndSlashSweepTest.cs
+12 −2 .Lib9c.Tests/Action/HackAndSlashTest.cs
+1 −1 .Lib9c.Tests/Action/JoinArena1Test.cs
+1 −1 .Lib9c.Tests/Action/JoinArena3Test.cs
+1 −1 .Lib9c.Tests/Action/JoinArenaTest.cs
+0 −3 .Lib9c.Tests/Action/Scenario/ArenaScenarioTest.cs
+213 −3 .Lib9c.Tests/Action/Scenario/MarketScenarioTest.cs
+0 −133 .Lib9c.Tests/Action/Scenario/Pet/AdditionalOptionRateByFixedValueTest.cs
+0 −1 .Lib9c.Tests/Action/Scenario/Pet/CommonTest.cs
+0 −1 .Lib9c.Tests/Action/Scenario/Pet/DiscountMaterialCostCrystalTest.cs
+1 −3 .Lib9c.Tests/Action/Scenario/Pet/IncreaseBlockPerHourglassTest.cs
+0 −2 .Lib9c.Tests/Action/Scenario/Pet/ReduceRequiredBlockTest.cs
+1 −1 .Lib9c.Tests/Action/Stake2Test.cs
+5 −1 .Lib9c.Tests/TableData/ArenaSheetTest.cs
+34 −26 .Lib9c.Tests/TableData/WorldBossRankingRewardSheetTest.cs
+1 −1 .Libplanet
+36 −4 .github/workflows/publish-docs.yml
+13 −0 Lib9c.Abstractions/IRapidCombinationV2.cs
+1 −1 Lib9c.Abstractions/Lib9c.Abstractions.csproj
+1 −1 Lib9c.DevExtensions/Action/CreateOrReplaceAvatar.cs
+17 −1 Lib9c.MessagePack/Formatters/ExceptionFormatter.cs
+4 −4 Lib9c.MessagePack/Lib9c.MessagePack.csproj
+1 −1 Lib9c.Renderers/Lib9c.Renderers.csproj
+87 −2 Lib9c.sln.DotSettings
+0 −28 Lib9c/Action/ActionBase.cs
+8 −5 Lib9c/Action/BattleArena.cs
+1 −1 Lib9c/Action/BuyProduct.cs
+2 −2 Lib9c/Action/CancelProductRegistration.cs
+2 −0 Lib9c/Action/CustomEquipmentCraft/CustomEquipmentCraft.cs
+1 −1 Lib9c/Action/EndPledge.cs
+1 −1 Lib9c/Action/MigrateMonsterCollection.cs
+6 −2 Lib9c/Action/RapidCombination.cs
+2 −2 Lib9c/Action/RapidCombination5.cs
+1 −1 Lib9c/Action/Stake2.cs
+6 −14 Lib9c/Arena/ArenaHelper.cs
+5 −3 Lib9c/Battle/Simulator.cs
+41 −0 Lib9c/Exceptions/MedalIdNotFoundException.cs
+0 −2 Lib9c/Helper/CustomCraftHelper.cs
+1 −1 Lib9c/Lib9c.csproj
+20 −3 Lib9c/Model/Mail/ProductCancelMail.cs
+27 −18 Lib9c/Model/State/CombinationSlotState.cs
+9 −9 Lib9c/TableCSV/AdventureBoss/AdventureBossFloorFirstRewardSheet.csv
+101 −65 Lib9c/TableCSV/Arena/ArenaSheet.csv
+1 −0 Lib9c/TableCSV/CollectionSheet.csv
+20 −20 Lib9c/TableCSV/Crystal/CrystalEquipmentGrindingSheet.csv
+133 −161 Lib9c/TableCSV/CustomEquipmentCraft/CustomEquipmentCraftIconSheet.csv
+75 −20 Lib9c/TableCSV/CustomEquipmentCraft/CustomEquipmentCraftOptionSheet.csv
+5 −5 Lib9c/TableCSV/CustomEquipmentCraft/CustomEquipmentCraftRecipeSheet.csv
+358 −10 Lib9c/TableCSV/CustomEquipmentCraft/CustomEquipmentCraftRecipeSkillSheet.csv
+6 −4 Lib9c/TableCSV/CustomEquipmentCraft/CustomEquipmentCraftRelationshipSheet.csv
+1 −1 Lib9c/TableCSV/Event/EventDungeonStageSheet.csv
+1 −1 Lib9c/TableCSV/GameConfigSheet.csv
+6 −5 Lib9c/TableCSV/Item/CostumeStatSheet.csv
+203 −10 Lib9c/TableCSV/Item/EquipmentItemOptionSheet.csv
+174 −174 Lib9c/TableCSV/Item/EquipmentItemRecipeSheet.csv
+25 −95 Lib9c/TableCSV/Item/EquipmentItemSheet.csv
+543 −543 Lib9c/TableCSV/Item/EquipmentItemSubRecipeSheetV2.csv
+26 −1 Lib9c/TableCSV/Item/ItemRequirementSheet.csv
+1 −1 Lib9c/TableCSV/Item/MaterialItemSheet.csv
+4 −4 Lib9c/TableCSV/Item/UnlockCombinationSlotCostSheet.csv
+801 −1 Lib9c/TableCSV/Pet/PetCostSheet.csv
+1,200 −400 Lib9c/TableCSV/Pet/PetOptionSheet.csv
+9 −1 Lib9c/TableCSV/Pet/PetSheet.csv
+2 −0 Lib9c/TableCSV/Skill/ActionBuffSheet.csv
+3 −1 Lib9c/TableCSV/Skill/SkillActionBuffSheet.csv
+131 −1 Lib9c/TableCSV/Skill/SkillBuffSheet.csv
+204 −1 Lib9c/TableCSV/Skill/SkillSheet.csv
+70 −1 Lib9c/TableCSV/Skill/StatBuffSheet.csv
+1 −1 Lib9c/TableCSV/Stake/StakePolicySheet.csv
+65 −0 Lib9c/TableCSV/StakeRegularRewardSheet_V8.csv
+5 −5 Lib9c/TableCSV/WorldAndStage/StageSheet.csv
+12 −12 Lib9c/TableCSV/WorldBoss/WorldBossBattleRewardSheet.csv
+12 −12 Lib9c/TableCSV/WorldBoss/WorldBossKillRewardSheet.csv
+10 −10 Lib9c/TableCSV/WorldBoss/WorldBossRankRewardSheet.csv
+19 −19 Lib9c/TableCSV/WorldBoss/WorldBossRankingRewardSheet.csv
+252 −0 Lib9c/TableCSV/_MaterialFungibleId_2024-08-22.csv
+12 −2 Lib9c/TableData/ArenaSheet.cs
+38 −7 Lib9c/TableData/WorldBossRankingRewardSheet.cs
+9 −0 docs/contributing/documentation/deployment.md
+9 −0 docs/contributing/documentation/structure.md
+5 −0 docs/contributing/documentation/toc.yml
+4 −0 docs/contributing/toc.yml
+3 −1 docs/docfx.json
+1 −11 docs/index.md
+3 −1 docs/toc.yml
5 changes: 0 additions & 5 deletions NineChronicles.Headless.Executable/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -476,11 +476,6 @@ IActionLoader MakeSingleActionLoader()
})
);

// worker
if (arenaParticipantsSync)
{
services.AddHostedService(_ => new ArenaParticipantsWorker(arenaMemoryCache, standaloneContext, headlessConfig.ArenaParticipantsSyncInterval));
}
services.AddSingleton(arenaMemoryCache);
});

Expand Down
207 changes: 0 additions & 207 deletions NineChronicles.Headless.Tests/ArenaParticipantsWorkerTest.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ public async Task QueryActionPoint(bool modern, Dictionary<string, object> expec
["combinationSlots"] = new World(MockWorldState.CreateModern()).GetAllCombinationSlotState(Fixtures.AvatarAddress).Select(x => new Dictionary<string, object?>
{
["address"] = x.address.ToString(),
["unlockBlockIndex"] = x.UnlockBlockIndex,
["unlockBlockIndex"] = x.WorkCompleteBlockIndex,
["isUnlocked"] = x.IsUnlocked,
["startBlockIndex"] = x.StartBlockIndex,
["startBlockIndex"] = x.WorkStartBlockIndex,
["petId"] = x.PetId
}).ToArray<object>(),
}
Expand Down
Loading

0 comments on commit 9a05060

Please sign in to comment.