From 471c5a053bc25094068c96287428a74e57655399 Mon Sep 17 00:00:00 2001 From: akasaka Date: Sun, 27 Oct 2024 08:52:41 +0900 Subject: [PATCH] Fixing CI --- .github/workflows/main.yml | 22 +++++++++++++++++++--- .github/workflows/web.yml | 5 ++++- README.md | 8 +++++--- helper/ci/create_fvudata.sh | 8 +++----- platformio.ini | 8 -------- 5 files changed, 31 insertions(+), 20 deletions(-) mode change 100644 => 100755 helper/ci/create_fvudata.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 197d829..f2b4086 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,12 +8,18 @@ jobs: build-everything: runs-on: ubuntu-latest name: Build All Binaries + permissions: + contents: write steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 submodules: recursive + - name: Set up Git identity + run: | + git config --local user.name "Leønid Yakubovič" + git config --local user.email "sueydisnilyu@example.com" - name: Prepare environment uses: ./.github/actions/prepare_pio - name: Download AquesTalk @@ -48,11 +54,21 @@ jobs: - name: Switch to public branch run: git checkout pub - name: Merge changes from main - run: git merge main + run: git merge main --strategy-option theirs - name: Move things to FVUDATA for publishing run: ./helper/ci/create_fvudata.sh - name: Add FVUDATA stuff into git and push run: | git add -f ./webroot/fvudata/* - git commit -m "Publish firmwares at $(git rev-parse --short HEAD)" - git push --force -u origin pub \ No newline at end of file + git commit -m "ci: Publish firmwares at $(git rev-parse --short HEAD)" + git push --force -u origin pub + # Thanks to yet another weird limitation of Github Actions, we need to duplicate this action here + # https://github.com/orgs/community/discussions/25702 + # Remove when a better solution is found + - name: Copy CNAME + run: cp ./CNAME ./webroot/CNAME + - name: Publish webroot via GitHub Pages + uses: rayluo/github-pages-overwriter@v1.3 + with: + source-directory: webroot + target-branch: gh-pages \ No newline at end of file diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index bd815a7..ed2f14e 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -5,7 +5,8 @@ name: Publish web on: push: - branches: ['pub'] + branches: ['pub'] + workflow_dispatch: null jobs: publish: @@ -19,6 +20,8 @@ jobs: with: fetch-depth: 0 submodules: recursive + - name: Copy CNAME + run: cp ./CNAME ./webroot/CNAME - name: Publish webroot via GitHub Pages uses: rayluo/github-pages-overwriter@v1.3 with: diff --git a/README.md b/README.md index 3baca3a..493194e 100644 --- a/README.md +++ b/README.md @@ -184,9 +184,10 @@ An ESP32-WROVER is required, because the firmware takes up 99.8% of an OTA parti ### Display (at least one required) -* Morio Denki 16101DS (see [below](#morio-denki-plasma-display-info), [driver](src/display//md_plasma.cpp), feature flag `HAS_OUTPUT_MD_PLASMA`) -* Winstar WEG010016A in 8-bit parallel mode ([driver](src/display/ws0010.cpp), feature flag `HAS_OUTPUT_WS0010`). Includes BFI (Black Frame Insertion) for smoother operation and dimming. -* Noritake ITRON GU-NNNx16-7000 series graphic VFDs in 8-bit parallel mode ([driver](src/display/gu7000.cpp), feature flag `HAS_OUTPUT_GU7000`) +* Morio Denki 16101DS (see [below](#morio-denki-plasma-display-info), [driver](src/display/md_plasma.cpp), feature flag `HAS_OUTPUT_MD_PLASMA`) +* Winstar (sometimes sold as Vishay) WEG010016A in 8-bit parallel mode ([driver](src/display/ws0010.cpp), feature flag `HAS_OUTPUT_WS0010`). Includes BFI (Black Frame Insertion) for smoother operation and dimming. Datasheet backup: [Controller](docs/reference/datasheet/winstar/WS0010.pdf), [display](docs/reference/datasheet/winstar/WEG010016ALPP5N00000.pdf) +* Noritake ITRON GU-NNNx16-7000 series graphic VFDs in 8-bit parallel mode ([driver](src/display/gu7000.cpp), feature flag `HAS_OUTPUT_GU7000`). Datasheet backup before the bundled CDR got completely rotten: [140x16-7000](docs/reference/datasheet/noritake_itron/s-gu140x16g-7000_j04.pdf), [140x16-7100](docs/reference/datasheet/noritake_itron/s-gu140x16g-7100_j00.pdf), [112x16](docs/reference/datasheet/noritake_itron/s-gu112x16g-7000_j04.pdf) +* *Planned:* [Akizuki Denshi K-875](https://akizukidenshi.com/img/contents/kairo/%E3%83%87%E3%83%BC%E3%82%BF/%E8%A1%A8%E7%A4%BA%E8%A3%85%E7%BD%AE/LED%E9%9B%BB%E5%85%89%E6%8E%B2%E7%A4%BA.pdf) ×4 for a 128x16 display (I couldn't resist not scooping some up in the Outlet Sale for 200 yen apiece). [Datasheet backup](docs/reference/datasheet/akizuki/LED電光掲示.pdf) ### Speaker (at least one required) @@ -202,6 +203,7 @@ An ESP32-WROVER is required, because the firmware takes up 99.8% of an OTA parti * `HAS_BLUETOOTH_LE`: automatically set on ESP32. Required for Switchbot-over-BLE. Uses Arduino-BLE and increases firmware size significantly. * `HAS_OTAFVU`: OTA updates via ArduinoOTA. Currently disabled due to partition size constraints from the above. * `HAS_SERIAL_MIDI`: Enable receiving MIDI data over serial. Makes the CPU a tad bit hotter so probably do not include this feature flag in production builds, unless you really want a MIDI powered alarm clock for some reason. +* `HAS_HTTPFVU`: OTA updates via HTTP from this repository's main branch. HTTPS is omitted for performance reasons, and the security is instead ensured using the highly secure [Ostrich algorithm](https://en.wikipedia.org/wiki/Ostrich_algorithm). ### Thermal sensors diff --git a/helper/ci/create_fvudata.sh b/helper/ci/create_fvudata.sh old mode 100644 new mode 100755 index f3fe085..322ad0a --- a/helper/ci/create_fvudata.sh +++ b/helper/ci/create_fvudata.sh @@ -8,7 +8,7 @@ target_dir="./webroot/fvudata" # Create the target directory if it doesn't exist mkdir -p "$target_dir" -cp "./.pio/build/music-pomf/littlefs.bin" "$target_dir/fs.bin" +cp "./.pio/build/music-pomf/littlefs.bin" "$target_dir/fs.fvu" cp "./data/FS_VER" "$target_dir/fs_ver.txt" # Iterate over each entry in the source directory @@ -24,10 +24,8 @@ for entry in "$source_dir"/*; do folder_name=$(basename "$entry") # Copy and rename firmware.bin to the target directory - cp "$firmware_file" "$target_dir/$folder_name.bin" - echo "Copied $firmware_file to $target_dir/$folder_name.bin" - else - echo "No firmware.bin found in $entry" + cp "$firmware_file" "$target_dir/$folder_name.avu" + echo "Copied $firmware_file to $target_dir/$folder_name.avu" fi fi done diff --git a/platformio.ini b/platformio.ini index 02f3219..18e1176 100644 --- a/platformio.ini +++ b/platformio.ini @@ -47,14 +47,6 @@ upload_speed = 921600 monitor_speed = 115200 monitor_filters = esp32_exception_decoder -[env:PLASMA_OTA] -board = esp32dev -build_type = debug -build_flags = -DDEVICE_PLASMA_CLOCK ${common.build_flags} -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -upload_protocol = espota -upload_port = 192.168.1.144 -upload_flags = --auth=plasma-otafvu - [env:OLED] board = esp32dev build_type = debug