Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Logo that says

Flow Battery Research Collective

  1. Home
  2. General Discussion
  3. CI/CD

CI/CD

Scheduled Pinned Locked Moved General Discussion
cicd
5 Posts 2 Posters 412 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    H4K1
    wrote on last edited by H4K1
    #1

    Okay, so we would have 3 main things to do in our CI:

    1. Generate STEP files from FreeCAD
    2. Generate PDF files from KiCad
    3. Unittest (in the future) and generate binary/hex file

    As from my point of view all of three sections should be separated in different repos and combined using git submodules, though there are few problems I see, mostly in CAD:

    1. CI/CD must know from which input files generate output files - as for now they are kind of mixed in main CAD folder, so my proposition is to create separate folder for:
      1.1 3D_printed parts, as these need to be converted from *.FCStd into *.step
      1.2. 2D drawings parts, like Current Collector Drawing or Gasket Drawings which needs to be translated from *.FCStd into *.pdf
      1.3. Renders which would require rendering whole assemblies - those could be placed in Assembly folder

    We would end up with structure of:

    .
    ├── 2D_drawings
    ├── 3D_print
    └── Assembly
    
    1. Electronics is pretty simple, as there will be only KiCAD project, maybe the some kind of electronical/electrical calculations, though I think we are far from it now

    2. Similar with Firmware, there would be simply two folders: src and tests, but that is also a next step

    I would love to hear other opinions, my idea is to create CI/CD as simple as possible, due to fact that I understand that many ppl who would like to contribute with CAD files might be not familiar with any CI/CD, and for that I came up with that folder idea

    1 Reply Last reply
    1
    • H Offline
      H Offline
      H4K1
      wrote on last edited by H4K1
      #2

      Okay so for CAD, I created a simple tutorial, mostly for myself, as I wanna go to sleep soon, and might forget what to do 😛 This might be not optimal, or obsolete, I did not find another FreeCAD's docker image

      EDIT: I have found a newer FreeCAD image, though it cointain GUI as well, thus works really weird without X server 😞

      1. Pull FreeCAD's docker image (maybe we would need to create an new FreeCAD's image, as this one seems to be pretty old FreeCAD wiki

      2. run it in CAD folder:

      docker run --rm -it -v ${PWD}:/home/CAD  amrit3701/freecad-cli:latest python3.8
      
      1. Now we are in docker's image Python interpreter

      Let's assume that we do have this tree as I mentioned in previous post:

      We are choosing first one from 3D_printed folder (ofc in the future we would iterate over files in given directory)

      >>> doc = FreeCAD.open(os.path.join("3D_printed", os.listdir("3D_printed")[0]))
      

      We find body object which (I hope) will be on 1st place:

      >>> doc.findObjects()[0].Shape.exportStep(f'{doc.Name}.step')
      

      Voila! We do have our STEP file

      1 Reply Last reply
      1
      • kirkK Offline
        kirkK Offline
        kirk
        wrote on last edited by kirk
        #3

        Oh, nice work! Would this be using the Woodpecker CI that Codeberg has? https://docs.codeberg.org/ci/

        I also found where the LumenPNP developers have all their CI/CD workflows, for FreeCAD and KiCAD and such:

        https://github.com/opulo-inc/lumenpnp/tree/main/.github/workflows

        Maybe these could be used with minimal modification?

        1 Reply Last reply
        0
        • H Offline
          H Offline
          H4K1
          wrote on last edited by H4K1
          #4

          Yes, I would like to use either Codeberg/Woodpecker CI or Forgejo Actions - I did not try the second one, so I am not sure yet

          Thanks for the examples, I will look at these!

          1 Reply Last reply
          1
          • kirkK Offline
            kirkK Offline
            kirk
            wrote on last edited by
            #5

            Stephen Hawes of Opulo has compiled some of their tools here:

            https://midscale.io/docs

            The AutoBOM one seems to be based on those workflows above and looks pretty interesting

            1 Reply Last reply
            0
            • kirkK kirk referenced this topic on
            • kirkK kirk referenced this topic on
            • kirkK kirk referenced this topic on

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            1

            Online

            80

            Users

            59

            Topics

            626

            Posts
            • Login

            • Don't have an account? Register

            • Login or register to search.
            Powered by NodeBB Contributors
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups