woodpecker-ci / plugin-surge-preview

Apache License 2.0
2 stars 3 forks source link

arm64 image #9

Closed gueldenstone closed 1 year ago

gueldenstone commented 1 year ago

Hi, I'm trying to use this plugin on an arm64 machine (not raspberry pi) but I get following error:

fork/exec /usr/local/bin/surge: exec format error

I did some tests and figured out that if apply this changes, it works:

diff --git a/.woodpecker/docker.yml b/.woodpecker/docker.yml
index da893b0..50c8cdf 100644
--- a/.woodpecker/docker.yml
+++ b/.woodpecker/docker.yml
@@ -15,7 +15,7 @@ pipeline:
     settings:
       dockerfile: Dockerfile
       repo: woodpeckerci/plugin-surge-preview
-      platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
+      platforms: linux/arm/v7,linux/arm64,linux/amd64,linux/ppc64le
       tag: next
     secrets: [docker_username, docker_password]
     when:

If just linux/arm64 is added like this:

diff --git a/.woodpecker/docker.yml b/.woodpecker/docker.yml
index da893b0..50c8cdf 100644
--- a/.woodpecker/docker.yml
+++ b/.woodpecker/docker.yml
@@ -15,7 +15,7 @@ pipeline:
     settings:
       dockerfile: Dockerfile
       repo: woodpeckerci/plugin-surge-preview
-      platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
+      platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,linux/arm64
       tag: next
     secrets: [docker_username, docker_password]
     when:

there is an error saying number of platforms does not match references 5 4. It seems like the docker tag is only arm64 without v8. But the golang app is built as armv8.

output of lscpu

Architecture:            aarch64
  CPU op-mode(s):        32-bit, 64-bit
  Byte Order:            Little Endian
CPU(s):                  4
  On-line CPU(s) list:   0-3
Vendor ID:               ARM
  Model name:            Neoverse-N1
    Model:               1
    Thread(s) per core:  1
    Core(s) per cluster: 4
    Socket(s):           1
    Cluster(s):          1
    Stepping:            r3p1
    BogoMIPS:            50.00
    Flags:               fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs
NUMA:                    
  NUMA node(s):          1
  NUMA node0 CPU(s):     0-3
Vulnerabilities:         
  Itlb multihit:         Not affected
  L1tf:                  Not affected
  Mds:                   Not affected
  Meltdown:              Not affected
  Mmio stale data:       Not affected
  Retbleed:              Not affected
  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl
  Spectre v1:            Mitigation; __user pointer sanitization
  Spectre v2:            Mitigation; CSV2, BHB
  Srbds:                 Not affected
  Tsx async abort:       Not affected
6543 commented 1 year ago

@gueldenstone wana submit a pull request?

gueldenstone commented 1 year ago

Will do! My only concern is that this might lead to issues with the arm image. I suspect this was meant for RPI 4?