Skip to content

Commit

Permalink
Merge branch 'develop' into feature/use-event-loops
Browse files Browse the repository at this point in the history
  • Loading branch information
hhvrc committed Nov 11, 2024
2 parents 868fed6 + c208800 commit e12786f
Show file tree
Hide file tree
Showing 9 changed files with 458 additions and 350 deletions.
25 changes: 22 additions & 3 deletions .github/actions/cdn-bump-version/action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
name: cdn-bump-version
description: Uploads version file to CDN
inputs:
cf-bucket:
description: Name of the S3 bucket
bunny-stor-hostname:
description: Bunny SFTP Hostname
required: true
bunny-stor-username:
description: Bunny SFTP Username
required: true
bunny-stor-password:
description: Bunny SFTP Password
required: true
bunny-api-key:
description: Bunny API key
required: true
bunny-cdn-url:
description: Bunny pull zone base url e.g. https://firmware.openshock.org (no trailing slash)
required: true
version:
description: 'Version of the release'
Expand All @@ -19,4 +31,11 @@ runs:
run: |
mkdir -p upload
echo "${{ inputs.version }}" >> upload/version-${{ inputs.release-channel }}.txt
rclone copy upload cdn:${{ inputs.cf-bucket }}/
sshpass -p "${{ inputs.bunny-stor-password }}" scp -v -r upload/* ${{ inputs.bunny-stor-username }}@${{ inputs.bunny-stor-hostname }}:/
- name: Purge CDN cache
shell: bash
run: |
curl -X POST "https://api.bunny.net/purge?url=${{ inputs.bunny-cdn-url }}/version-${{ inputs.release-channel }}.txt" \
-H "Content-Type: application/json" \
-H "AccessKey: ${{ inputs.bunny-api-key }}"
29 changes: 8 additions & 21 deletions .github/actions/cdn-prepare/action.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,20 @@
name: cdn-prepare
description: Prepares the CDN for firmware uploads
description: Bunny sshpass and knowhosts setup
inputs:
cf-account-id:
description: Cloudflare Account ID
required: true
cf-access-key-id:
description: Cloudflare Access Key ID
required: true
cf-secret-access-key:
description: Cloudflare Secret Access Key
bunny-ssh-knownhosts:
description: Bunny SFTP Hostname
required: true

runs:
using: composite
steps:
- name: Install rclone
- name: Install sshpass
shell: bash
run: sudo apt-get install -y rclone
run: sudo apt-get install -y sshpass

- name: Configure rclone
- name: Configure known hosts
shell: bash
run: |
mkdir -p ~/.config/rclone/
conf=~/.config/rclone/rclone.conf
echo "[cdn]" >> $conf
echo "type = s3" >> $conf
echo "provider = Cloudflare" >> $conf
echo "access_key_id = ${{ inputs.cf-access-key-id }}" >> $conf
echo "secret_access_key = ${{ inputs.cf-secret-access-key }}" >> $conf
echo "endpoint = https://${{ inputs.cf-account-id }}.r2.cloudflarestorage.com" >> $conf
echo "acl = public-read" >> $conf
mkdir -p ~/.ssh
echo "${{ inputs.bunny-ssh-knownhosts }}" >> ~/.ssh/known_hosts
12 changes: 9 additions & 3 deletions .github/actions/cdn-upload-firmware/action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: cdn-upload-firmware
description: Uploads firmware partitions and merged binaries to CDN along with SHA256 checksums
inputs:
cf-bucket:
description: Name of the S3 bucket
bunny-stor-hostname:
description: Bunny SFTP Hostname
required: true
bunny-stor-username:
description: Bunny SFTP Username
required: true
bunny-stor-password:
description: Bunny SFTP Password
required: true
fw-version:
description: Firmware version
Expand Down Expand Up @@ -49,4 +55,4 @@ runs:
mkdir -p upload
mv *.bin upload/
mv hashes.*.txt upload/
rclone copy upload 'cdn:${{ inputs.cf-bucket }}/${{ inputs.fw-version }}/${{ inputs.board }}/'
sshpass -p "${{ inputs.bunny-stor-password }}" scp -r upload/ ${{ inputs.bunny-stor-username }}@${{ inputs.bunny-stor-hostname }}:/${{ inputs.fw-version }}/${{ inputs.board }}
12 changes: 9 additions & 3 deletions .github/actions/cdn-upload-version-info/action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: cdn-upload-version-info
description: Uploads version specific info to CDN
inputs:
cf-bucket:
description: Name of the S3 bucket
bunny-stor-hostname:
description: Bunny SFTP Hostname
required: true
bunny-stor-username:
description: Bunny SFTP Username
required: true
bunny-stor-password:
description: Bunny SFTP Password
required: true
fw-version:
description: Firmware version
Expand All @@ -27,4 +33,4 @@ runs:
run: |
mkdir -p upload
mv boards.txt upload/
rclone copy upload 'cdn:${{ inputs.cf-bucket }}/${{ inputs.fw-version }}/${{ inputs.board }}/'
sshpass -p "${{ inputs.bunny-stor-password }}" scp -r upload/* ${{ inputs.bunny-stor-username }}@${{ inputs.bunny-stor-hostname }}:/${{ inputs.fw-version }}/${{ inputs.board }}
26 changes: 14 additions & 12 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ jobs:
# Set up rclone for CDN uploads.
- uses: ./.github/actions/cdn-prepare
with:
cf-account-id: ${{ vars.S3_ACCOUNT_ID }}
cf-access-key-id: ${{ vars.S3_ACCESS_KEY_ID }}
cf-secret-access-key: ${{ secrets.S3_SECRET_ACCESS_KEY }}
bunny-ssh-knownhosts: ${{ vars.BUNNY_SSH_KNOWNHOSTS }}

# Upload firmware to CDN.
- uses: ./.github/actions/cdn-upload-firmware
with:
cf-bucket: ${{ vars.S3_BUCKET }}
bunny-stor-hostname: ${{ vars.BUNNY_STOR_HOSTNAME }}
bunny-stor-username: ${{ secrets.BUNNY_STOR_USERNAME }}
bunny-stor-password: ${{ secrets.BUNNY_STOR_PASSWORD }}
fw-version: ${{ needs.getvars.outputs.version }}
board: ${{ matrix.board }}

Expand All @@ -140,14 +140,14 @@ jobs:
# Set up rclone for CDN uploads.
- uses: ./.github/actions/cdn-prepare
with:
cf-account-id: ${{ vars.S3_ACCOUNT_ID }}
cf-access-key-id: ${{ vars.S3_ACCESS_KEY_ID }}
cf-secret-access-key: ${{ secrets.S3_SECRET_ACCESS_KEY }}
bunny-ssh-knownhosts: ${{ vars.BUNNY_SSH_KNOWNHOSTS }}

# Upload firmware to CDN.
- uses: ./.github/actions/cdn-upload-version-info
with:
cf-bucket: ${{ vars.S3_BUCKET }}
bunny-stor-hostname: ${{ vars.BUNNY_STOR_HOSTNAME }}
bunny-stor-username: ${{ secrets.BUNNY_STOR_USERNAME }}
bunny-stor-password: ${{ secrets.BUNNY_STOR_PASSWORD }}
fw-version: ${{ needs.getvars.outputs.version }}
release-channel: ${{ needs.getvars.outputs.release-channel }}
boards: ${{ needs.getvars.outputs.board-list }}
Expand All @@ -166,14 +166,16 @@ jobs:
# Set up rclone for CDN uploads.
- uses: ./.github/actions/cdn-prepare
with:
cf-account-id: ${{ vars.S3_ACCOUNT_ID }}
cf-access-key-id: ${{ vars.S3_ACCESS_KEY_ID }}
cf-secret-access-key: ${{ secrets.S3_SECRET_ACCESS_KEY }}
bunny-ssh-knownhosts: ${{ vars.BUNNY_SSH_KNOWNHOSTS }}

# Upload firmware to CDN.
- uses: ./.github/actions/cdn-bump-version
with:
cf-bucket: ${{ vars.S3_BUCKET }}
bunny-stor-hostname: ${{ vars.BUNNY_STOR_HOSTNAME }}
bunny-stor-username: ${{ secrets.BUNNY_STOR_USERNAME }}
bunny-stor-password: ${{ secrets.BUNNY_STOR_PASSWORD }}
bunny-api-key: ${{ secrets.BUNNY_APIKEY }}
bunny-cdn-url: ${{ vars.BUNNY_CDN_URL }}
version: ${{ needs.getvars.outputs.version }}
release-channel: ${{ needs.getvars.outputs.release-channel }}

Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# Version 1.4.0 Release Notes

This release is packed with bugfixes, optimizations, code cleanup, prepwork for ESP-IDF, and some features!

## Highlights

- Add support for configuring hostname of ESP via Serial.
- Add support for configuring Emergency Stop via Captive Portal and Serial.
- Report available GPIO pins to Captive Portal Frontend.
- Massively refactor serial command handler.

## Optimizations

- Bump platform-espressif32 to version 6.9.
- Start using C++17 features including std::string_view.
- Clean up platformio.ini file.
- Lots of miscellanious code cleanup.
- Implement custom zero-copy type conversion methods with better error checking.
- Reduce log spam by the arduino library.
- Improve error handling of gpio pin selection.
- Attempt to make more sense out of the 998DR protocol serializer.

# Version 1.4.0-rc.2 Release Notes

Fixed EStop debouncing logic.
Expand Down
24 changes: 12 additions & 12 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,34 @@
"test:unit": "vitest"
},
"devDependencies": {
"@floating-ui/dom": "1.6.11",
"@playwright/test": "1.48.1",
"@skeletonlabs/skeleton": "2.10.2",
"@floating-ui/dom": "1.6.12",
"@playwright/test": "1.48.2",
"@skeletonlabs/skeleton": "2.10.3",
"@skeletonlabs/tw-plugin": "0.4.0",
"@sveltejs/adapter-static": "^3.0.5",
"@sveltejs/kit": "2.7.2",
"@sveltejs/adapter-static": "^3.0.6",
"@sveltejs/kit": "2.8.0",
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@tailwindcss/forms": "0.5.9",
"@tailwindcss/typography": "0.5.15",
"@types/node": "22.7.7",
"@types/node": "22.9.0",
"autoprefixer": "10.4.20",
"eslint": "^9.13.0",
"eslint": "^9.14.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-svelte": "2.46.0",
"flatbuffers": "24.3.25",
"postcss": "8.4.47",
"postcss": "8.4.48",
"prettier": "3.3.3",
"prettier-plugin-svelte": "3.2.7",
"svelte": "4.2.19",
"svelte-check": "4.0.5",
"svelte-check": "4.0.6",
"tailwindcss": "3.4.14",
"tslib": "2.8.0",
"tslib": "2.8.1",
"typescript": "5.6.3",
"vite-plugin-tailwind-purgecss": "^0.3.3",
"vitest": "2.1.3"
"vitest": "2.1.4"
},
"dependencies": {
"vite": "^5.4.9"
"vite": "^5.4.10"
},
"engines": {
"node": ">=20.18",
Expand Down
Loading

0 comments on commit e12786f

Please sign in to comment.