Skip to content

Commit

Permalink
Merge branch 'development' into new-release
Browse files Browse the repository at this point in the history
  • Loading branch information
benzino77 committed Oct 7, 2023
2 parents aec59a7 + 5d5225a commit 1424e68
Show file tree
Hide file tree
Showing 51 changed files with 32,620 additions and 12,924 deletions.
2 changes: 1 addition & 1 deletion .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM node:12.16.2-buster-slim
FROM node:14-buster-slim
RUN apt-get update && apt-get install -y python3 python3-pip git
ENV LC_ALL=C.UTF-8 LANG=C.UTF-8
4 changes: 2 additions & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
image:
file: .gitpod.Dockerfile
tasks:
- init: yarn install
command: yarn build && pip3 install platformio && PATH=$PATH:$HOME/.local/bin && node server/app.js
- init: npm ci
command: npm run build && pip3 install platformio && PATH=$PATH:$HOME/.local/bin && node server/app.js
ports:
- port: 3000
onOpen: open-browser
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v14
1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
FROM node:12.16.2-buster-slim
FROM node:14-buster-slim
LABEL maintainer="Piotr Antczak <antczak.piotr@gmail.com>"

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y python3 git python3-setuptools && \
DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip && pip3 install platformio && \
DEBIAN_FRONTEND=noninteractive apt-get clean && \
yarn global add nodemon && \
npm install -g nodemon && \
cd /tmp && git clone https://github.com/arendst/Tasmota.git && \
rm -rf /var/lib/apt/lists/*
ADD public /tasmocompiler/public/
ADD server /tasmocompiler/server/
ADD src /tasmocompiler/src/
ADD package.json yarn.lock .yarnrc /tasmocompiler/
RUN cd /tasmocompiler && yarn install && \
yarn build && \
yarn cache clean
ADD package.json package-lock.json /tasmocompiler/
RUN cd /tasmocompiler && npm ci && npm run build
ENV LC_ALL=C.UTF-8 LANG=C.UTF-8
WORKDIR /tasmocompiler
ENTRYPOINT ["nodemon", "server/app.js"]
EXPOSE 3000/tcp
29 changes: 29 additions & 0 deletions ansible/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Automatic compilation tests

## Description

Here are the automation scripts, to check if TasmoCompiler is still able to compile Tasmota. It is using `user_config_override.h` and `platformio_override.ini` files generated by TasmoCompiler. Then it runs compilation for every supported/defined board.

## Requirements

What is needed:

- platformio is installed and is available in the `PATH`
- ansible is installed and available in the `PATH`
- source code of Tasmota is available at the location defined in `tasmota_dir` ansible variable (`group_vars/all/vars.yaml`)

The easiest way to prepare testing environemnt is to use `python` virtualenv module:

```sh
apt install python3-venv
cd tasmocompiler
python3 -m venv .venv # create new python virtualenv
source .venv/bin/activate # active virtualenv
pip install platformio ansible # install platformio and ansible in virtualenv
cd ansible
ansible-playbook site.yaml # run tests
```

## Adding new board

To add new board one need to add required files to `roles/compile/files/<board_name>` and then add this board to test suite in `site.yaml`
2 changes: 2 additions & 0 deletions ansible/group_vars/all/vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tasmota_dir: /tmp/Tasmota
tasmota_branch: development
9 changes: 9 additions & 0 deletions ansible/roles/compile/files/esp32_c3/platformio_override.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[platformio]
default_envs = tasmota32c3

[env:tasmota32c3]
extends = env:tasmota32_base
board = esp32c3
build_unflags = {env:tasmota32_base.build_unflags} -flto -mtarget-align
build_flags = ${env:tasmota32_base.build_flags} -fno-lto
lib_ignore = TTGO TWatch Library, epdiy, Micro-RTSP, mp3_shine_esp32
Loading

0 comments on commit 1424e68

Please sign in to comment.