Skip to content

Commit

Permalink
Add workflow for codeql
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmatic69 committed Oct 1, 2020
1 parent 09b33fa commit 5788d67
Show file tree
Hide file tree
Showing 4 changed files with 191 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"

on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: '0 21 * * 3'

jobs:
test-building:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
environment: [nodemcuv2, d1_mini_lite]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U https://github.com/platformio/platformio/archive/develop.zip
platformio platform install file://.
pio platform uninstall espressif8266
cp include/settings.example.h include/settings.h
- name: Build
run: |
platformio run -e ${{ matrix.environment }} -d .
codeql:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U https://github.com/platformio/platformio/archive/develop.zip
platformio platform install file://.
pio platform uninstall espressif8266
cp include/settings.example.h include/settings.h
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: cpp

- name: Build
run: |
platformio run -e nodemcuv2 -d .
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ENVIRONMENT ?= nodemcuv2

.PHONY: all
all:

.PHONY: clean
clean:

.PHONY: build
build: clean
platformio run -e $(ENVIRONMENT) -d .
98 changes: 98 additions & 0 deletions platform.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"name": "espressif8266",
"title": "Espressif 8266",
"description": "Espressif Systems is a privately held fabless semiconductor company. They provide wireless communications and Wi-Fi chips which are widely used in mobile devices and the Internet of Things applications.",
"homepage": "https://espressif.com/",
"license": "Apache-2.0",
"keywords": [
"dev-platform",
"Wi-Fi",
"Xtensa",
"106Micro"
],
"engines": {
"platformio": "^5"
},
"repository": {
"type": "git",
"url": "https://github.com/platformio/platform-espressif8266.git"
},
"version": "2.6.2",
"frameworks": {
"arduino": {
"package": "framework-arduinoespressif8266",
"script": "builder/frameworks/arduino.py"
},
"simba": {
"package": "framework-simba",
"script": "builder/frameworks/simba.py"
},
"esp8266-rtos-sdk": {
"package": "framework-esp8266-rtos-sdk",
"script": "builder/frameworks/esp8266-rtos-sdk.py",
"description": "ESP8266 SDK based on FreeRTOS, a truly free professional grade RTOS for microcontrollers",
"homepage": "https://github.com/espressif/ESP8266_RTOS_SDK",
"title": "ESP8266 RTOS SDK"
},
"esp8266-nonos-sdk": {
"package": "framework-esp8266-nonos-sdk",
"script": "builder/frameworks/esp8266-nonos-sdk.py",
"description": "The non-OS SDK provides a set of application programming interfaces (APIs) for core ESP8266 functionalities such as data reception/transmission over Wi-Fi, TCP/IP stack functions, hardware interface functions and basic system management functions",
"homepage": "https://github.com/espressif/ESP8266_NONOS_SDK",
"title": "ESP8266 Non-OS SDK"
}
},
"packages": {
"toolchain-xtensa": {
"type": "toolchain",
"owner": "platformio",
"version": "~2.40802.191122"
},
"framework-arduinoespressif8266": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~3.20704.0"
},
"framework-esp8266-rtos-sdk": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": ">=1.5.0-beta"
},
"framework-esp8266-nonos-sdk": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": ">=2.1.0"
},
"framework-simba": {
"type": "framework",
"optional": true,
"owner": "platformio",
"version": ">=7.0.0"
},
"tool-esptool": {
"type": "uploader",
"owner": "platformio",
"version": "<2"
},
"tool-esptoolpy": {
"type": "uploader",
"owner": "platformio",
"version": "~1.20800.0"
},
"tool-mkspiffs": {
"type": "uploader",
"optional": true,
"owner": "platformio",
"version": "~1.200.0"
},
"tool-mklittlefs": {
"type": "uploader",
"optional": true,
"owner": "platformio",
"version": "~1.203.0"
}
}
}
15 changes: 15 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:nodemcuv2]
platform = espressif8266
board = nodemcuv2
upload_port = /dev/ttyUSB0
framework = arduino
lib_deps =
PubSubClient
ArduinoJson@>=6.11.3
Ticker
#upload_protocol = espota
#upload_port = 192.168.1.165
; Serial Monitor options
monitor_speed = 115200
build_flags = -DMQTT_MAX_PACKET_SIZE=256

[env:d1_mini_lite]
platform = espressif8266
board = d1_mini_lite
Expand Down

0 comments on commit 5788d67

Please sign in to comment.