add arch preprocessor directive
Add preprocessor directive that checks if the current platform architecture is ARM64. The preprocessor directive checks for ARM64 architecture and changes which docker image to load in the recipes. # Conflicts: # DistTestCore/Codex/CodexContainerRecipe.cs
This commit is contained in:
parent
c16055d7e4
commit
050bb85d27
|
@ -1,12 +1,17 @@
|
||||||
using DistTestCore.Marketplace;
|
using System.Runtime.InteropServices;
|
||||||
|
using DistTestCore.Marketplace;
|
||||||
using KubernetesWorkflow;
|
using KubernetesWorkflow;
|
||||||
|
|
||||||
namespace DistTestCore.Codex
|
namespace DistTestCore.Codex
|
||||||
{
|
{
|
||||||
public class CodexContainerRecipe : ContainerRecipeFactory
|
public class CodexContainerRecipe : ContainerRecipeFactory
|
||||||
{
|
{
|
||||||
//public const string DockerImage = "thatbenbierens/nim-codex:sha-9716635";
|
#if Arm64
|
||||||
public const string DockerImage = "thatbenbierens/codexlocal:latest";
|
public const string DockerImage = "emizzle/nim-codex-arm64:sha-c7af585";
|
||||||
|
#else
|
||||||
|
//public const string DockerImage = "thatbenbierens/nim-codex:sha-9716635";
|
||||||
|
public const string DockerImage = "thatbenbierens/codexlocal:latest";
|
||||||
|
#endif
|
||||||
public const string MetricsPortTag = "metrics_port";
|
public const string MetricsPortTag = "metrics_port";
|
||||||
|
|
||||||
protected override string Image => DockerImage;
|
protected override string Image => DockerImage;
|
||||||
|
|
|
@ -5,6 +5,13 @@
|
||||||
<RootNamespace>DistTestCore</RootNamespace>
|
<RootNamespace>DistTestCore</RootNamespace>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
<IsArm64 Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'Arm64'">true</IsArm64>
|
||||||
|
<!-- <IsArm64 Condition="'$([Microsoft.Build.Utilities.ProcessorArchitecture]::CurrentProcessArchitecture($([System.Runtime.InteropServices.Architecture]::Arm64)))' == 'true'">true</IsArm64> -->
|
||||||
|
<!-- <IsOSX Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture($([System.Runtime.InteropServices.Architecture]::OSX)))' == 'true'">true</IsOSX>
|
||||||
|
<IsLinux Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture($([System.Runtime.InteropServices.Architecture]::Linux)))' == 'true'">true</IsLinux> -->
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(IsArm64)'=='true'">
|
||||||
|
<DefineConstants>Arm64</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -4,7 +4,11 @@ namespace DistTestCore.Marketplace
|
||||||
{
|
{
|
||||||
public class CodexContractsContainerRecipe : ContainerRecipeFactory
|
public class CodexContractsContainerRecipe : ContainerRecipeFactory
|
||||||
{
|
{
|
||||||
public const string DockerImage = "thatbenbierens/codex-contracts-deployment";
|
#if Arm64
|
||||||
|
public const string DockerImage = "emizzle/codex-contracts-deployment:latest";
|
||||||
|
#else
|
||||||
|
public const string DockerImage = "thatbenbierens/codex-contracts-deployment";
|
||||||
|
#endif
|
||||||
public const string MarketplaceAddressFilename = "/usr/app/deployments/codexdisttestnetwork/Marketplace.json";
|
public const string MarketplaceAddressFilename = "/usr/app/deployments/codexdisttestnetwork/Marketplace.json";
|
||||||
public const string MarketplaceArtifactFilename = "/usr/app/artifacts/contracts/Marketplace.sol/Marketplace.json";
|
public const string MarketplaceArtifactFilename = "/usr/app/artifacts/contracts/Marketplace.sol/Marketplace.json";
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,11 @@ namespace DistTestCore.Marketplace
|
||||||
{
|
{
|
||||||
public class GethContainerRecipe : ContainerRecipeFactory
|
public class GethContainerRecipe : ContainerRecipeFactory
|
||||||
{
|
{
|
||||||
public const string DockerImage = "thatbenbierens/geth-confenv:latest";
|
#if Arm64
|
||||||
|
public const string DockerImage = "emizzle/geth-confenv:latest";
|
||||||
|
#else
|
||||||
|
public const string DockerImage = "thatbenbierens/geth-confenv:latest";
|
||||||
|
#endif
|
||||||
public const string HttpPortTag = "http_port";
|
public const string HttpPortTag = "http_port";
|
||||||
public const string DiscoveryPortTag = "disc_port";
|
public const string DiscoveryPortTag = "disc_port";
|
||||||
private const string defaultArgs = "--ipcdisable --syncmode full";
|
private const string defaultArgs = "--ipcdisable --syncmode full";
|
||||||
|
|
Loading…
Reference in New Issue