Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for arm and arm64 #851

Merged
merged 7 commits into from
Dec 1, 2020
Merged

Conversation

jonjohnsonjr
Copy link
Collaborator

Fixes #850

@jonjohnsonjr
Copy link
Collaborator Author

Seems to work?

$ goreleaser --snapshot --skip-publish --rm-dist
   • releasing...     
   • loading config file       file=.goreleaser.yml
   • loading environment variables
   • getting and validating git state
      • releasing v0.1.4, commit fd3fec5d0f09702accc262b49eabf3f0e3d2f116
      • pipe skipped              error=disabled during snapshot mode
   • parsing tag      
   • running before hooks
   • setting defaults 
      • snapshotting     
      • github/gitlab/gitea releases
      • project name     
      • building binaries
      • creating source archive
      • archives         
      • linux packages   
      • snapcraft packages
      • calculating checksums
      • signing artifacts
      • docker images    
      • artifactory      
      • blobs            
      • homebrew tap formula
      • scoop manifests  
      • milestones       
   • snapshotting     
   • checking ./dist  
   • writing effective config file
      • writing                   config=dist/config.yaml
   • generating changelog
      • pipe skipped              error=not available for snapshots
   • building binaries
      • building                  binary=/home/jonjohnson/go/src/github.com/google/go-containerregistry/dist/crane_windows_amd64/crane.exe
      • building                  binary=/home/jonjohnson/go/src/github.com/google/go-containerregistry/dist/crane_linux_386/crane
      • building                  binary=/home/jonjohnson/go/src/github.com/google/go-containerregistry/dist/crane_linux_amd64/crane
      • building                  binary=/home/jonjohnson/go/src/github.com/google/go-containerregistry/dist/crane_linux_arm_6/crane
      • building                  binary=/home/jonjohnson/go/src/github.com/google/go-containerregistry/dist/crane_linux_arm64/crane
      • building                  binary=/home/jonjohnson/go/src/github.com/google/go-containerregistry/dist/crane_darwin_amd64/crane
      • building                  binary=/home/jonjohnson/go/src/github.com/google/go-containerregistry/dist/gcrane_windows_amd64/gcrane.exe
      • building                  binary=/home/jonjohnson/go/src/github.com/google/go-containerregistry/dist/gcrane_linux_arm_6/gcrane
      • building                  binary=/home/jonjohnson/go/src/github.com/google/go-containerregistry/dist/gcrane_linux_amd64/gcrane
      • building                  binary=/home/jonjohnson/go/src/github.com/google/go-containerregistry/dist/gcrane_linux_386/gcrane
      • building                  binary=/home/jonjohnson/go/src/github.com/google/go-containerregistry/dist/gcrane_linux_arm64/gcrane
      • building                  binary=/home/jonjohnson/go/src/github.com/google/go-containerregistry/dist/gcrane_darwin_amd64/gcrane
   • archives         
      • creating                  archive=dist/go-containerregistry_Darwin_x86_64.tar.gz
      • creating                  archive=dist/go-containerregistry_Linux_x86_64.tar.gz
      • creating                  archive=dist/go-containerregistry_Linux_arm.tar.gz
      • creating                  archive=dist/go-containerregistry_Linux_i386.tar.gz
      • creating                  archive=dist/go-containerregistry_Linux_arm64.tar.gz
      • creating                  archive=dist/go-containerregistry_Windows_x86_64.tar.gz
   • creating source archive
      • pipe skipped              error=source pipe is disabled
   • linux packages   
   • snapcraft packages
   • calculating checksums
      • checksumming              file=go-containerregistry_Windows_x86_64.tar.gz
      • checksumming              file=go-containerregistry_Linux_x86_64.tar.gz
      • checksumming              file=go-containerregistry_Darwin_x86_64.tar.gz
      • checksumming              file=go-containerregistry_Linux_arm.tar.gz
      • checksumming              file=go-containerregistry_Linux_arm64.tar.gz
      • checksumming              file=go-containerregistry_Linux_i386.tar.gz
   • signing artifacts
   • docker images    
      • pipe skipped              error=docker section is not configured
   • publishing       
      • blobs            
         • pipe skipped              error=blobs section is not configured
      • http upload      
         • pipe skipped              error=uploads section is not configured
      • custom publisher 
         • pipe skipped              error=publishers section is not configured
      • artifactory      
         • pipe skipped              error=artifactory section is not configured
      • docker images    
         • pipe skipped              error=publishing is disabled
      • docker manifests 
         • pipe skipped              error=publishing is disabled
      • snapcraft packages
         • pipe skipped              error=publishing is disabled
      • github/gitlab/gitea releases
         • pipe skipped              error=publishing is disabled
      • homebrew tap formula
      • scoop manifests  
         • pipe skipped              error=publishing is disabled
      • milestones       
         • pipe skipped              error=publishing is disabled
   • release succeeded after 118.84s

@codecov-io
Copy link

codecov-io commented Nov 30, 2020

Codecov Report

Merging #851 (fd3fec5) into master (59645bd) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #851   +/-   ##
=======================================
  Coverage   74.67%   74.67%           
=======================================
  Files         106      106           
  Lines        4435     4435           
=======================================
  Hits         3312     3312           
  Misses        633      633           
  Partials      490      490           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 59645bd...3204b30. Read the comment docs.

@jonjohnsonjr
Copy link
Collaborator Author

image

Finally... let's see if anything breaks.

Something isn't right with how we re-exec ourselves to fake gcloud, so
disable that for arm.
This is causing travis to be really slow on my machine.
@jonjohnsonjr
Copy link
Collaborator Author

The google auth tests are broken on arm for some reason, so I've disabled them with +build !arm64 for now.

I pruned the matrix down to just use go1.15 and GO111MODULE=on for everything except for amd64 tests, which will hopefully be less wasteful.

@imjasonh added a test for MultiWrite that generated a truly monumental amount of logspam that slowed down the travis UI, so I fixed that as well.

=== RUN   TestMultiWrite_Deep
--- PASS: TestMultiWrite_Deep (38.07s)

That is still actually really slow... I'm surprised by it, but looking at the test it makes some sense:

idx[0] = 2 images
idx[1] = 2 images + idx[0] = 4 images
idx[2] = 2 images + idx[0] + idx[1] = 8 images
idx[3] = 2 images + idx[0] + idx[1] + idx[2] = 16 images
...
idx[10] = 2048 images ?

I'm still a bit surprised that we'd spend 38 seconds in that. In theory we'd calculate the digest just once for each layer. It looks like we don't memoize the digest for random.Image or random.Index... maybe we should? I'm guessing we spend most of that time just hashing stuff but I haven't actually measured.

@jonjohnsonjr
Copy link
Collaborator Author

So far everything but windows has passed so this looks pretty good.

@jonjohnsonjr
Copy link
Collaborator Author

🎉

@jonjohnsonjr jonjohnsonjr merged commit 5f1c4b2 into google:master Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ARM binary request for crane
3 participants