Fix memory leak with LUT function #312
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Main | |
on: | |
push: | |
workflow_dispatch: | |
inputs: | |
verbose: | |
description: 'Verbose' | |
default: 'no' | |
jobs: | |
# blackbox-tests: | |
# name: Blackbox Tests | |
# if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/version-') | |
# runs-on: ubuntu-latest | |
# container: | |
# image: qtoggle/espqtoggle-builder | |
# defaults: | |
# run: | |
# shell: bash | |
# timeout-minutes: 1800 | |
# env: | |
# TESTMYESP_SERVER: https://testmyesp.qtoggle.io | |
# TEST_JWT_ADMIN_EMPTY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJxVG9nZ2xlIiwidXNyIjoiYWRtaW4iLCJvcmkiOiJjb25zdW1lciJ9.H3TvAcQmDhSel5igbz_kfD_hExMfLJeRA5_aDZ1rOEY | |
# TEST_JWT_ADMIN: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJxVG9nZ2xlIiwidXNyIjoiYWRtaW4iLCJvcmkiOiJjb25zdW1lciJ9.G5sk6HuwGnN78yszwiDqz_CpL86GVXVooIqyVBxD55g | |
# TEST_JWT_NORMAL: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJxVG9nZ2xlIiwidXNyIjoibm9ybWFsIiwib3JpIjoiY29uc3VtZXIifQ.NZ47Ds0o6rRLoxmf7BUaMoP02bg-5gbk6iGwz7Is1L4 | |
# TEST_JWT_VIEWONLY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJxVG9nZ2xlIiwidXNyIjoidmlld29ubHkiLCJvcmkiOiJjb25zdW1lciJ9.w4rypmwbDYtdvoG544-_I7Vcw4n6KaUNNlfH5aUTHaw | |
# TEST_JWT_WEBHOOKS: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJxVG9nZ2xlIiwib3JpIjoiZGV2aWNlIn0.rExjwcHPY77Hi5pi0zIDqiL3dK-3BesrH2SDVdRMySE | |
# TEST_SSID: testmyesp | |
# TEST_PSK: test1234 | |
# TEST_PASSWORD: test_password | |
# TEST_NETWORK_DEVICE_IP: 10.10.10.15 | |
# TEST_NETWORK_HOST_IP: 10.10.10.1 | |
# TEST_NETWORK_START_IP: 10.10.10.10 | |
# TEST_NETWORK_STOP_IP: 10.10.10.20 | |
# TEST_NETWORK_MASK: 16 | |
# JOB_TIMEOUT: 900 | |
# steps: | |
# - name: Source code checkout | |
# uses: actions/checkout@v2 | |
# with: | |
# fetch-depth: 0 | |
# - name: Build | |
# run: | | |
# make clean | |
# make -j4 | |
# - name: TestMyESP helper | |
# run: | | |
# export VERSION=0.0.0-unknown.0 | |
# extra_opts="" | |
# if [[ "${{ github.event.inputs.verbose }}" == "yes" ]]; then | |
# extra_opts+="--verbose" | |
# fi | |
# ./test/testmyesp-helper.sh \ | |
# --server-url ${TESTMYESP_SERVER} \ | |
# --credentials ${{ secrets.TESTMYESP_USERNAME }}:${{ secrets.TESTMYESP_PASSWORD }} \ | |
# --show-serial-log \ | |
# --timeout ${JOB_TIMEOUT} \ | |
# --flash-image-fill null.bin 0xFC000 0 16384 \ | |
# --flash-image-url esp_init_data_default.bin 0xFC000 https://github.com/espressif/ESP8266_NONOS_SDK/raw/v2.2.1/bin/esp_init_data_default_v08.bin \ | |
# --flash-image-url sysparam.bin 0xFE000 https://github.com/espressif/ESP8266_NONOS_SDK/raw/v2.2.1/bin/blank.bin \ | |
# --flash-image-url boot.bin 0x00000 https://github.com/espressif/ESP8266_NONOS_SDK/raw/v2.2.1/bin/boot_v1.7.bin \ | |
# --flash-image-file user1.bin 0x01000 build/user1.bin \ | |
# --flash-image-file user2.bin 0x81000 build/user2.bin \ | |
# --flash-image-fill config.bin 0x7C000 0 16384 \ | |
# --test-cases test/test-cases/01-wifi/*.json \ | |
# --test-cases test/test-cases/02-api/*/*.json \ | |
# --test-cases test/test-cases/03-sleep-mode/*.json \ | |
# --test-cases test/test-cases/04-setup-mode/*.json \ | |
# --test-cases test/test-cases/05-provisioning/*.json \ | |
# --test-cases test/test-cases/06-gpiop/*.json \ | |
# --test-cases test/test-cases/07-adcp/*.json ${extra_opts} | |
release-s3: | |
name: Release To S3 | |
if: startsWith(github.ref, 'refs/tags/version-') | |
# needs: | |
# - blackbox-tests | |
runs-on: ubuntu-latest | |
container: | |
image: qtoggle/espqtoggle-builder | |
defaults: | |
run: | |
shell: bash | |
env: | |
S3_BUCKET: qtoggle | |
S3_FOLDER: firmware/espqtoggle | |
steps: | |
- name: Source code checkout | |
uses: actions/checkout@master | |
- name: Extract version from tag | |
id: tagName | |
uses: olegtarasov/get-tag@v2.1 | |
with: | |
tagRegex: "version-(?<version>.*)" | |
- name: Build | |
run: | | |
export DEBUG=false | |
export VERSION="${{ steps.tagName.outputs.version }}" | |
make clean | |
make -j4 | |
- name: Setup s3cmd | |
run: | | |
echo "[default]" > ~/.s3cfg | |
echo "access_key = ${{ secrets.AWS_ACCESS_KEY }}" >> ~/.s3cfg | |
echo "secret_key = ${{ secrets.AWS_SECRET_KEY }}" >> ~/.s3cfg | |
- name: Upload to S3 | |
run: | | |
VERSION="${{ steps.tagName.outputs.version }}" | |
if [[ "${VERSION}" =~ beta.[0-9]+$ ]]; then # beta version | |
latest_file="latest_beta" | |
elif [[ "${VERSION}" =~ alpha.[0-9]+$ ]]; then # alpha version | |
latest_file="latest_alpha" | |
else # stable version | |
latest_file="latest_stable" | |
fi | |
echo "Version: ${VERSION}" > build/${latest_file} | |
echo -n "Date: " >> build/${latest_file} | |
date "+%Y-%m-%d" >> build/${latest_file} | |
s3cmd put -P --guess-mime-type build/user*.bin s3://${S3_BUCKET}/${S3_FOLDER}/${VERSION}/ | |
s3cmd put -P --guess-mime-type build/firmware.bin s3://${S3_BUCKET}/${S3_FOLDER}/${VERSION}/ | |
s3cmd put -P --guess-mime-type build/${latest_file} s3://${S3_BUCKET}/${S3_FOLDER}/${latest_file} | |
s3cmd put -P --guess-mime-type build/${latest_file} s3://${S3_BUCKET}/${S3_FOLDER}/latest | |
release-gh: | |
name: Release To Github | |
if: startsWith(github.ref, 'refs/tags/version-') | |
needs: | |
- release-s3 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Extract version from tag | |
id: tagName | |
uses: olegtarasov/get-tag@v2.1 | |
with: | |
tagRegex: "version-(?<version>.*)" | |
- name: Create Github release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: ${{ steps.tagName.outputs.version }} | |
draft: true | |
prerelease: contains(github.ref, 'alpha') || contains(github.ref, 'beta') | |
body: | | |
What's new (since ...): | |
- ... | |
Download [firmware.bin](https://provisioning.qtoggle.io/firmware/espqtoggle/${{ steps.tagName.outputs.version }}/firmware.bin). |