Skip to content

Commit

Permalink
Add V1 workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Antti Andreimann committed Dec 24, 2019
1 parent 9204dc8 commit 86e17bf
Show file tree
Hide file tree
Showing 34 changed files with 781 additions and 0 deletions.
131 changes: 131 additions & 0 deletions .github/workflows/v1-builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
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:
MIRROR_BRANCH: bugfix-2.0.x
BUILD_BRANCH: v1-bugfix-2.0.x

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

# 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: Set git identity
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git config --global advice.detachedHead false
- name: Generate
run: |
v1-scripts/fetch-branch "origin/$BUILD_BRANCH"
git fetch --prune origin "$MIRROR_BRANCH" # We need full history of the mirror branch
git branch $MIRROR_BRANCH origin/$MIRROR_BRANCH
v1-scripts/generate-build-branch
- 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: |
git push origin "$BUILD_BRANCH:refs/heads/$BUILD_BRANCH" --force
build:

name: ${{ matrix.machine }}
runs-on: ubuntu-latest
needs: generate

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
- ZenXY/MiniRambo_16T
- ZenXY/Ramps_16T_LCD_32

steps:
- name: Check out the code
uses: actions/checkout@v2
with:
ref: v1-bugfix-2.0.x

# 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 ${{ matrix.machine.cfg }}
run: |
chmod +x buildroot/bin/*
chmod +x buildroot/share/tests/*
v1-scripts/build-for-machine ${{ matrix.machine }}
v1-scripts/prepare-release ${{ 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
70 changes: 70 additions & 0 deletions .github/workflows/v1-pull.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
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'
- 'v1-scripts/**'
- '!v1-scripts/config/**'

pull_request:
branches:
- 'v1-machines**'
paths:
- '.github/workflows/v1-pull.yml'
- 'v1-scripts/**'
- '!v1-scripts/config/**'

jobs:

pull:
name: Pull from bugfix-2.0.x
runs-on: ubuntu-latest

env:
UPSTREAM_BRANCH: bugfix-2.0.x
MIRROR_BRANCH: bugfix-2.0.x

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

# 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: Set git identity
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git config --global advice.detachedHead false
- name: Pull
run: |
v1-scripts/fetch-branch "origin/$MIRROR_BRANCH"
v1-scripts/pull-from-upstream
- name: Check
run: |
v1-scripts/diff-branches "$MIRROR_BRANCH" "origin/$MIRROR_BRANCH" && exit 0 # No changes
v1-scripts/generate-build-branch
v1-scripts/build-for-machine MPCNC/Rambo_T8_16T_LCD_DualEndstop
- name: Push
if: github.event_name != 'pull_request'
run: |
git push origin "$MIRROR_BRANCH:refs/heads/$MIRROR_BRANCH" --force
3 changes: 3 additions & 0 deletions v1-scripts/branch-exists
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

git show-ref --quiet --verify "refs/heads/$1"
13 changes: 13 additions & 0 deletions v1-scripts/build-for-machine
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

machine=$1
shift

export PATH=$PATH:buildroot/bin

set -ex

eval $(v1-scripts/configs/build-settings.py "$machine")

use_example_configs $machine
build_marlin_pio . -e "$env" "$@"
13 changes: 13 additions & 0 deletions v1-scripts/configs/MP3DP/MRambo_16T_aero
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

incdir=$(dirname $0)/..

restore_configs

. $incdir/base-3dp-config
. $incdir/avr-lcd-timings

opt_set MOTHERBOARD "BOARD_MINIRAMBO"
opt_set PWM_MOTOR_CURRENT "{ 750, 750, 950 }"
opt_set DEFAULT_AXIS_STEPS_PER_UNIT "{ 100, 100, 400, 837 }"
opt_set E0_AUTO_FAN_PIN "6"
18 changes: 18 additions & 0 deletions v1-scripts/configs/MP3DP/Ramps_16T_MK
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

incdir=$(dirname $0)/..

restore_configs

. $incdir/base-3dp-config
. $incdir/avr-lcd-timings
. $incdir/drv8825

opt_set DEFAULT_AXIS_STEPS_PER_UNIT "{ 200, 200, 800, 200 }"
opt_enable REVERSE_ENCODER_DIRECTION

# Why?
opt_set TEMP_SENSOR_0 "11"

opt_set PWM_MOTOR_CURRENT "{ 800, 900, 950 }"
opt_disable PWM_MOTOR_CURRENT
21 changes: 21 additions & 0 deletions v1-scripts/configs/MPCNC/Archim1_T8_16T_LCD
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

incdir=$(dirname $0)/..

use_example_configs CNC/MPCNC
opt_enable SHOW_CUSTOM_BOOTSCREEN

. $incdir/board-archim1
. $incdir/no-dual-endstops
. $incdir/drv8825

opt_set MINIMUM_STEPPER_PULSE "2"

# Why?
opt_set DEFAULT_MAX_FEEDRATE "{ 120, 120, 30, 25 }"
opt_set Z3_DRIVER_TYPE "DRV8825"
opt_set E3_DRIVER_TYPE "DRV8825"
opt_set E4_DRIVER_TYPE "DRV8825"
opt_set E5_DRIVER_TYPE "DRV8825"
opt_disable SHOW_CUSTOM_BOOTSCREEN CUSTOM_USER_MENUS
opt_disable Z3_DRIVER_TYPE E3_DRIVER_TYPE E4_DRIVER_TYPE E5_DRIVER_TYPE
17 changes: 17 additions & 0 deletions v1-scripts/configs/MPCNC/Archim1_T8_16T_LCD_DualEndstop
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

incdir=$(dirname $0)/..

use_example_configs CNC/MPCNC
opt_enable SHOW_CUSTOM_BOOTSCREEN

. $incdir/board-archim1
. $incdir/dual-endstops
. $incdir/drv8825

opt_set MINIMUM_STEPPER_PULSE "3"

# Why?
opt_set DEFAULT_MAX_FEEDRATE "{ 120, 120, 30, 120 }"
opt_disable SHOW_CUSTOM_BOOTSCREEN CUSTOM_USER_MENUS SOFT_ENDSTOPS_MENU_ITEM MIN_SOFTWARE_ENDSTOPS \
REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
32 changes: 32 additions & 0 deletions v1-scripts/configs/MPCNC/Archim2_T8_16T_LCD_16step
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

incdir=$(dirname $0)/..

use_example_configs CNC/MPCNC
opt_enable SHOW_CUSTOM_BOOTSCREEN

. $incdir/no-dual-endstops

opt_set SERIAL_PORT "-1"
opt_set MOTHERBOARD "BOARD_ARCHIM2"
opt_set DEFAULT_AXIS_STEPS_PER_UNIT "{ 100, 100, 400, 100 }"
opt_set SPI_SPEED "SPI_HALF_SPEED"
opt_set MICROSTEP1 "LOW,LOW,LOW"
opt_set MICROSTEP2 "HIGH,LOW,LOW"
opt_set MICROSTEP4 "LOW,HIGH,LOW"
opt_set MICROSTEP8 "HIGH,HIGH,LOW"
opt_set MICROSTEP16 "LOW,LOW,HIGH"
opt_set MICROSTEP32 "HIGH,LOW,HIGH"
opt_set MICROSTEP_MODES "{ 16, 16, 16, 16, 16 }"
opt_set PWM_MOTOR_CURRENT "{ 1200, 1200, 1200 }"
opt_set MAXIMUM_STEPPER_RATE "400000"
opt_enable EEPROM_SETTINGS

# Why?
opt_set JUNCTION_DEVIATION_MM "0.005"
opt_set MANUAL_FEEDRATE "{30*60, 30*60, 3*60, 60}"
opt_set MM_PER_ARC_SEGMENT ".15"
opt_set X_MAX_ENDSTOP_INVERTING "true"
opt_set Y_MAX_ENDSTOP_INVERTING "true"
opt_set Z_MAX_ENDSTOP_INVERTING "true"
opt_enable BABYSTEP_ALWAYS_AVAILABLE
17 changes: 17 additions & 0 deletions v1-scripts/configs/MPCNC/MRambo_T8_16T_LCD
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

incdir=$(dirname $0)/..

use_example_configs CNC/MPCNC
opt_enable SHOW_CUSTOM_BOOTSCREEN

. $incdir/no-dual-endstops
. $incdir/avr-lcd-timings

opt_set MOTHERBOARD "BOARD_MINIRAMBO"
opt_set DEFAULT_AXIS_STEPS_PER_UNIT "{ 100, 100, 400, 100 }"
opt_set PWM_MOTOR_CURRENT "{ 900, 900, 900 }"

# Why?
opt_set DIGIPOT_MOTOR_CURRENT "{ 95, 95, 95, 95, 95 }"
opt_disable DIGIPOT_MOTOR_CURRENT
11 changes: 11 additions & 0 deletions v1-scripts/configs/MPCNC/Rambo_T8_16T_LCD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

incdir=$(dirname $0)/..

use_example_configs CNC/MPCNC
opt_enable SHOW_CUSTOM_BOOTSCREEN

. $incdir/board-rambo
. $incdir/no-dual-endstops

opt_enable REVERSE_ENCODER_DIRECTION
15 changes: 15 additions & 0 deletions v1-scripts/configs/MPCNC/Rambo_T8_16T_LCD_DualEndstop
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

incdir=$(dirname $0)/..

use_example_configs CNC/MPCNC
opt_enable SHOW_CUSTOM_BOOTSCREEN

. $incdir/board-rambo
. $incdir/dual-endstops

opt_enable REVERSE_ENCODER_DIRECTION

# Why?
opt_enable USE_ZMAX_PLUG
opt_disable SOFT_ENDSTOPS_MENU_ITEM
13 changes: 13 additions & 0 deletions v1-scripts/configs/MPCNC/Ramps_T8_16T_LCD_32step
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

incdir=$(dirname $0)/..

use_example_configs CNC/MPCNC
opt_enable SHOW_CUSTOM_BOOTSCREEN

. $incdir/drv8825
. $incdir/avr-lcd-timings
. $incdir/no-dual-endstops

opt_set DEFAULT_AXIS_STEPS_PER_UNIT "{ 200, 200, 800, 200 }"
opt_enable REVERSE_ENCODER_DIRECTION

0 comments on commit 86e17bf

Please sign in to comment.