forked from MarlinFirmware/Marlin
-
Notifications
You must be signed in to change notification settings - Fork 3
132 lines (113 loc) · 3.83 KB
/
v1-builds.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
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
- MPCNC/SKR1.3_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