Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
43 changes: 40 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,36 @@ on:
types: [published] # 手动发布 Release 时也自动构建并上传 bin
workflow_dispatch: # 允许手动触发

permissions:
contents: read

concurrency:
group: firmware-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

env:
IDF_VERSION: v5.5.2
TARGET: esp32s3

jobs:
web-tests:
name: WebUI regression tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm
cache-dependency-path: tests/prompts/package-lock.json
- run: npm ci --prefix tests/prompts
- run: npm test --prefix tests/prompts
- run: python3 tests/release/test_release.py
- name: Install Chrome for actual-page regressions
working-directory: tests/prompts
run: npx playwright install --with-deps chrome
- run: npm run test:browser --prefix tests/prompts

build:
name: Build ESP32-S3 Firmware
runs-on: ubuntu-latest
Expand Down Expand Up @@ -129,13 +154,16 @@ jobs:
# 编译成功后自动创建或更新 Release:tag 推送、main 推送或手动发布 Release
release:
name: Create or Update Release
needs: build
if: github.event_name == 'release' || startsWith(github.ref, 'refs/tags/v') || (github.ref == 'refs/heads/main' && github.event_name == 'push')
needs: [build, web-tests]
if: github.repository == 'RMinte-AI/TianshanOS' && (github.event_name == 'release' || startsWith(github.ref, 'refs/tags/v') || (github.ref == 'refs/heads/main' && github.event_name == 'push'))
runs-on: ubuntu-latest
permissions:
contents: write # 创建 Release 需要写权限

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Download artifacts
uses: actions/download-artifact@v4
with:
Expand All @@ -156,6 +184,13 @@ jobs:
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
echo "Release tag: $TAG"

- name: Validate Chinese release notes and build version
env:
RELEASE_TAG: ${{ steps.release_tag.outputs.tag }}
BUILD_VERSION: ${{ needs.build.outputs.version }}
run: |
python3 tools/check_release.py "$RELEASE_TAG" "$BUILD_VERSION"

- name: Check if release already exists (main branch)
if: github.ref == 'refs/heads/main'
id: check
Expand All @@ -181,6 +216,8 @@ jobs:
firmware/**/*.bin
firmware/**/flasher_args.json
fail_on_unmatched_files: true
generate_release_notes: true
target_commitish: ${{ github.sha }}
body_path: docs/releases/${{ steps.release_tag.outputs.tag }}.md
generate_release_notes: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@ password*.txt
# Documentation
frontend_modification.md
frontend_emoji_list.md

# Local regression dependencies
tests/prompts/node_modules/
Binary file modified build/TianShanOS.bin
Binary file not shown.
Binary file modified build/www.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion components/ch405labs_esp_libssh2/libssh2/src/mbedtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#ifdef ESP_PLATFORM
#include "esp_log.h"
#define MBEDTLS_DEBUG_TAG "libssh2_mbedtls"
#define MBEDTLS_DEBUG(fmt, ...) ESP_LOGI(MBEDTLS_DEBUG_TAG, fmt, ##__VA_ARGS__)
#define MBEDTLS_DEBUG(fmt, ...) ESP_LOGD(MBEDTLS_DEBUG_TAG, fmt, ##__VA_ARGS__)
#define MBEDTLS_ERROR(fmt, ...) ESP_LOGE(MBEDTLS_DEBUG_TAG, fmt, ##__VA_ARGS__)
#else
#define MBEDTLS_DEBUG(fmt, ...)
Expand Down
2 changes: 1 addition & 1 deletion components/ch405labs_esp_libssh2/libssh2/src/userauth.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
/* ESP-IDF logging for debugging */
#ifdef ESP_PLATFORM
#include "esp_log.h"
#define USERAUTH_DEBUG(fmt, ...) ESP_LOGI("libssh2_userauth", fmt, ##__VA_ARGS__)
#define USERAUTH_DEBUG(fmt, ...) ESP_LOGD("libssh2_userauth", fmt, ##__VA_ARGS__)
#define USERAUTH_ERROR(fmt, ...) ESP_LOGE("libssh2_userauth", fmt, ##__VA_ARGS__)
#else
#define USERAUTH_DEBUG(fmt, ...)
Expand Down
2 changes: 1 addition & 1 deletion components/ts_api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ idf_component_register(
INCLUDE_DIRS "include"
EMBED_FILES ${TS_API_EMBED_FILES}
REQUIRES ts_core ts_drivers ts_led ts_net json ts_storage ts_security ts_ota ts_automation ts_cert ts_webui ts_config_pack
PRIV_REQUIRES ts_hal esp_timer esp_app_format spi_flash bootloader_support esp_wifi app_update esp_https_ota esp_http_client espressif__esp_websocket_client
PRIV_REQUIRES ts_https ts_hal esp_timer esp_app_format spi_flash bootloader_support esp_wifi app_update esp_https_ota esp_http_client espressif__esp_websocket_client
)
Loading
Loading