-
Notifications
You must be signed in to change notification settings - Fork 173
137 lines (128 loc) · 5.14 KB
/
cron.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
133
134
135
136
name: Cron Build
on:
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
- cron: '0 */6 * * *'
defaults:
run:
shell: bash
jobs:
run:
name: Build with IDF ${{ matrix.idf_branch }}
runs-on: ubuntu-latest
strategy:
matrix:
idf_branch: [release/v5.1, release/v4.4] #, release/v3.3]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install dependencies
run: bash ./tools/prepare-ci.sh
- name: Build
env:
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}
GIT_AUTHOR_EMAIL: ${{ secrets.PUSH_EMAIL }}
GIT_COMMITTER_EMAIL: ${{ secrets.PUSH_EMAIL }}
IDF_BRANCH: ${{ matrix.idf_branch }}
run: |
git checkout ${{ matrix.idf_branch }} || echo "Using master branch"
bash ./tools/cron.sh
- name: Upload archive
uses: actions/upload-artifact@v3
with:
name: artifacts
path: dist
# check:
# name: Check if result should be deployed
# runs-on: ubuntu-latest
# strategy:
# matrix:
# branch: [release/v5.1, release/v4.4] #, release/v3.3]
# outputs:
# idf_branch: ${{ steps.check.outputs.idf_branch }}
# idf_commit: ${{ steps.check.outputs.idf_commit }}
# ar_branch: ${{ steps.check.outputs.ar_branch }}
# ar_new_commit_message: ${{ steps.check.outputs.ar_new_commit_message }}
# ar_new_branch_name: ${{ steps.check.outputs.ar_new_branch_name }}
# ar_new_pr_title: ${{ steps.check.outputs.ar_new_pr_title }}
# ar_has_commit: ${{ steps.check.outputs.ar_has_commit }}
# ar_has_branch: ${{ steps.check.outputs.ar_has_branch }}
# ar_has_pr: ${{ steps.check.outputs.ar_has_pr }}
# libs_version: ${{ steps.check.outputs.libs_version }}
# libs_has_commit: ${{ steps.check.outputs.libs_has_commit }}
# libs_has_branch: ${{ steps.check.outputs.libs_has_branch }}
# steps:
# - uses: actions/checkout@v3
# - id: check
# env:
# GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}
# GIT_AUTHOR_EMAIL: ${{ secrets.PUSH_EMAIL }}
# GIT_COMMITTER_EMAIL: ${{ secrets.PUSH_EMAIL }}
# IDF_BRANCH: ${{ matrix.idf_branch }}
# run: bash ./tools/check-deploy-needed.sh
# build:
# name: Build Libs for ${{ matrix.target }}
# runs-on: ubuntu-latest
# needs: check
# if: needs.check.outputs.libs_has_commit == '0' || needs.check.outputs.ar_has_commit == '0'
# strategy:
# matrix:
# target: [esp32, esp32s2, esp32s3, esp32c3, esp32c6, esp32h2]
# fail-fast: false
# steps:
# - uses: actions/checkout@v3
# # - name: Install dependencies
# # run: bash ./tools/prepare-ci.sh
# - shell: bash
# name: Build Libs for ${{ matrix.target }}
# run: echo ${{ matrix.target }}
# # run: bash ./build.sh -t ${{ matrix.target }}
# # - name: Upload archive
# # uses: actions/upload-artifact@v3
# # with:
# # name: artifacts
# # path: dist
# deploy:
# name: Deploy build
# runs-on: ubuntu-latest
# needs: [check, build]
# steps:
# - uses: actions/checkout@v3
# - shell: bash
# env:
# GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}
# GIT_AUTHOR_EMAIL: ${{ secrets.PUSH_EMAIL }}
# GIT_COMMITTER_EMAIL: ${{ secrets.PUSH_EMAIL }}
# IDF_BRANCH: ${{ needs.check.outputs.idf_branch }}
# IDF_COMMIT: ${{ needs.check.outputs.idf_commit }}
# AR_BRANCH: ${{ needs.check.outputs.ar_branch }}
# AR_NEW_COMMIT_MESSAGE: ${{ needs.check.outputs.ar_new_commit_message }}
# AR_NEW_BRANCH_NAME: ${{ needs.check.outputs.ar_new_branch_name }}
# AR_NEW_PR_TITLE: ${{ needs.check.outputs.ar_new_pr_title }}
# AR_HAS_COMMIT: ${{ needs.check.outputs.ar_has_commit }}
# AR_HAS_BRANCH: ${{ needs.check.outputs.ar_has_branch }}
# AR_HAS_PR: ${{ needs.check.outputs.ar_has_pr }}
# LIBS_VERSION: ${{ needs.check.outputs.libs_version }}
# LIBS_HAS_COMMIT: ${{ needs.check.outputs.libs_has_commit }}
# LIBS_HAS_BRANCH: ${{ needs.check.outputs.libs_has_branch }}
# run: |
# echo "IDF_COMMIT: $IDF_COMMIT"
# echo "AR_BRANCH: $AR_BRANCH"
# echo "AR_NEW_COMMIT_MESSAGE: $AR_NEW_COMMIT_MESSAGE"
# echo "AR_NEW_BRANCH_NAME: $AR_NEW_BRANCH_NAME"
# echo "AR_NEW_PR_TITLE: $AR_NEW_PR_TITLE"
# echo "AR_HAS_COMMIT: $AR_HAS_COMMIT"
# echo "AR_HAS_BRANCH: $AR_HAS_BRANCH"
# echo "AR_HAS_PR: $AR_HAS_PR"
# echo "LIBS_VERSION: $LIBS_VERSION"
# echo "LIBS_HAS_COMMIT: $LIBS_HAS_COMMIT"
# echo "LIBS_HAS_BRANCH: $LIBS_HAS_BRANCH"