Skip to content

Commit ceb220a

Browse files
committed
feat(aptos): adds support for arm64
1 parent e62f3f0 commit ceb220a

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

framework/components/blockchain/aptos.go

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
"fmt"
66
"path/filepath"
7+
"runtime"
78
"strings"
89

910
"github.com/docker/docker/api/types/container"
@@ -14,8 +15,10 @@ import (
1415
)
1516

1617
const (
17-
DefaultAptosAPIPort = "8080"
18-
DefaultAptosFaucetPort = "8081"
18+
DefaultAptosAPIPort = "8080"
19+
DefaultAptosFaucetPort = "8081"
20+
DefaultAptosArm64Image = "ghcr.io/friedemannf/aptos-tools:aptos-node-v1.30.2-rc"
21+
DefaultAptosX86_64Image = "aptoslabs/tools:aptos-node-v1.27.2"
1922
)
2023

2124
var (
@@ -25,7 +28,16 @@ var (
2528

2629
func defaultAptos(in *Input) {
2730
if in.Image == "" {
28-
in.Image = "aptoslabs/tools:aptos-node-v1.27.2"
31+
// Aptos doesn't support an official arm64 image yet, so we use a custom image for now
32+
// CI Runners use x86_64 images, so CI checks will use the official image
33+
if runtime.GOARCH == "arm64" {
34+
// Uses an unofficial image built for arm64
35+
framework.L.Warn().Msgf("Using unofficial Aptos image for arm64 %s", DefaultAptosArm64Image)
36+
in.Image = DefaultAptosArm64Image
37+
} else {
38+
// Official Aptos image
39+
in.Image = DefaultAptosX86_64Image
40+
}
2941
}
3042
framework.L.Warn().Msgf("Aptos node API can only be exposed on port %s!", DefaultAptosAPIPort)
3143
if in.Port == "" {

0 commit comments

Comments
 (0)