-
Notifications
You must be signed in to change notification settings - Fork 0
Initial Demo #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial Demo #1
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,95 @@ | ||||||
| name: Build and Release | ||||||
|
|
||||||
| on: | ||||||
| push: | ||||||
| tags: | ||||||
| - 'v*.*.*' | ||||||
|
|
||||||
| permissions: | ||||||
| contents: write | ||||||
|
|
||||||
| jobs: | ||||||
| build-and-release: | ||||||
| runs-on: ubuntu-latest | ||||||
|
|
||||||
| steps: | ||||||
| - name: Checkout code | ||||||
| uses: actions/checkout@v4 | ||||||
| with: | ||||||
| fetch-depth: 0 # Full history for changelog | ||||||
|
|
||||||
| - name: Validate tag format | ||||||
| run: | | ||||||
| TAG="${GITHUB_REF#refs/tags/}" | ||||||
| if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?$ ]]; then | ||||||
| echo "ERROR: Tag must match semantic version format (v1.2.3)" | ||||||
|
||||||
| echo "ERROR: Tag must match semantic version format (v1.2.3)" | |
| echo "ERROR: Tag must match semantic version format (v1.2.3 or v1.2.3-prerelease)" |
Copilot
AI
Jan 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow uses hardcoded paths like "${{ github.workspace }}/bin/arduino-cli" throughout steps 42-46. This path reference is correct, but the pattern is inconsistent with step 38 which uses "$PWD/bin". Consider using "${{ github.workspace }}/bin" consistently in step 38 as well for clarity and maintainability.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| name: Compile Test | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main, develop ] | ||
| pull_request: | ||
| branches: [ main ] | ||
|
|
||
| jobs: | ||
| compile-check: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install arduino-cli | ||
| run: | | ||
| curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh | ||
| echo "$PWD/bin" >> $GITHUB_PATH | ||
|
|
||
| - name: Install ESP32 platform | ||
| run: | | ||
| ${{ github.workspace }}/bin/arduino-cli config init | ||
| ${{ github.workspace }}/bin/arduino-cli config add board_manager.additional_urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json | ||
| ${{ github.workspace }}/bin/arduino-cli core update-index | ||
| ${{ github.workspace }}/bin/arduino-cli core install esp32:esp32 | ||
| ${{ github.workspace }}/bin/arduino-cli lib install "LiquidCrystal" | ||
|
Comment on lines
+16
to
+27
|
||
|
|
||
| - name: Compile SledController | ||
| run: | | ||
| ${{ github.workspace }}/bin/arduino-cli compile --fqbn esp32:esp32:esp32 arduino/SledController | ||
|
|
||
| - name: Compile JudgeController | ||
| run: | | ||
| ${{ github.workspace }}/bin/arduino-cli compile --fqbn esp32:esp32:esp32 arduino/JudgeController | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,3 +50,7 @@ Thumbs.db | |
| *.bak | ||
| *.swp | ||
| *~ | ||
|
|
||
| # Release artifacts | ||
| release/ | ||
| *.zip | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -7,7 +7,21 @@ | |||||||||||||||||||||
| set -e | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||||||||||||||||||||||
| VERSION="${1:-$(date +%Y.%m.%d)}" | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Version handling with validation | ||||||||||||||||||||||
| if [ -n "$1" ]; then | ||||||||||||||||||||||
| VERSION="$1" | ||||||||||||||||||||||
| # Validate semantic version format (v1.2.3) or date format (YYYY.MM.DD) | ||||||||||||||||||||||
| if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?$ ]] && \ | ||||||||||||||||||||||
| [[ ! "$VERSION" =~ ^[0-9]{4}\.[0-9]{2}\.[0-9]{2}$ ]]; then | ||||||||||||||||||||||
| echo "ERROR: Invalid version format: $VERSION" | ||||||||||||||||||||||
| echo "Expected: v1.2.3, v1.2.3-beta, or YYYY.MM.DD" | ||||||||||||||||||||||
|
Comment on lines
+14
to
+18
|
||||||||||||||||||||||
| # Validate semantic version format (v1.2.3) or date format (YYYY.MM.DD) | |
| if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?$ ]] && \ | |
| [[ ! "$VERSION" =~ ^[0-9]{4}\.[0-9]{2}\.[0-9]{2}$ ]]; then | |
| echo "ERROR: Invalid version format: $VERSION" | |
| echo "Expected: v1.2.3, v1.2.3-beta, or YYYY.MM.DD" | |
| # Validate semantic version format (v1.2.3, v1.2.3-beta.1, etc.) or date format (YYYY.MM.DD) | |
| if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*)?$ ]] && \ | |
| [[ ! "$VERSION" =~ ^[0-9]{4}\.[0-9]{2}\.[0-9]{2}$ ]]; then | |
| echo "ERROR: Invalid version format: $VERSION" | |
| echo "Expected: v1.2.3, v1.2.3-beta, v1.2.3-beta.1, or YYYY.MM.DD" |
Copilot
AI
Jan 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded firmware version "v1.0.0" in the README template doesn't match the actual FIRMWARE_DISPLAY_VERSION defined in the Arduino controller files, which is also "v1.0.0". While currently matching, this creates a maintenance burden as it needs to be manually kept in sync. Consider reading the firmware version from the source files or documenting that this needs to be updated when the firmware version changes.
| Firmware: v1.0.0 | |
| Firmware: $VERSION |
Uh oh!
There was an error while loading. Please reload this page.