mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
github actions
This commit is contained in:
72
.github/workflows/build_firmware.yml
vendored
Normal file
72
.github/workflows/build_firmware.yml
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
name: Build Firmware
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
tags:
|
||||
# - '*.*.*'
|
||||
paths:
|
||||
- 'CHANGELOG_DEV.md'
|
||||
|
||||
jobs:
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Version
|
||||
id: fetch_version
|
||||
run: |
|
||||
version=`grep -E '^#define EMSESP_APP_VERSION' ./src/version.h | awk '{print $3}' | sed 's/"//g'`
|
||||
echo "::set-output name=s::$version"
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v1
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -U platformio
|
||||
platformio upgrade
|
||||
platformio update
|
||||
|
||||
- name: Build web
|
||||
run: |
|
||||
cd interface
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
- name: Build images
|
||||
run: |
|
||||
platformio run -e esp8266
|
||||
platformio run -e esp32
|
||||
|
||||
- name: Delete
|
||||
uses: dev-drprasad/delete-tag-and-release@v0.1.2
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
delete_release: true
|
||||
tag_name: dev
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Changelog
|
||||
run: cat RELEASENOTES_DEV.md CHANGELOG_DEV.md > BODY.txt
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
# if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
body: Latest beta build
|
||||
body_path: BODY.txt
|
||||
name: Development Build version ${{steps.fetch_version.outputs.s}}
|
||||
tag_name: dev
|
||||
prerelease: true
|
||||
files: |
|
||||
./build/firmware/*.*
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
62
.github/workflows/check_code.yml
vendored
Normal file
62
.github/workflows/check_code.yml
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
name: Code Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [dev]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [dev]
|
||||
schedule:
|
||||
- cron: '0 11 * * 5'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Override automatic language detection by changing the below list
|
||||
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
|
||||
language: ['cpp']
|
||||
# Learn more...
|
||||
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
|
||||
# If this run was triggered by a pull request event, then checkout
|
||||
# the head of the pull request instead of the merge commit.
|
||||
- run: git checkout HEAD^2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
20
.github/workflows/standalone_build.yml
vendored
Normal file
20
.github/workflows/standalone_build.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: Standalone Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ dev ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: make clean
|
||||
run: make clean
|
||||
|
||||
- name: make
|
||||
run: make
|
||||
|
||||
Reference in New Issue
Block a user