Skip to content
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

Use GitHub Actions for CI #16269

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/bump-date.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# bump-date.yml
# Bump the distribution date once per day
#

name: Bump Distribution Date

on:
schedule:
- cron: '0 0 * * *'

jobs:
bump_date:

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: source ./buildroot/bin/bump_date
95 changes: 95 additions & 0 deletions .github/workflows/test-builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
#
# test-builds.yml
# Do test builds to catch compile errors
#

name: CI

on:
pull_request:
branches:
- bugfix-2.0.x
- dev-2.1.x

jobs:
test_builds:

runs-on: ubuntu-latest

strategy:
matrix:
test-platform:
# Base Environments

- DUE
- esp32
- linux_native
- megaatmega2560
- teensy31
- teensy35

# Extended AVR Environments

- FYSETC_F6_13
- megaatmega1280
- rambo
- sanguino_atmega1284p
- sanguino_atmega644p

# Extended STM32 Environments

- STM32F103RC_bigtree
- STM32F103RC_bigtree_USB
- STM32F103RE_bigtree
- STM32F103RE_bigtree_USB
- STM32F103RC_fysetc
- jgaurora_a5s_a1
- STM32F103VE_longer
- STM32F407VE_black
- BIGTREE_SKR_PRO
- mks_robin
- ARMED

# 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

#- BIGTREE_BTT002
#- at90usb1286_cdc
#- at90usb1286_dfu
#- STM32F103CB_malyan
#- mks_robin_lite
#- mks_robin_mini
#- mks_robin_nano
#- SAMD51_grandcentral_m4

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/master.zip
platformio update

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

- name: Run ${{ matrix.test-platform }} Tests
run: |
chmod +x buildroot/bin/*
chmod +x buildroot/share/tests/*
export PATH=./buildroot/bin/:./buildroot/share/tests/:${PATH}
run_tests . ${{ matrix.test-platform }}
84 changes: 0 additions & 84 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions Marlin/src/inc/Conditionals_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
* Defines that depend on configuration but are not editable.
*/

#ifdef GITHUB_ACTIONS
// Extras for CI testing
#endif

#ifdef TEENSYDUINO
#undef max
Expand Down
17 changes: 17 additions & 0 deletions buildroot/bin/bump_date
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
#
# bump_date
#
# Bump the Distribution Date in Version.h
#

VERSION_FILE=Marlin/src/inc/Version.h

SED=$(which gsed || which sed)

DIST=$( date +"%Y-%m-%d" )

eval "${SED} -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' $VERSION_FILE" || exit 1

git add "$VERSION_FILE" || exit 1
git commit -m "[cron] Bump distribution date ($DIST)"