mirror of
https://github.com/EyeTrackVR/EyeTrackVR.git
synced 2025-11-04 14:39:42 +08:00
build: setup pre-release build pipeline
This commit is contained in:
parent
abf7f88ae5
commit
e250e4e353
64
.github/scripts/prepareCMD.sh
vendored
Normal file
64
.github/scripts/prepareCMD.sh
vendored
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# create a vairable to hold a passed in argument
|
||||||
|
# this argument is the next release version
|
||||||
|
# this is passed in from the .releaserc file
|
||||||
|
|
||||||
|
sudo apt-get install -y jq
|
||||||
|
|
||||||
|
nextReleaseVersion=$1
|
||||||
|
TARGET_KEY="version"
|
||||||
|
|
||||||
|
# parse all letters a-z and A-Z and replace with nothing
|
||||||
|
# this will remove all letters from the version string
|
||||||
|
# this is to ensure that the version string is a valid semver
|
||||||
|
|
||||||
|
# check if there is a letter in the version string
|
||||||
|
# if there is a letter, then remove it
|
||||||
|
# if there is no letter, then do nothing
|
||||||
|
if [[ $nextReleaseVersion =~ [a-zA-Z] ]]; then
|
||||||
|
nextReleaseVersion=$(echo $nextReleaseVersion | sed 's/[a-zA-Z]//g')
|
||||||
|
|
||||||
|
# check if there is a dash in the version string
|
||||||
|
# if there is a dash, then replace it with a dot
|
||||||
|
# if there is no dash, then do nothing
|
||||||
|
if [[ $nextReleaseVersion =~ "-" ]]; then
|
||||||
|
# parse all dashes and replace with dots
|
||||||
|
# this is to ensure that the version string is a valid semver
|
||||||
|
nextReleaseVersion=$(echo $nextReleaseVersion | sed 's/-/./g')
|
||||||
|
|
||||||
|
# remove everything after the third dot and the dot itself
|
||||||
|
# this is to ensure that the version string is a valid semver
|
||||||
|
nextReleaseVersion=$(echo $nextReleaseVersion | sed 's/\.[0-9]*$//g')
|
||||||
|
# remove the last dot
|
||||||
|
nextReleaseVersion=$(echo $nextReleaseVersion | sed 's/\.$//g')
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# print the next release version
|
||||||
|
|
||||||
|
printf "[prepareCMD.sh]: Next version: ${nextReleaseVersion}\n"
|
||||||
|
|
||||||
|
# This script is used to execute the prepareCMD.sh script on the remote host
|
||||||
|
printf "[prepareCMD.sh]: Executing prepareCMD.sh on remote host \n"
|
||||||
|
|
||||||
|
#printf "Update the version in the Cargo.toml file \n"
|
||||||
|
#
|
||||||
|
#sed -i "s/version = \"[0-9\\.]*\"/version = \"${nextReleaseVersion}\"/g" ./GUI/ETVR/src-tauri/Cargo.toml
|
||||||
|
|
||||||
|
# Install the dependencies for toml file
|
||||||
|
printf "[prepareCMD.sh]: Installing the dependencies for the toml file \n"
|
||||||
|
|
||||||
|
pip3 install yq
|
||||||
|
|
||||||
|
export PATH="~/.local/bin:$PATH"
|
||||||
|
source ~/.bashrc
|
||||||
|
|
||||||
|
tmp=$(mktemp)
|
||||||
|
tomlq -t --arg version "$nextReleaseVersion" '.tool.poetry.version |= $version' ./pyproject.toml > "$tmp" && mv "$tmp" ./pyproject.toml -f
|
||||||
|
|
||||||
|
# validate the Cargo.toml file
|
||||||
|
#printf "[prepareCMD.sh]: Validating the Cargo.toml file \n"
|
||||||
|
#cat ./GUI/ETVR/src-tauri/Cargo.toml
|
||||||
|
|
||||||
|
printf "[prepareCMD.sh]: Done, continuing with release. \n"
|
||||||
130
.github/workflows/build.yml
vendored
Normal file
130
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
name: App Builder
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
- HSF-and-new-algos-feature-branch
|
||||||
|
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest]
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
token: ${{ env.GITHUB_TOKEN }}
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: 3.10.11
|
||||||
|
- name: Setup Poetry
|
||||||
|
uses: snok/install-poetry@v1
|
||||||
|
with:
|
||||||
|
virtualenvs-create: true
|
||||||
|
virtualenvs-in-project: true
|
||||||
|
installer-parallel: true
|
||||||
|
|
||||||
|
- name: Load cached wheels
|
||||||
|
id: cached-pip-wheels
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ~/.cache
|
||||||
|
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
|
||||||
|
|
||||||
|
#----------------------------------------------
|
||||||
|
# load cached venv if cache exists
|
||||||
|
#----------------------------------------------
|
||||||
|
- name: Load cached venv
|
||||||
|
id: cached-poetry-dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: .venv
|
||||||
|
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
|
||||||
|
|
||||||
|
- name: Install python dependencies
|
||||||
|
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
|
||||||
|
run: poetry install
|
||||||
|
|
||||||
|
- name: Install Linux dependencies
|
||||||
|
if: ${{ matrix.os == 'ubuntu-latest'}}
|
||||||
|
run: sudo apt install build-essential curl wget libssl-dev
|
||||||
|
|
||||||
|
- run: source $VENV
|
||||||
|
|
||||||
|
- name: Build Backend
|
||||||
|
run: poetry run pyinstaller --noconfirm EyeTrackApp/eyetrackapp.spec EyeTrackApp/eyetrackapp.py
|
||||||
|
|
||||||
|
- name: Rename Linux Binary
|
||||||
|
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||||
|
#mv ./dist/ETVR ./dist/ETVR.bin
|
||||||
|
run: |
|
||||||
|
ls -a dist
|
||||||
|
mv ./dist/eyetrackapp ./dist/eyetrackapp.bin
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: production-files
|
||||||
|
path: dist
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Deploy
|
||||||
|
needs: [build]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Create Directory
|
||||||
|
run: mkdir -p dist
|
||||||
|
- name: Download artifact
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: production-files
|
||||||
|
path: ./dist
|
||||||
|
- name: Setup node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
- run: npm install -g conventional-changelog-conventionalcommits
|
||||||
|
- run: npm install -g semantic-release@v19.0.5
|
||||||
|
- run: npm install -g @semantic-release/exec
|
||||||
|
- run: npm install -g @semantic-release/git
|
||||||
|
- run: npm install -g @semantic-release/release-notes-generator
|
||||||
|
- run: npm install -g @semantic-release/changelog
|
||||||
|
- run: npm install -g @semantic-release/github
|
||||||
|
- name: Release
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
chmod +x ./.github/scripts/prepareCMD.sh
|
||||||
|
semantic-release
|
||||||
|
cleanup:
|
||||||
|
name: Cleanup actions
|
||||||
|
needs:
|
||||||
|
- deploy
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 10
|
||||||
|
steps:
|
||||||
|
- name: "♻️ remove build artifacts"
|
||||||
|
uses: geekyeggo/delete-artifact@v1
|
||||||
|
with:
|
||||||
|
name: production-files
|
||||||
92
.github/workflows/build_all_the_things.txt
vendored
92
.github/workflows/build_all_the_things.txt
vendored
@ -1,92 +0,0 @@
|
|||||||
name: Tasmota CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
pull_request:
|
|
||||||
branches: development
|
|
||||||
paths:
|
|
||||||
- '**.c'
|
|
||||||
- '**.cpp'
|
|
||||||
- '**.h'
|
|
||||||
- '**.hpp'
|
|
||||||
- '**.ino'
|
|
||||||
- '**.json'
|
|
||||||
- '**.properties'
|
|
||||||
- 'pio-tools/*.py'
|
|
||||||
- '**.ini'
|
|
||||||
- '.github/workflows/build_all_the_things.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
base-images:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.repository == 'arendst/Tasmota'
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
variant:
|
|
||||||
- tasmota
|
|
||||||
- tasmota4M
|
|
||||||
- tasmota-display
|
|
||||||
- tasmota-ir
|
|
||||||
- tasmota-knx
|
|
||||||
- tasmota-lite
|
|
||||||
- tasmota-minimal
|
|
||||||
- tasmota-sensors
|
|
||||||
- tasmota-zbbridge
|
|
||||||
- tasmota-zigbee
|
|
||||||
- tasmota32
|
|
||||||
- tasmota32-webcam
|
|
||||||
- tasmota32-bluetooth
|
|
||||||
- tasmota32-core2
|
|
||||||
- tasmota32-display
|
|
||||||
- tasmota32-ir
|
|
||||||
- tasmota32-lvgl
|
|
||||||
- tasmota32s2
|
|
||||||
- tasmota32c3
|
|
||||||
- tasmota32c3usb
|
|
||||||
- tasmota32solo1
|
|
||||||
- tasmota32solo1-safeboot
|
|
||||||
- tasmota32-safeboot
|
|
||||||
- tasmota32c3-safeboot
|
|
||||||
- tasmota32c3usb-safeboot
|
|
||||||
- tasmota32s2-safeboot
|
|
||||||
- tasmota32s3-safeboot
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v1
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
#python -m pip install --upgrade pip
|
|
||||||
pip install -U platformio
|
|
||||||
#platformio upgrade --dev
|
|
||||||
#platformio update
|
|
||||||
- name: Run PlatformIO
|
|
||||||
run: platformio run -e ${{ matrix.variant }}
|
|
||||||
- uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: firmware
|
|
||||||
path: ./build_output
|
|
||||||
|
|
||||||
language-images:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.repository == 'arendst/Tasmota'
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
variant: [ tasmota ]
|
|
||||||
language: [ AF, BG, BR, CN, CZ, DE, ES, FR, FY, GR, HE, HU, IT, KO, NL, PL, PT, RO, RU, SE, SK, TR, TW, UK, VN ]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v1
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
#python -m pip install --upgrade pip
|
|
||||||
pip install -U platformio
|
|
||||||
#platformio upgrade --dev
|
|
||||||
#platformio update
|
|
||||||
- name: Run PlatformIO
|
|
||||||
run: platformio run -e ${{ matrix.variant }}-${{ matrix.language }}
|
|
||||||
- uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: firmware
|
|
||||||
path: ./build_output
|
|
||||||
162
.github/workflows/build_devel.txt
vendored
162
.github/workflows/build_devel.txt
vendored
@ -1,162 +0,0 @@
|
|||||||
name: Build_development
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch: # Manually start a workflow
|
|
||||||
push:
|
|
||||||
branches: development
|
|
||||||
paths-ignore:
|
|
||||||
- '.github/**' # Ignore changes towards the .github directory
|
|
||||||
- '**.md' # Do no build if *.md files changes
|
|
||||||
|
|
||||||
# Ensures that only one deploy task per branch/environment will run at a time.
|
|
||||||
concurrency:
|
|
||||||
group: environment-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
base-images:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.repository == 'arendst/Tasmota'
|
|
||||||
continue-on-error: true
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
variant:
|
|
||||||
- tasmota
|
|
||||||
- tasmota4M
|
|
||||||
- tasmota-minimal
|
|
||||||
- tasmota-display
|
|
||||||
- tasmota-ir
|
|
||||||
- tasmota-knx
|
|
||||||
- tasmota-lite
|
|
||||||
- tasmota-sensors
|
|
||||||
- tasmota-zbbridge
|
|
||||||
- tasmota-zigbee
|
|
||||||
- tasmota32
|
|
||||||
- tasmota32-webcam
|
|
||||||
- tasmota32-bluetooth
|
|
||||||
- tasmota32-display
|
|
||||||
- tasmota32-ir
|
|
||||||
- tasmota32-lvgl
|
|
||||||
- tasmota32c3
|
|
||||||
- tasmota32c3usb
|
|
||||||
- tasmota32solo1
|
|
||||||
- tasmota32solo1-safeboot
|
|
||||||
- tasmota32-safeboot
|
|
||||||
- tasmota32c3-safeboot
|
|
||||||
- tasmota32c3usb-safeboot
|
|
||||||
- tasmota32s2-safeboot
|
|
||||||
- tasmota32s3-safeboot
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
ref: development
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
pip install -U platformio
|
|
||||||
- name: Run PlatformIO
|
|
||||||
run: platformio run -e ${{ matrix.variant }}
|
|
||||||
- uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: firmware
|
|
||||||
path: ./build_output
|
|
||||||
|
|
||||||
language-images:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.repository == 'arendst/Tasmota'
|
|
||||||
continue-on-error: true
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
variant: [ tasmota, tasmota32 ]
|
|
||||||
language: [ AF, BG, BR, CN, CZ, DE, ES, FR, FY, GR, HE, HU, IT, KO, NL, PL, PT, RO, RU, SE, SK, TR, TW, UK, VN ]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
ref: development
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
pip install -U platformio
|
|
||||||
- name: Run PlatformIO
|
|
||||||
run: platformio run -e ${{ matrix.variant }}-${{ matrix.language }}
|
|
||||||
- uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: firmware
|
|
||||||
path: ./build_output
|
|
||||||
|
|
||||||
Upload:
|
|
||||||
needs: [base-images, language-images]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
continue-on-error: true
|
|
||||||
steps:
|
|
||||||
- uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
name: firmware
|
|
||||||
path: ./mv_firmware
|
|
||||||
- name: Display structure of downloaded files
|
|
||||||
run: ls -R
|
|
||||||
working-directory: ./mv_firmware
|
|
||||||
- name: Move firmware files in sub-folders
|
|
||||||
run: |
|
|
||||||
mkdir -p ./firmware/tasmota/languages
|
|
||||||
mkdir -p ./firmware/tasmota32/languages
|
|
||||||
mkdir -p ./firmware/map
|
|
||||||
[ ! -f ./mv_firmware/map/* ] || mv ./mv_firmware/map/* ./firmware/map/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota.* ] || mv ./mv_firmware/firmware/tasmota.* ./firmware/tasmota/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota4M.* ] || mv ./mv_firmware/firmware/tasmota4M.* ./firmware/tasmota/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota-sensors.* ] || mv ./mv_firmware/firmware/tasmota-sensors.* ./firmware/tasmota/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota-minimal.bin.gz ] || mv ./mv_firmware/firmware/tasmota-minimal.bin.gz ./firmware/tasmota/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota-lite.* ] || mv ./mv_firmware/firmware/tasmota-lite.* ./firmware/tasmota/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota-ir*.* ] || mv ./mv_firmware/firmware/tasmota-ir*.* ./firmware/tasmota/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota-display.* ] || mv ./mv_firmware/firmware/tasmota-display.* ./firmware/tasmota/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota-knx.* ] || mv ./mv_firmware/firmware/tasmota-knx.* ./firmware/tasmota/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota-zbbridge.* ] || mv ./mv_firmware/firmware/tasmota-zbbridge.* ./firmware/tasmota/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota-zigbee.* ] || mv ./mv_firmware/firmware/tasmota-zigbee.* ./firmware/tasmota/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32.* ] || mv ./mv_firmware/firmware/tasmota32.* ./firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32solo1*.* ] || mv ./mv_firmware/firmware/tasmota32solo1*.* ./firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32-ir*.* ] || mv ./mv_firmware/firmware/tasmota32-ir*.* ./firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32-display.* ] || mv ./mv_firmware/firmware/tasmota32-display.* ./firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32-lvgl.* ] || mv ./mv_firmware/firmware/tasmota32-lvgl.* ./firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32-web*.* ] || mv ./mv_firmware/firmware/tasmota32-web*.* ./firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32-odroidgo.* ] || mv ./mv_firmware/firmware/tasmota32-odroidgo.* ./firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32-core2.* ] || mv ./mv_firmware/firmware/tasmota32-core2.* ./firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32-bluetooth.* ] || mv ./mv_firmware/firmware/tasmota32-bluetooth.* ./firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32c3*.* ] || mv ./mv_firmware/firmware/tasmota32c3*.* ./firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32-safeboot* ] || mv ./mv_firmware/firmware/tasmota32-safeboot* ./firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32-* ] || mv ./mv_firmware/firmware/tasmota32-* ./firmware/tasmota32/languages/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32* ] || mv ./mv_firmware/firmware/tasmota32* ./firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/* ] || mv ./mv_firmware/firmware/* ./firmware/tasmota/languages/
|
|
||||||
- name: Display files to transfer
|
|
||||||
run: ls -R ./*
|
|
||||||
- name: Push Firmware files to tmp_copy repo
|
|
||||||
uses: Jason2866/copy_file_to_another_repo_action@main
|
|
||||||
env:
|
|
||||||
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
|
|
||||||
with:
|
|
||||||
source_file: 'firmware'
|
|
||||||
destination_repo: 'arendst/tmp_copy'
|
|
||||||
destination_branch: 'firmware'
|
|
||||||
user_email: 'github-actions@github.com'
|
|
||||||
user_name: 'github-actions'
|
|
||||||
|
|
||||||
Start_final_copy:
|
|
||||||
needs: Upload
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Creat trigger.txt
|
|
||||||
run: |
|
|
||||||
echo ${GITHUB_SHA} &> trigger.txt
|
|
||||||
echo "$(<trigger.txt)"
|
|
||||||
- name: Push trigger.txt to start workflow copy in tmp repo
|
|
||||||
uses: Jason2866/copy_file_to_another_repo_action@main
|
|
||||||
env:
|
|
||||||
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
|
|
||||||
with:
|
|
||||||
source_file: 'trigger.txt'
|
|
||||||
destination_repo: 'arendst/tmp_copy'
|
|
||||||
destination_branch: 'action-development'
|
|
||||||
user_email: 'github-actions@github.com'
|
|
||||||
user_name: 'github-actions'
|
|
||||||
170
.github/workflows/build_master.txt
vendored
170
.github/workflows/build_master.txt
vendored
@ -1,170 +0,0 @@
|
|||||||
name: Build_firmware_master
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: master
|
|
||||||
paths-ignore:
|
|
||||||
- '.github/**' # Ignore changes towards the .github directory
|
|
||||||
- '**.md' # Do no build if *.md files changes
|
|
||||||
|
|
||||||
# Ensures that only one deploy task per branch/environment will run at a time.
|
|
||||||
concurrency:
|
|
||||||
group: environment-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
base-images:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.repository == 'arendst/Tasmota'
|
|
||||||
continue-on-error: true
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
variant:
|
|
||||||
- tasmota
|
|
||||||
- tasmota4M
|
|
||||||
- tasmota-minimal
|
|
||||||
- tasmota-display
|
|
||||||
- tasmota-ir
|
|
||||||
- tasmota-knx
|
|
||||||
- tasmota-lite
|
|
||||||
- tasmota-sensors
|
|
||||||
- tasmota-zbbridge
|
|
||||||
- tasmota-zigbee
|
|
||||||
- tasmota32
|
|
||||||
- tasmota32-webcam
|
|
||||||
- tasmota32-bluetooth
|
|
||||||
- tasmota32-display
|
|
||||||
- tasmota32-ir
|
|
||||||
- tasmota32-lvgl
|
|
||||||
- tasmota32c3
|
|
||||||
- tasmota32c3usb
|
|
||||||
- tasmota32solo1
|
|
||||||
- tasmota32solo1-safeboot
|
|
||||||
- tasmota32-safeboot
|
|
||||||
- tasmota32c3-safeboot
|
|
||||||
- tasmota32s2-safeboot
|
|
||||||
- tasmota32s3-safeboot
|
|
||||||
- tasmota32c3usb-safeboot
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
ref: master
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
pip install -U platformio
|
|
||||||
- name: Run PlatformIO
|
|
||||||
run: platformio run -e ${{ matrix.variant }}
|
|
||||||
- uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: firmware
|
|
||||||
path: ./build_output
|
|
||||||
|
|
||||||
language-images:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.repository == 'arendst/Tasmota'
|
|
||||||
continue-on-error: true
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
variant: [ tasmota, tasmota32 ]
|
|
||||||
language: [ AF, BG, BR, CN, CZ, DE, ES, FR, FY, GR, HE, HU, IT, KO, NL, PL, PT, RO, RU, SE, SK, TR, TW, UK, VN ]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
ref: master
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
pip install -U platformio
|
|
||||||
- name: Run PlatformIO
|
|
||||||
run: platformio run -e ${{ matrix.variant }}-${{ matrix.language }}
|
|
||||||
- uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: firmware
|
|
||||||
path: ./build_output
|
|
||||||
|
|
||||||
Upload:
|
|
||||||
needs: [base-images, language-images]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
continue-on-error: true
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
name: firmware
|
|
||||||
path: ./mv_firmware
|
|
||||||
- name: Display structure of downloaded files
|
|
||||||
run: ls -R ./mv_firmware/
|
|
||||||
- name: Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
#if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
with:
|
|
||||||
tag_name: ${{ github.run_number }}
|
|
||||||
files: ./mv_firmware/firmware/*
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Move firmware files in sub-folders
|
|
||||||
run: |
|
|
||||||
mkdir -p ./release-firmware/tasmota/languages
|
|
||||||
mkdir -p ./release-firmware/tasmota32/languages
|
|
||||||
mkdir -p ./release-firmware/map
|
|
||||||
[ ! -f ./mv_firmware/map/* ] || mv ./mv_firmware/map/* ./release-firmware/map/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota.* ] || mv ./mv_firmware/firmware/tasmota.* ./release-firmware/tasmota/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota4M.* ] || mv ./mv_firmware/firmware/tasmota4M.* ./release-firmware/tasmota/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota-sensors.* ] || mv ./mv_firmware/firmware/tasmota-sensors.* ./release-firmware/tasmota/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota-minimal.bin.gz ] || mv ./mv_firmware/firmware/tasmota-minimal.bin.gz ./release-firmware/tasmota/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota-lite.* ] || mv ./mv_firmware/firmware/tasmota-lite.* ./release-firmware/tasmota/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota-ir*.* ] || mv ./mv_firmware/firmware/tasmota-ir*.* ./release-firmware/tasmota/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota-display.* ] || mv ./mv_firmware/firmware/tasmota-display.* ./release-firmware/tasmota/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota-knx.* ] || mv ./mv_firmware/firmware/tasmota-knx.* ./release-firmware/tasmota/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota-zbbridge.* ] || mv ./mv_firmware/firmware/tasmota-zbbridge.* ./release-firmware/tasmota/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota-zigbee.* ] || mv ./mv_firmware/firmware/tasmota-zigbee.* ./release-firmware/tasmota/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32.* ] || mv ./mv_firmware/firmware/tasmota32.* ./release-firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32solo1*.* ] || mv ./mv_firmware/firmware/tasmota32solo1*.* ./release-firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32-ir*.* ] || mv ./mv_firmware/firmware/tasmota32-ir*.* ./release-firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32-display.* ] || mv ./mv_firmware/firmware/tasmota32-display.* ./release-firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32-lvgl.* ] || mv ./mv_firmware/firmware/tasmota32-lvgl.* ./release-firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32-web*.* ] || mv ./mv_firmware/firmware/tasmota32-web*.* ./release-firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32-odroidgo.* ] || mv ./mv_firmware/firmware/tasmota32-odroidgo.* ./release-firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32-core2.* ] || mv ./mv_firmware/firmware/tasmota32-core2.* ./release-firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32-bluetooth.* ] || mv ./mv_firmware/firmware/tasmota32-bluetooth.* ./release-firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32c3*.* ] || mv ./mv_firmware/firmware/tasmota32c3*.* ./release-firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32-safeboot* ] || mv ./mv_firmware/firmware/tasmota32-safeboot* ./release-firmware/tasmota32/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32-* ] || mv ./mv_firmware/firmware/tasmota32-* ./release-firmware/tasmota32/languages/
|
|
||||||
[ ! -f ./mv_firmware/firmware/tasmota32* ] || mv ./mv_firmware/firmware/tasmota32* ./release-firmware/tasmota32/languages/
|
|
||||||
[ ! -f ./mv_firmware/firmware/* ] || mv ./mv_firmware/firmware/* ./release-firmware/tasmota/languages/
|
|
||||||
- name: Display files to transfer
|
|
||||||
run: ls -R ./*
|
|
||||||
- name: Push Firmware files to tmp_copy repo
|
|
||||||
uses: Jason2866/copy_file_to_another_repo_action@main
|
|
||||||
env:
|
|
||||||
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
|
|
||||||
with:
|
|
||||||
source_file: 'release-firmware'
|
|
||||||
destination_repo: 'arendst/tmp_copy'
|
|
||||||
destination_branch: 'firmware'
|
|
||||||
user_email: 'github-actions@github.com'
|
|
||||||
user_name: 'github-actions'
|
|
||||||
|
|
||||||
Start_final_copy:
|
|
||||||
needs: Upload
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Creat trigger.txt
|
|
||||||
run: |
|
|
||||||
echo ${GITHUB_SHA} &> trigger.txt
|
|
||||||
echo "$(<trigger.txt)"
|
|
||||||
- name: Push trigger.txt to start workflow copy in tmp repo
|
|
||||||
uses: Jason2866/copy_file_to_another_repo_action@main
|
|
||||||
env:
|
|
||||||
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
|
|
||||||
with:
|
|
||||||
source_file: 'trigger.txt'
|
|
||||||
destination_repo: 'arendst/tmp_copy'
|
|
||||||
destination_branch: 'action-master'
|
|
||||||
user_email: 'github-actions@github.com'
|
|
||||||
user_name: 'github-actions'
|
|
||||||
187
.releaserc
Normal file
187
.releaserc
Normal file
@ -0,0 +1,187 @@
|
|||||||
|
{
|
||||||
|
"branches": [
|
||||||
|
"main",
|
||||||
|
"master",
|
||||||
|
"release",
|
||||||
|
{
|
||||||
|
"name": "HSF-and-new-algos-feature-branch",
|
||||||
|
"prerelease": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
[
|
||||||
|
"@semantic-release/commit-analyzer",
|
||||||
|
{
|
||||||
|
"preset": "conventionalcommits",
|
||||||
|
"parserOpts": {
|
||||||
|
"noteKeywords": [
|
||||||
|
"BREAKING CHANGE",
|
||||||
|
"BREAKING CHANGES",
|
||||||
|
"BREAKING"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"releaseRules": [
|
||||||
|
{
|
||||||
|
"breaking": true,
|
||||||
|
"release": "major"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "feat",
|
||||||
|
"release": "minor"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "fix",
|
||||||
|
"release": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "perf",
|
||||||
|
"release": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "revert",
|
||||||
|
"release": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "docs",
|
||||||
|
"scope": "docs-*",
|
||||||
|
"release": "minor"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "docs",
|
||||||
|
"release": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "style",
|
||||||
|
"release": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "refactor",
|
||||||
|
"release": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "test",
|
||||||
|
"release": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "build",
|
||||||
|
"release": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ci",
|
||||||
|
"scope": "ci-*",
|
||||||
|
"release": "patch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "chore",
|
||||||
|
"release": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "no-release",
|
||||||
|
"release": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"@semantic-release/release-notes-generator",
|
||||||
|
{
|
||||||
|
"preset": "conventionalcommits",
|
||||||
|
"parserOpts": {
|
||||||
|
"noteKeywords": [
|
||||||
|
"BREAKING CHANGE",
|
||||||
|
"BREAKING CHANGES",
|
||||||
|
"BREAKING"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"writerOpts": {
|
||||||
|
"commitsSort": [
|
||||||
|
"subject",
|
||||||
|
"scope"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"presetConfig": {
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "feat",
|
||||||
|
"section": "🍕 Features"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "feature",
|
||||||
|
"section": "🍕 Features"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "fix",
|
||||||
|
"section": "🐛 Bug Fixes"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "perf",
|
||||||
|
"section": "🔥 Performance Improvements"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "revert",
|
||||||
|
"section": "⏩ Reverts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "docs",
|
||||||
|
"section": "📝 Documentation"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "style",
|
||||||
|
"section": "🎨 Styles"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "refactor",
|
||||||
|
"section": "🧑💻 Code Refactoring"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "test",
|
||||||
|
"section": "✅ Tests"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "build",
|
||||||
|
"section": "🤖 Build System"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ci",
|
||||||
|
"section": "🔁 Continuous Integration"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"@semantic-release/changelog",
|
||||||
|
{
|
||||||
|
"changelogTitle": "# 📦 Changelog \n[](https://conventionalcommits.org)\n[](https://semver.org)\n> All notable changes to this project will be documented in this file"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"@semantic-release/exec",
|
||||||
|
{
|
||||||
|
"prepareCmd": "./.github/scripts/prepareCMD.sh ${nextRelease.version}",
|
||||||
|
"publishCmd": "echo Publishing ${nextRelease.version}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"@semantic-release/github",
|
||||||
|
{
|
||||||
|
"addReleases": "bottom",
|
||||||
|
"assets": [
|
||||||
|
{
|
||||||
|
"path": "./dist/**/*.{msi,deb,rpm,AppImage,dmg,sha256sum,bin,exe}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"@semantic-release/git",
|
||||||
|
{
|
||||||
|
"assets": [
|
||||||
|
"LICENSE*",
|
||||||
|
"CHANGELOG.md"
|
||||||
|
],
|
||||||
|
"message": "chore(${nextRelease.type}): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -20,7 +20,10 @@ pyz = PYZ(a.pure, a.zipped_data,
|
|||||||
cipher=block_cipher)
|
cipher=block_cipher)
|
||||||
|
|
||||||
exe = EXE(pyz,
|
exe = EXE(pyz,
|
||||||
a.scripts,
|
a.scripts,
|
||||||
|
a.binaries,
|
||||||
|
a.zipfiles,
|
||||||
|
a.datas,
|
||||||
[],
|
[],
|
||||||
exclude_binaries=True,
|
exclude_binaries=True,
|
||||||
name='eyetrackapp',
|
name='eyetrackapp',
|
||||||
@ -29,16 +32,11 @@ exe = EXE(pyz,
|
|||||||
strip=False,
|
strip=False,
|
||||||
upx=True,
|
upx=True,
|
||||||
console=True,
|
console=True,
|
||||||
|
runtime_tmpdir=None,
|
||||||
disable_windowed_traceback=False,
|
disable_windowed_traceback=False,
|
||||||
|
argv_emulation=False,
|
||||||
target_arch=None,
|
target_arch=None,
|
||||||
codesign_identity=None,
|
codesign_identity=None,
|
||||||
entitlements_file=None,
|
entitlements_file=None,
|
||||||
icon="Images/logo.ico" )
|
icon="Images/logo.ico" )
|
||||||
coll = COLLECT(exe,
|
|
||||||
a.binaries,
|
|
||||||
a.zipfiles,
|
|
||||||
a.datas,
|
|
||||||
strip=False,
|
|
||||||
upx=True,
|
|
||||||
upx_exclude=[],
|
|
||||||
name='EyeTrackApp')
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user