diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 946acca2d7f4..70734d4972cc 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1,3 @@ -custom: http://www.thinkyhead.com/donate-to-marlin +github: [thinkyhead] +patreon: thinkyhead +custom: ["http://www.thinkyhead.com/donate-to-marlin"] diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000000..4672316d6502 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,18 @@ +# Add '@domain/core' label to any change within the 'core' package +enhancement: + - .github + +# Add 'test' label to any change to *.spec.js files within the source dir +"C: Motion": + - src/module/motion.* + - src/module/planner.* + - src/module/stepper.* + +"C: G-code Parser": + - src/gcode/** + +"PR: Configurations": + - config/examples/** + +"T: 32-Bit & HAL": + - src/HAL/** diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml new file mode 100644 index 000000000000..a124bceb4e17 --- /dev/null +++ b/.github/workflows/check-pr.yml @@ -0,0 +1,31 @@ +# +# check-pr.yml +# Automatically close the PR if it's directed to a release branch +# + +name: Check PR + +on: + pull_request: + branches: + - 1.0.x + - 1.1.x + - 2.0.x + +jobs: + check_pr: + + runs-on: ubuntu-latest + + steps: + - name: Comment on PR + uses: unsplash/comment-on-pr@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + msg: "

Thanks for your contribution! \ + Unfortunately we can't accept PRs directed at release branches. \ + We make patches to the bugfix branches and only later do we push them out as releases. \ + Please redo this PR starting with the `bugfix-2.0.x` branch and be careful to target `bugfix-2.0.x` when resubmitting the PR.

\ +

It may help to set your fork's default branch to `bugfix-2.0.x`.

\ +

See this page for full instructions.

