Skip to content

Commit 87992f3

Browse files
authored
Use Github Actions for CI, date bump (#16269)
1 parent 64ebec5 commit 87992f3

5 files changed

Lines changed: 140 additions & 84 deletions

File tree

.github/workflows/bump-date.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#
2+
# bump-date.yml
3+
# Bump the distribution date once per day
4+
#
5+
6+
name: Bump Distribution Date
7+
8+
on:
9+
schedule:
10+
- cron: '0 0 * * *'
11+
12+
jobs:
13+
bump_date:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
19+
- name: Check out bugfix-2.0.x
20+
uses: actions/checkout@v2
21+
with:
22+
ref: bugfix-2.0.x
23+
24+
- name: Bump Distribution Date
25+
run: source ./buildroot/bin/bump_date

.github/workflows/test-builds.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
#
2+
# test-builds.yml
3+
# Do test builds to catch compile errors
4+
#
5+
6+
name: CI
7+
8+
on:
9+
pull_request:
10+
branches:
11+
- bugfix-2.0.x
12+
- dev-2.1.x
13+
14+
jobs:
15+
test_builds:
16+
17+
runs-on: ubuntu-latest
18+
19+
strategy:
20+
matrix:
21+
test-platform:
22+
# Base Environments
23+
24+
- DUE
25+
- esp32
26+
- linux_native
27+
- megaatmega2560
28+
- teensy31
29+
- teensy35
30+
31+
# Extended AVR Environments
32+
33+
- FYSETC_F6_13
34+
- megaatmega1280
35+
- rambo
36+
- sanguino_atmega1284p
37+
- sanguino_atmega644p
38+
39+
# Extended STM32 Environments
40+
41+
- STM32F103RC_bigtree
42+
- STM32F103RC_bigtree_USB
43+
- STM32F103RE_bigtree
44+
- STM32F103RE_bigtree_USB
45+
- STM32F103RC_fysetc
46+
- jgaurora_a5s_a1
47+
- STM32F103VE_longer
48+
- STM32F407VE_black
49+
- BIGTREE_SKR_PRO
50+
- mks_robin
51+
- ARMED
52+
53+
# Put lengthy tests last
54+
55+
- LPC1768
56+
- LPC1769
57+
58+
# STM32 with non-STM framework. both broken for now. they should use HAL_STM32 which is working.
59+
60+
#- STM32F4
61+
#- STM32F7
62+
63+
# Non-working environment tests
64+
65+
#- BIGTREE_BTT002
66+
#- at90usb1286_cdc
67+
#- at90usb1286_dfu
68+
#- STM32F103CB_malyan
69+
#- mks_robin_lite
70+
#- mks_robin_mini
71+
#- mks_robin_nano
72+
#- SAMD51_grandcentral_m4
73+
74+
steps:
75+
76+
- name: Select Python 3.7
77+
uses: actions/setup-python@v1
78+
with:
79+
python-version: '3.7' # Version range or exact version of a Python version to use, using semvers version range syntax.
80+
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
81+
82+
- name: Install PlatformIO
83+
run: |
84+
pip install -U https://github.com/platformio/platformio-core/archive/master.zip
85+
platformio update
86+
87+
- name: Check out the PR
88+
uses: actions/checkout@v2
89+
90+
- name: Run ${{ matrix.test-platform }} Tests
91+
run: |
92+
chmod +x buildroot/bin/*
93+
chmod +x buildroot/share/tests/*
94+
export PATH=./buildroot/bin/:./buildroot/share/tests/:${PATH}
95+
run_tests . ${{ matrix.test-platform }}

.travis.yml

Lines changed: 0 additions & 84 deletions
This file was deleted.

Marlin/src/inc/Conditionals_post.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
* Defines that depend on configuration but are not editable.
2727
*/
2828

29+
#ifdef GITHUB_ACTIONS
30+
// Extras for CI testing
31+
#endif
2932

3033
#ifdef TEENSYDUINO
3134
#undef max

buildroot/bin/bump_date

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
#
3+
# bump_date
4+
#
5+
# Bump the Distribution Date in Version.h
6+
#
7+
8+
VERSION_FILE=Marlin/src/inc/Version.h
9+
10+
SED=$(which gsed || which sed)
11+
12+
DIST=$( date +"%Y-%m-%d" )
13+
14+
eval "${SED} -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' $VERSION_FILE" || exit 1
15+
16+
git add "$VERSION_FILE" || exit 1
17+
git commit -m "[cron] Bump distribution date ($DIST)"

0 commit comments

Comments
 (0)