Coder Social home page Coder Social logo

Comments (3)

frealmyr avatar frealmyr commented on June 22, 2024

We can probably do both? If there are .h files in config directory, compile a single firmware bin. If there are folders there, go recursively inside each folder and build to the corresponding compiled firmware folder? 😄

from marlin-build.

 avatar commented on June 22, 2024

Sounds great!
This project has finally put a fire under me to learn more about docker so hopefully I can contribute in future if you would like some help?

from marlin-build.

frealmyr avatar frealmyr commented on June 22, 2024

I considered modifying the script to accommodate for this, however it would increase the complexity a fair bit. Since this is a edge-case, i recommend solving it in a more static approach using Github Actions.

Create multiple GHA workflows, where you change out the monitored folders and docker volumes with sub-folders of choice. If you make changes in the sub-folder, only the corresponding firmware will be generated.

Example:


name: Build Marlin Firmware

on:
  push:
    branches:
      - master
    paths:
      - 'Firmware/Configuration/Example1/**.h'

jobs:
  build_and_push:
    name: Compile and Push Firmware
    runs-on: ubuntu-latest
    env:
      BOARD: STM32F103RC_btt_512K

    steps:
      - name: Check out repo
        uses: actions/checkout@v2

      - name: Compile firmware
        run: |
          docker run \
            -u root:root \
            -e BOARD \
            -e UPDATE_FORCE=true \
            -v $(pwd)/Firmware/Builds/Example1:/home/platformio/build \
            -v $(pwd)/Firmware/Configuration/Example1:/home/platformio/CustomConfiguration \
            frealmyr/marlin-build:latest
      - name: Push firmware
        run: |
          git config user.name github-actions
          git config user.email [email protected]
          git add .
          git commit -m "Compiled firmware"
          git push

from marlin-build.

Related Issues (12)

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.