" diff --git a/.github/workflows/label-pr.yml b/.github/workflows/label-pr.yml new file mode 100644 index 000000000000..74a7e706c986 --- /dev/null +++ b/.github/workflows/label-pr.yml @@ -0,0 +1,23 @@ +# +# label-pr.yml +# Automatically close the PR if it's directed to a release branch +# + +name: Apply Labels + +on: + pull_request: + branches: + - bugfix-1.1.x + - bugfix-2.0.x + - dev-2.1.x + +jobs: + apply_labels: + + runs-on: ubuntu-latest + + steps: + - uses: actions/labeler@v2 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/test-builds.yml b/.github/workflows/test-builds.yml index f7412b394517..2422742cd8b9 100644 --- a/.github/workflows/test-builds.yml +++ b/.github/workflows/test-builds.yml @@ -94,6 +94,8 @@ jobs: - name: Run ${{ matrix.test-platform }} Tests run: | + # Inline tests script + [[ "$GITHUB_ACTOR" == 'MarlinFirmware' ]] || exit 0 chmod +x buildroot/bin/* chmod +x buildroot/share/tests/* export PATH=./buildroot/bin/:./buildroot/share/tests/:${PATH} diff --git a/Marlin/src/module/configuration_store.cpp b/Marlin/src/module/configuration_store.cpp index b389741b79a9..b97d53662751 100644 --- a/Marlin/src/module/configuration_store.cpp +++ b/Marlin/src/module/configuration_store.cpp @@ -1145,7 +1145,7 @@ void MarlinSettings::postprocess() { EEPROM_WRITE(planner.extruder_advance_K); #else dummy = 0; - for (uint8_t q = EXTRUDERS; q--;) EEPROM_WRITE(dummy); + for (uint8_t q = MIN(EXTRUDERS, 1); q--;) EEPROM_WRITE(dummy); #endif } @@ -1934,7 +1934,7 @@ void MarlinSettings::postprocess() { // Linear Advance // { - float extruder_advance_K[EXTRUDERS]; + float extruder_advance_K[MIN(EXTRUDERS, 1)]; _FIELD_TEST(planner_extruder_advance_K); EEPROM_READ(extruder_advance_K); #if ENABLED(LIN_ADVANCE) @@ -2554,9 +2554,9 @@ void MarlinSettings::reset() { #if ENABLED(LIN_ADVANCE) LOOP_L_N(i, EXTRUDERS) { planner.extruder_advance_K[i] = LIN_ADVANCE_K; - #if ENABLED(EXTRA_LIN_ADVANCE_K) - saved_extruder_advance_K[i] = LIN_ADVANCE_K; - #endif + #if ENABLED(EXTRA_LIN_ADVANCE_K) + saved_extruder_advance_K[i] = LIN_ADVANCE_K; + #endif } #endif diff --git a/buildroot/share/git/mffp b/buildroot/share/git/mffp index db52b08b74fb..2663a4a1374e 100755 --- a/buildroot/share/git/mffp +++ b/buildroot/share/git/mffp @@ -1,14 +1,14 @@ #!/usr/bin/env bash # -# mffp [1|2] [commit-id] +# mffp [1|2|3] [commit-id] # # Push the given commit (or HEAD) upstream immediately. # By default: `git push upstream HEAD:bugfix-1.1.x` # -[[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [1|2] [commit-id]" 1>&2 ; exit 1; } +[[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [1|2|3] [commit-id]" 1>&2 ; exit 1; } -if [[ $1 == '1' || $1 == '2' ]]; then +if [[ $1 == '1' || $1 == '2' || $1 == '3' ]]; then MFINFO=$(mfinfo "$1") || exit 1 REF=${2:-HEAD} else diff --git a/buildroot/share/git/mfnew b/buildroot/share/git/mfnew index 6d067a7f08e6..e491fea19103 100755 --- a/buildroot/share/git/mfnew +++ b/buildroot/share/git/mfnew @@ -6,7 +6,7 @@ # usage() { - echo "usage: `basename $0` [1|2] [name]" 1>&2 + echo "usage: `basename $0` [1|2|3] [name]" 1>&2 } [[ $# < 3 && $1 != "-h" && $1 != "--help" ]] || { usage; exit 1; } @@ -19,12 +19,12 @@ BRANCH=pr_for_$TARG-$(date +"%G-%m-%d_%H.%M.%S") # BRANCH can be given as the last argument case "$#" in 1 ) case "$1" in - 1|2) ;; + 1|2|3) ;; *) BRANCH=$1 ;; esac ;; 2 ) case "$1" in - 1|2) BRANCH=$2 ;; + 1|2|3) BRANCH=$2 ;; *) usage ; exit 1 ;; esac ;; diff --git a/buildroot/share/git/mfpr b/buildroot/share/git/mfpr index 0220c0aa8e16..bff9834bc18f 100755 --- a/buildroot/share/git/mfpr +++ b/buildroot/share/git/mfpr @@ -1,11 +1,11 @@ #!/usr/bin/env bash # -# mfpr [1|2] +# mfpr [1|2|3] # # Make a PR against bugfix-1.1.x or bugfix-2.0.x # -[[ $# < 2 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [branch]" 1>&2 ; exit 1; } +[[ $# < 2 && $1 != "-h" && $1 != "--help" ]] || { echo "usage: `basename $0` [1|2|3] [branch]" 1>&2 ; exit 1; } MFINFO=$(mfinfo "$@") || exit 1 IFS=' ' read -a INFO <<< "$MFINFO" diff --git a/buildroot/share/git/mfqp b/buildroot/share/git/mfqp index 7f950da59d16..59f069977313 100755 --- a/buildroot/share/git/mfqp +++ b/buildroot/share/git/mfqp @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# mfqp [-q|--quick] [1|2] +# mfqp [-q|--quick] [1|2|3] # # Add all changed files, commit as "patch", do `mfrb` and `git push -f` # @@ -24,7 +24,7 @@ done [[ ${INFO[4]} =~ [0-9] ]] && USAGE=1 -[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [-hq] [1|2]" 1>&2 ; exit 1 ; } +[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [-hq] [1|2|3]" 1>&2 ; exit 1 ; } git add . git commit -m "patch" diff --git a/buildroot/share/git/mfrb b/buildroot/share/git/mfrb index e09dd87cdaab..1edc99bbe928 100755 --- a/buildroot/share/git/mfrb +++ b/buildroot/share/git/mfrb @@ -2,7 +2,7 @@ # # mfrb # -# Do "git rebase -i" against the "target" branch (bugfix-1.1.x, bugfix-2.0.x, or master) +# Do "git rebase -i" against the "target" branch (bugfix-1.1.x, bugfix-2.0.x, dev-2.1.x, or master) # MFINFO=$(mfinfo "$@") || exit 1 @@ -21,7 +21,7 @@ while [ $IND -lt ${#INFO[@]} ]; do let IND+=1 done -[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [1|2]" 1>&2 ; exit 1 ; } +[[ $USAGE == 1 ]] && { echo "usage: `basename $0` [1|2|3]" 1>&2 ; exit 1 ; } # If the branch isn't currently the PR target if [[ $TARG != $CURR ]]; then