Add Github CI templated and workflow.

This commit is contained in:
Knutwurst
2020-09-03 16:02:03 +02:00
parent e61cec29da
commit fa712c5e02
13 changed files with 475 additions and 0 deletions

1
.github/FUNDING.yml vendored Executable file
View File

@@ -0,0 +1 @@
custom: ["hhttps://paypal.me/oliverkoester"]

43
.github/ISSUE_TEMPLATE/bug_report.md vendored Executable file
View File

@@ -0,0 +1,43 @@
---
name: Bug report
about: Report a bug in Marlin
title: "[BUG] (short description)"
labels: ''
assignees: ''
---
<!--
Have you read Marlin's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/MarlinFirmware/Marlin/blob/master/.github/code_of_conduct.md
Do you want to ask a question? Are you looking for support? Please don't post here. Instead please use one of the support links at https://github.com/MarlinFirmware/Marlin/issues/new/choose
Before filing an issue be sure to test the "bugfix" branches to see whether the issue has been resolved.
-->
### Bug Description
<!-- Description of the bug -->
### My Configurations
**Required:** Please include a ZIP file containing your `Configuration.h` and `Configuration_adv.h` files.
### Steps to Reproduce
<!-- Please describe the steps needed to reproduce the issue -->
1. [First Step]
2. [Second Step]
3. [and so on...]
**Expected behavior:** [What you expect to happen]
**Actual behavior:** [What actually happens]
#### Additional Information
* Provide pictures or links to videos that clearly demonstrate the issue.
* See [How Can I Contribute](#how-can-i-contribute) for additional guidelines.

17
.github/ISSUE_TEMPLATE/config.yml vendored Executable file
View File

@@ -0,0 +1,17 @@
blank_issues_enabled: false
contact_links:
- name: Marlin Documentation
url: http://marlinfw.org/
about: Lots of documentation on installing and using Marlin.
- name: MarlinFirmware Facebook group
url: https://www.facebook.com/groups/1049718498464482
about: Please ask and answer questions here.
- name: Marlin on Discord
url: https://discord.gg/n5NJ59y
about: Join the Discord server for support and discussion.
- name: Marlin Discussion Forum
url: http://forums.reprap.org/list.php?415
about: A searchable web forum hosted by RepRap dot org.
- name: Marlin Videos on YouTube
url: https://www.youtube.com/results?search_query=marlin+firmware
about: Tutorials and more from Marlin users all around the world. Great for new users!

35
.github/ISSUE_TEMPLATE/feature_request.md vendored Executable file
View File

@@ -0,0 +1,35 @@
---
name: Feature request
about: Request a Feature
title: "[FR] (feature request title)"
labels: ''
assignees: ''
---
<!--
Have you read Marlin's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/MarlinFirmware/Marlin/blob/master/.github/code_of_conduct.md
Do you want to ask a question? Are you looking for support? Please don't post here. Instead please use one of the support links at https://github.com/MarlinFirmware/Marlin/issues/new/choose
Before filing an issue be sure to test the "bugfix" branches to see whether the issue has been resolved.
-->
### Description
<!-- Description of the requested feature -->
### Feature Workflow
<!-- Please describe the feature's behavior, user interaction, etc. -->
1. [First Action]
2. [Second Action]
3. [and so on...]
#### Additional Information
* Provide pictures or links that demonstrate a similar feature or concept.
* See [How Can I Contribute](#how-can-i-contribute) for additional guidelines.

11
.github/issue_template.md vendored Executable file
View File

@@ -0,0 +1,11 @@
# NO SUPPORT REQUESTS PLEASE
Do you want to ask a question? Are you looking for support? Please don't post here. Support Requests posted here will be automatically closed!
Instead use one of the following options:
- The Marlin Firmware forum at https://reprap.org/forum/list.php?415
- The MarlinFirmware Facebook Group at https://www.facebook.com/groups/1049718498464482/
- The MarlinFirmware Discord Server at https://discord.gg/n5NJ59y.
Before filing an issue be sure to test the latest "bugfix" branch to see whether the issue is already addressed.

40
.github/lock.yml vendored Executable file
View File

@@ -0,0 +1,40 @@
#
# Configuration for Lock Threads - https://github.com/dessant/lock-threads-app
#
# Number of days of inactivity before a closed issue or pull request is locked
daysUntilLock: 60
# Skip issues and pull requests created before a given timestamp. Timestamp must
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
skipCreatedBefore: false
# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
exemptLabels: [ 'no-locking' ]
# Label to add before locking, such as `outdated`. Set to `false` to disable
lockLabel: false
# Comment to post before locking. Set to `false` to disable
lockComment: >
This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.
# Assign `resolved` as the reason for locking. Set to `false` to disable
setLockReason: true
# Limit to only `issues` or `pulls`
# only: issues
# Optionally, specify configuration settings just for `issues` or `pulls`
# issues:
# exemptLabels:
# - help-wanted
# lockLabel: outdated
# pulls:
# daysUntilLock: 30
# Repository to extend settings from
# _extends: repo

23
.github/pull_request_template.md vendored Executable file
View File

@@ -0,0 +1,23 @@
### Requirements
* Filling out this template is required. Pull Requests without a clear description may be closed at the maintainers' discretion.
### Description
<!--
We must be able to understand your proposed change from this description. If we can't understand what the code will do from this description, the Pull Request may be closed at the maintainers' discretion. Keep in mind that the maintainer reviewing this PR may not be familiar with or have worked with the code recently, so please walk us through the concepts.
-->
### Benefits
<!-- What does this fix or improve? -->
### Configurations
<!-- Attach any Configuration.h, Configuration_adv.h, or platformio.ini files needed to compile/test your Pull Request. -->
### Related Issues
<!-- Whether this fixes a bug or fulfills a feature request, please list any related Issues here. -->

35
.github/workflows/bump-date.yml vendored Executable file
View File

@@ -0,0 +1,35 @@
#
# bump-date.yml
# Bump the distribution date once per day
#
name: Bump Distribution Date
on:
schedule:
- cron: '0 0 * * *'
jobs:
bump_date:
name: Bump Distribution Date
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-latest
steps:
- name: Check out bugfix-2.0.x
uses: actions/checkout@v2
with:
ref: bugfix-2.0.x
- name: Bump Distribution Date
run: |
# Inline Bump Script
DIST=$( date +"%Y-%m-%d" )
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \
git config user.name "${GITHUB_ACTOR}" && \
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \
git add . && \
git commit -m "[cron] Bump distribution date ($DIST)" && \
git push

31
.github/workflows/check-pr.yml vendored Executable file
View File

@@ -0,0 +1,31 @@
#
# check-pr.yml
# Close PRs directed at release branches
#
name: PR Bad Target
on:
pull_request:
branches:
- 2.0.x
jobs:
bad_target:
name: PR Bad Target
if: github.repository == 'knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S'
runs-on: ubuntu-latest
steps:
- uses: peter-evans/close-pull@v1
with:
delete-branch: false
comment: >
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](http://marlinfw.org/docs/development/getting_started_pull_requests.html) for full instructions.

27
.github/workflows/close-stale.yml vendored Executable file
View File

@@ -0,0 +1,27 @@
#
# close-stale.yml
# Close open issues after a period of inactivity
#
name: Close Stale Issues
on:
schedule:
- cron: "22 1 * * *"
jobs:
stale:
name: Close Stale Issues
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label / comment or this will be closed in 5 days.'
days-before-stale: 30
days-before-close: 5
stale-issue-label: 'stale-closing-soon'
exempt-issue-labels: 'T: Feature Request'

32
.github/workflows/lock-closed.yml vendored Executable file
View File

@@ -0,0 +1,32 @@
#
# lock-closed.yml
# Lock closed issues after a period of inactivity
#
name: Lock Closed Issues
on:
schedule:
- cron: '0 1/13 * * *'
jobs:
lock:
name: Lock Closed Issues
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v2
with:
github-token: ${{ github.token }}
process-only: 'issues'
issue-lock-inactive-days: '60'
issue-exclude-created-before: ''
issue-exclude-labels: 'no-locking'
issue-lock-labels: ''
issue-lock-comment: >
This issue has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.
issue-lock-reason: ''

158
.github/workflows/test-builds.yml vendored Executable file
View File

@@ -0,0 +1,158 @@
#
# test-builds.yml
# Do test builds to catch compile errors
#
name: CI
on:
pull_request:
branches:
- master
paths-ignore:
- config/**
- data/**
- docs/**
- '**/*.md'
push:
branches:
- master
paths-ignore:
- config/**
- data/**
- docs/**
- '**/*.md'
jobs:
test_builds:
name: Run All Tests
if: github.repository == 'knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S'
runs-on: ubuntu-latest
strategy:
matrix:
test-platform:
# Knutwurst Base Environments
- i3_MEGA_1stgen
- i3_MEGA_1stgen_TMC
- i3_MEGA_1stgen_BLTOUCH_10
- i3_MEGA_1stgen_BLTOUCH_11
- i3_MEGA_1stgen_TMC_BLTOUCH_10
- i3_MEGA_1stgen_TMC_BLTOUCH_11
- i3_MEGA
- i3_MEGA_TMC
- i3_MEGA_BLTOUCH_10
- i3_MEGA_BLTOUCH_11
- i3_MEGA_TMC_BLTOUCH_10
- i3_MEGA_TMC_BLTOUCH_11
- i3_MEGA_S
- i3_MEGA_S_TMC
- i3_MEGA_S_BLTOUCH_10
- i3_MEGA_S_BLTOUCH_11
- i3_MEGA_S_TMC_BLTOUCH_10
- i3_MEGA_S_TMC_BLTOUCH_11
- i3_MEGA_S_DGUS
- i3_MEGA_S_DGUS_TMC
- i3_MEGA_S_DGUS_BLTOUCH_10
- i3_MEGA_S_DGUS_BLTOUCH_11
- i3_MEGA_S_DGUS_TMC_BLTOUCH_10
- i3_MEGA_S_DGUS_TMC_BLTOUCH_11
- i3_MEGA_X
- i3_MEGA_X_TMC
- i3_MEGA_X_BLTOUCH_10
- i3_MEGA_X_BLTOUCH_11
- i3_MEGA_X_TMC_BLTOUCH_10
- i3_MEGA_X_TMC_BLTOUCH_11
- i3_MEGA_P
- i3_MEGA_P_TMC
- i3_MEGA_P_BLTOUCH_10
- i3_MEGA_P_BLTOUCH_11
- i3_MEGA_P_TMC_BLTOUCH_10
- i3_MEGA_P_TMC_BLTOUCH_11
#- DUE
#- esp32
#- linux_native
#- mega2560
#- teensy31
#- teensy35
#- SAMD51_grandcentral_m4
# Extended AVR Environments
#- FYSETC_F6_13
#- mega1280
#- rambo
#- sanguino1284p
#- sanguino644p
# Extended STM32 Environments
#- STM32F103RC_btt
#- STM32F103RC_btt_USB
#- STM32F103RE_btt
#- STM32F103RE_btt_USB
#- STM32F103RC_fysetc
#- STM32F103RC_meeb
#- jgaurora_a5s_a1
#- STM32F103VE_longer
#- STM32F407VE_black
#- STM32F401VE_STEVAL
#- BIGTREE_BTT002
#- BIGTREE_SKR_PRO
#- BIGTREE_GTR_V1_0
#- mks_robin
#- mks_robin_stm32
#- ARMED
#- FYSETC_S6
#- STM32F070RB_malyan
#- malyan_M300
#- mks_robin_lite
#- FLYF407ZG
#- rumba32
#- mks_robin_pro
#- STM32F103RET6_creality
#- LERDGEX
#- mks_robin_nano35
# Put lengthy tests last
#- LPC1768
#- LPC1769
# STM32 with non-STM framework. both broken for now. they should use HAL_STM32 which is working.
#- STM32F4
#- STM32F7
# Non-working environment tests
#- at90usb1286_cdc
#- at90usb1286_dfu
#- STM32F103CB_malyan
#- mks_robin_mini
steps:
- 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/develop.zip
platformio update
- name: Check out the PR
uses: actions/checkout@v2
- name: Run ${{ matrix.test-platform }} Tests
run: |
# Inline tests script
chmod +x buildroot/bin/*
chmod +x buildroot/tests/*
export PATH=./buildroot/bin/:./buildroot/tests/:${PATH}
run_tests . ${{ matrix.test-platform }}

22
.github/workflows/unlock-reopened.yml vendored Executable file
View File

@@ -0,0 +1,22 @@
#
# unlock-reopened.yml
# Unlock an issue whenever it is re-opened
#
name: "Unlock reopened issue"
on:
issues:
types: [reopened]
jobs:
unlock:
name: Unlock Reopened
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-latest
steps:
- uses: OSDKDev/unlock-issues@v1.1
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"