forked from MarlinFirmware/Marlin
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
V1 Automation #101
Open
anttix
wants to merge
26
commits into
v1-machines
Choose a base branch
from
v1-machines-demo
base: v1-machines
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
V1 Automation #101
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
86e17bf
Add V1 workflows
fee18c7
Add SKR 1.3 dual endstop version
891eef0
Make config generation errors fatal
a33b58d
Fix local usage of v1-scripts/pull-from-upstream
eadd73a
Fix PIO environment for Rambo boards
6c23395
Move Marlin to a git sub-module
db6541f
Add a dual endstop config for SKR Pro 1.1
a18338d
Add configs for 2.0.x and dev-2.1.x branches
3870c5d
Add readme and provide double check in script
dolfelt 3c477d5
My current Base config
V1EngineeringInc 7c6e897
Enable helical plunge with arcs (P circles) and CNC workplanes
9a16712
Remove already merged PRs from bugfix-2.0.x build
1f37638
Ditch the hand-edited base config and switch to 100% generated
68d904e
Correct stepper type for Archim2 board
f95f998
Fix build error with latest upstream (build_marlin_pio script was rem…
42ccd27
Delete upstream workflows on pull
bba1ac8
Handle fallout from upstream's config repository split
8c744cc
Rename dual-endstops to dual-drivers-on-xy
790112d
Update BTT board names
ef749ac
Added single-axis config for SKR1.3
0badd3a
Added SKR1.3 configuration for Lowrider dual driver setup
8937e6d
Rename megaatmega2560 to mega2560 to accomodate upstream changes
99b7df6
Add TMC2209 support and sensorless config for SKR1.3 lowrider
a2c5fed
Add support for TMC5160 drivers
1ece46c
Publish an STL for Lowrider2 sensorless Z- homing
e06c3de
Publish Coupling saver STL
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Magic from https://github.com/actions/checkout#Checkout-submodules | ||
auth_header="$(git config --local --get http.https://github.com/.extraheader)" | ||
git config --global protocol.version 2 | ||
git config --global http.extraheader "$auth_header" | ||
|
||
# Commit identity | ||
git config --global user.email "actions@github.com" | ||
git config --global user.name "GitHub Actions" | ||
|
||
# Other settings | ||
git config --global advice.detachedHead false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
name: V1 Builds | ||
|
||
on: | ||
schedule: | ||
# On 45-th minute, every 6 hours | ||
- cron: '45 */6 * * *' | ||
|
||
push: | ||
branches: | ||
- 'v1-**' | ||
paths-ignore: | ||
- data/** | ||
- docs/** | ||
- '**/*.md' | ||
# pull_request: | ||
# branches: | ||
# - 'v1-**' | ||
# paths-ignore: | ||
# - data/** | ||
# - docs/** | ||
# - '**/*.md' | ||
|
||
jobs: | ||
generate: | ||
name: Generate v1-bugfix-2.0.x | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
BUILD_BRANCH: v1-bugfix-2.0.x | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: .github/scripts/configure-git | ||
- name: Check out submodules | ||
run: | | ||
(cd MarlinFirmware && ../v1-scripts/fetch-branch "origin/$BUILD_BRANCH") | ||
git submodule sync --recursive | ||
git submodule update --init --force --recursive --remote | ||
|
||
- name: Generate | ||
run: | | ||
v1-scripts/reset-to-manifest | ||
v1-scripts/generate-configs | ||
v1-scripts/commit-configs | ||
|
||
# Based on .github/workflows/test-builds.yml | ||
- name: Select Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.7' # Version range or exact version of a Python version to use, using semvers version range syntax. | ||
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified | ||
|
||
- name: Install PlatformIO | ||
run: | | ||
pip install -U https://github.com/platformio/platformio-core/archive/master.zip | ||
platformio update | ||
|
||
- name: Check | ||
run: | | ||
#v1-scripts/diff-branches "$BUILD_BRANCH" "origin/$BUILD_BRANCH" && exit 0 # No changes | ||
v1-scripts/build-for-machine MPCNC/Rambo_T8_16T_LCD_DualEndstop | ||
|
||
- name: Push | ||
if: github.event_name != 'pull_request' | ||
run: | | ||
cd MarlinFirmware | ||
git rm .github/workflows/* | ||
git commit -m 'Delete github workflows' | ||
git push origin "HEAD:refs/heads/$BUILD_BRANCH" --force | ||
|
||
build: | ||
|
||
name: ${{ matrix.machine }} | ||
runs-on: ubuntu-latest | ||
needs: generate | ||
|
||
env: | ||
BUILD_BRANCH: v1-bugfix-2.0.x | ||
|
||
strategy: | ||
fail-fast: false # Allow all machines to finish building | ||
matrix: | ||
machine: | ||
- MP3DP/MRambo_16T_aero | ||
- MP3DP/Ramps_16T_MK | ||
#- MPCNC/Archim1_T8_16T_LCD | ||
#- MPCNC/Archim1_T8_16T_LCD_DualEndstop | ||
#- MPCNC/Archim2_T8_16T_LCD_16step | ||
- MPCNC/MRambo_T8_16T_LCD | ||
- MPCNC/Rambo_T8_16T_LCD | ||
- MPCNC/Rambo_T8_16T_LCD_DualEndstop | ||
- MPCNC/Ramps_T8_16T_LCD_32step | ||
- MPCNC/Ramps_T8_16T_LCD_32step_DualEndstop | ||
- MPCNC/SKR1.3_T8_16T_LCD_32step | ||
- MPCNC/SKR1.3_T8_16T_LCD_32step_DualEndstop | ||
- MPCNC/SKRPro1.1_T8_16T_LCD_32step_DualEndstop | ||
- ZenXY/MiniRambo_16T | ||
- ZenXY/Ramps_16T_LCD_32 | ||
- Lowrider/SKR1.3_T8_16T_LCD_32step_DualDrivers | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: .github/scripts/configure-git | ||
- name: Check out submodules | ||
run: | | ||
(cd MarlinFirmware && ../v1-scripts/fetch-branch "origin/$BUILD_BRANCH") | ||
git submodule sync --recursive | ||
git submodule update --init --force --recursive --remote | ||
|
||
# Based on .github/workflows/test-builds.yml | ||
- name: Select Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.7' # Version range or exact version of a Python version to use, using semvers version range syntax. | ||
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified | ||
|
||
- name: Install PlatformIO | ||
run: | | ||
pip install -U https://github.com/platformio/platformio-core/archive/master.zip | ||
platformio update | ||
|
||
- name: Build | ||
run: | | ||
v1-scripts/build-for-machine ${{ matrix.machine }} | ||
v1-scripts/build-zips ${{ matrix.machine }} | ||
|
||
- name: Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: ".zip/*.zip,.bin/*" | ||
#bodyFile: "body.md" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
prerelease: true | ||
name: unstable | ||
# FIXME: This needs to be dynamic and possibly use a different action | ||
# e.g. https://github.com/actions/create-release/pull/12 | ||
tag: v1-bugfix-2.0.x-auto | ||
commit: ${{ github.ref }} | ||
allowUpdates: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: V1 pull from MarlinFirmware | ||
|
||
on: | ||
schedule: | ||
# On 15-th minute, every 6 hours | ||
- cron: '15 */6 * * *' | ||
|
||
push: | ||
branches: | ||
- 'v1-machines**' | ||
paths: | ||
- '.github/workflows/v1-pull.yml' | ||
- '.github/scripts' | ||
- 'v1-scripts/**' | ||
- 'MarlinFirmware' | ||
- '!v1-scripts/config/**' | ||
|
||
pull_request: | ||
branches: | ||
- 'v1-machines**' | ||
paths: | ||
- '.github/workflows/v1-pull.yml' | ||
- '.github/scripts' | ||
- 'v1-scripts/**' | ||
- 'MarlinFirmware' | ||
- '!v1-scripts/config/**' | ||
|
||
jobs: | ||
|
||
pull: | ||
name: Pull from bugfix-2.0.x | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
UPSTREAM_BRANCH: bugfix-2.0.x | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: .github/scripts/configure-git | ||
- name: Check out submodules | ||
run: | | ||
git submodule sync --recursive | ||
git submodule update --init --force --recursive --depth=1 | ||
|
||
- name: Pull | ||
run: | | ||
v1-scripts/fetch-branch "origin/v1-$UPSTREAM_BRANCH" | ||
v1-scripts/pull-from-upstream | ||
|
||
# Based on .github/workflows/test-builds.yml | ||
- name: Select Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.7' # Version range or exact version of a Python version to use, using semvers version range syntax. | ||
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified | ||
|
||
- name: Install PlatformIO | ||
run: | | ||
pip install -U https://github.com/platformio/platformio-core/archive/master.zip | ||
platformio update | ||
|
||
- name: Check | ||
run: | | ||
#v1-scripts/diff-branches ... "origin/v1-$UPSTREAM_BRANCH" && exit 0 # No changes | ||
v1-scripts/build-for-machine MPCNC/Rambo_T8_16T_LCD_DualEndstop | ||
|
||
- name: Push | ||
if: github.event_name != 'pull_request' | ||
run: | | ||
cd MarlinFirmware | ||
git rm .github/workflows/* | ||
git commit -m 'Delete github workflows' | ||
git push origin "HEAD:refs/heads/v1-$UPSTREAM_BRANCH" --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/.bin | ||
/.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[submodule "MarlinFirmware"] | ||
path = MarlinFirmware | ||
url = ./ | ||
branch = v1-bugfix-2.0.x |
Binary file not shown.
Binary file not shown.
Submodule MarlinFirmware
added at
14ab8c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# V1 Engineering Preconfigured Marlin | ||
|
||
This repository provides a preconfigured version of Marlin that is optimized for CNC and milling purposes. | ||
|
||
## Getting started | ||
|
||
TODO: Possibly links to download pre-built firmware. | ||
|
||
## Building V1 Marlin | ||
|
||
These scripts require the PlatformIO CLI and GNU `sed` | ||
|
||
[Install PlatformIO](https://docs.platformio.org/en/latest/installation.html) | ||
|
||
In order to generate the configuration you must first pull the Marlin submodule | ||
|
||
``` | ||
git submodule update --init --recursive | ||
``` | ||
|
||
Then generate the example configuration using the following script | ||
|
||
``` | ||
UPSTREAM_BRANCH=2.0.x ./v1-scripts/pull-from-upstream | ||
``` | ||
|
||
Then generate a firmware file by running | ||
|
||
``` | ||
./v1-scripts/build-for-machine machine-name | ||
``` | ||
|
||
Machine names are based on the folder and filename within `v1-scripts/configs`. For example, for the Archim board you would use `MPCNC/Archim1_T8_16T_LCD`. | ||
|
||
The firmware file will be located in the `MarlinFirmware/.pio` directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
git show-ref --quiet --verify "refs/heads/$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
. $(dirname "$0")/env | ||
|
||
machine=$1 | ||
shift | ||
|
||
[ "$machine" ] || exit 2 | ||
|
||
eval $($V1_ROOT/$CFGDIR/build-settings.py "$machine") | ||
|
||
cd "$V1_ROOT/$MARLINDIR" | ||
export PATH=$PATH:buildroot/bin | ||
|
||
restore_configs | ||
|
||
for f in config/examples/$machine/{Configuration.h,Configuration_adv.h,_Bootscreen.h,_Statusscreen.h}; do | ||
[ -f "$f" ] && cp "$f" Marlin/ | ||
done | ||
|
||
platformio run --project-dir . -e "$env" --silent "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
. $(dirname "$0")/env | ||
|
||
machine=$1 | ||
[ "$machine" ] || exit 2 | ||
eval $($V1_ROOT/$CFGDIR/build-settings.py "$machine") | ||
|
||
flatname=$(echo "$machine" | sed 's@/@_@g') | ||
dirname="$flatname" | ||
|
||
cd "$V1_ROOT" | ||
|
||
mkdir -p .bin | ||
cp "$MARLINDIR/.pio/build/$env/$out" ".bin/$flatname.$out" | ||
|
||
mkdir -p .zip | ||
ln -sf "$V1_ROOT/$MARLINDIR" ".zip/$dirname-src" | ||
(cd ".zip" && zip -prq "$flatname-src.zip" "$dirname-src"/*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
. $(dirname "$0")/env | ||
|
||
cd "$V1_ROOT/$MARLINDIR" | ||
git add config/examples | ||
git commit -m 'Add configuratons for V1 machines' |
22 changes: 22 additions & 0 deletions
22
v1-scripts/configs/Lowrider/SKR1.3_T8_16T_LCD_32step_DualDrivers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
incdir=$(dirname $0)/.. | ||
|
||
restore_configs | ||
opt_enable SHOW_CUSTOM_BOOTSCREEN | ||
|
||
. $incdir/base-cnc-config | ||
. $incdir/drv8825 | ||
. $incdir/dual-drivers-on-yz | ||
|
||
opt_set MOTHERBOARD BOARD_BTT_SKR_V1_3 | ||
opt_set SERIAL_PORT "-1" | ||
|
||
opt_set DEFAULT_AXIS_STEPS_PER_UNIT "{ 200, 200, 800, 200 }" | ||
opt_enable REVERSE_ENCODER_DIRECTION | ||
opt_enable MIN_SOFTWARE_ENDSTOP_Z | ||
|
||
# Lowrider gantry will drop for sure if Z is powered off | ||
opt_set DISABLE_INACTIVE_Z "false" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this will always go to the same release, right? There won't be a way to get a previous unstable branch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these build products also available in the build log?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not too happy with existing release plugins. It starts to look like we may have to build one.
In principle one can upload artifacts from build steps that can then be downloaded from the steps. But this is difficult to find/use and it's not designed for long-term storage.
If there is a need to keep a longer history of nightlies these must be published as releases. Which means there must be some cleanup logic to prune these.