Skip to content

Commit

Permalink
Add support for arm and arm64 (#851)
Browse files Browse the repository at this point in the history
* Add support for arm and arm64

* Drop arm from travis

* s/386/i386/

* Put the arch in the right place

* Prune the matrix

* Disable google auth tests on arm64

Something isn't right with how we re-exec ourselves to fake gcloud, so
disable that for arm.

* Disable logs for nested list test

This is causing travis to be really slow on my machine.
  • Loading branch information
jonjohnsonjr committed Dec 1, 2020
1 parent 0349253 commit 5f1c4b2
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 3 deletions.
10 changes: 10 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ builds:
- CGO_ENABLED=0
main: ./cmd/crane/main.go
binary: crane
goarch:
- amd64
- arm
- arm64
- 386
goos:
- linux
- darwin
Expand All @@ -25,6 +30,11 @@ builds:
- CGO_ENABLED=0
main: ./cmd/gcrane/main.go
binary: gcrane
goarch:
- amd64
- arm
- arm64
- 386
goos:
- linux
- darwin
Expand Down
24 changes: 23 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@ env:
- "GO111MODULE=off"
- "GO111MODULE=on"

arch:
- amd64
- arm64
- i386

os:
- windows
- linux

# Don't run all combos on Windows
# Only run all combos for amd64.
# Everything else is GO111MODULE=on + go 1.15
jobs:
exclude:
- os: windows
Expand All @@ -26,6 +32,22 @@ jobs:
go: "1.15"
env: "GO111MODULE=off"

- os: linux
arch: arm64
go: "1.14"
- os: linux
arch: arm64
go: "1.15"
env: "GO111MODULE=off"

- os: linux
arch: i386
go: "1.14"
- os: linux
arch: i386
go: "1.15"
env: "GO111MODULE=off"


git:
depth: 1
Expand Down
1 change: 1 addition & 0 deletions pkg/v1/google/auth_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// +build !arm64
// Copyright 2018 Google LLC All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
7 changes: 5 additions & 2 deletions pkg/v1/remote/multi_write_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
package remote

import (
"io/ioutil"
"log"
"net/http/httptest"
"net/url"
"testing"
Expand Down Expand Up @@ -116,8 +118,9 @@ func TestMultiWrite_Deep(t *testing.T) {
idx = mutate.AppendManifests(idx, mutate.IndexAddendum{Add: idx})
}

// Set up a fake registry.
s := httptest.NewServer(registry.New())
// Set up a fake registry (with NOP logger to avoid spamming test logs).
nopLog := log.New(ioutil.Discard, "", 0)
s := httptest.NewServer(registry.New(registry.Logger(nopLog)))
defer s.Close()
u, err := url.Parse(s.URL)
if err != nil {
Expand Down

0 comments on commit 5f1c4b2

Please sign in to comment.