Code Monkey home page Code Monkey logo

Comments (4)

fkorotkov avatar fkorotkov commented on July 17, 2024

At the moment arm_container is not supported in Cirrus CLI. It's a cloud-only feature and locally CLI is not trying to mach behavior you described.

What are you trying to achieve? Running Cirrus CLI in some other CI? Or just trying to reproduce some amd64 build locally?

from cirrus-cli.

YOU54F avatar YOU54F commented on July 17, 2024

Hey dude,

I would expect cirrus-cli to run container tasks defined in a cirrus yaml to match cirrus ci

Note: Cirrus CLI only supports Linux container and macos_instance VMs at the moment. Linux containers support the Dockerfile as a CI environment feature.

so that if you run it on a mac m1 machine, the images are amd64 images, as they would be on cirrus-ci

I would like to provide users of our open source libraries to run the same image/conditions locally with Cirrus-CLI as per the behaviour on Cirrus CLI.

running this task on a mac m1

x64_container_task:
  container:
    image: ubuntu:latest
  pre_req_script: uname -a

to me, imo, incorrectly returns aarch64.

This is an issue as we install platform specific binaries into our images (we cross distribute binaries, and cirrus ci allows us the ability to test arm64 versions, we use GitHub actions for amd64)

from cirrus-cli.

YOU54F avatar YOU54F commented on July 17, 2024

At the moment arm_container is not supported in Cirrus CLI. It's a cloud-only feature and locally CLI is not trying to mach behavior you described.

I'd love to see arm_container supported via the platform flag, either via emulation on non arm64 platforms, or natively on arm64 platforms.

I have amd64 machines, so the only real use case I want if

  • mac arm machine running a container task returns x86_64
  • arm machine running a arm_container task returns aarch64

This is the workflow I am running in Cirrus which works nicely, but running the container tasks locally on the m1 return unexpected results

https://github.com/YOU54F/pact-ruby-standalone/blob/441ee1d55bcc08f33a80fbda1c4f479c19478770/.cirrus.yml#L124-L155

Here are the binaries we produce and want to test

https://github.com/YOU54F/pact-ruby-standalone/releases/tag/v2.2.1

:)

I have additional use cases for personal stuff, but this is mainly to unify behaviour between cirrus cli and cirrus ci, so a new user being introduced to both, doesn't get unexpected behaviour.

I've been drafting a post about our CI systems, and mentioned Cirrus CI as our default for arm64, but had to mention this gotcha when running locally

https://github.com/pact-foundation/docs.pact.io/pull/264/files#diff-ddfef7524b275e3d16ebac827420128e80f18c1f42c0bc0df28ba274ed593ee3R190-R198

from cirrus-cli.

YOU54F avatar YOU54F commented on July 17, 2024

Not sure if you are familiar with the act project?

They cover this case with the following, but only as GitHub Actions doesn't support ARM64 processors, this is where both cirrus ci and cirrus cli shine (you can cover both cases, which makes is incredibly appealing for local and remote cross platform testing :) )

WARN  ⚠ You are using Apple M1 chip and you have not specified container architecture, you might encounter issues while running act. 
If so, try running it with '--container-architecture linux/amd64'.

from cirrus-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.