Skip to content

Commit 4d34799

Browse files
authored
Merge branch 'main' into enh-clone
2 parents fcbf474 + 38e3567 commit 4d34799

240 files changed

Lines changed: 94839 additions & 19582 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build_client.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,18 @@ jobs:
3535
runs-on: ${{ matrix.os }}
3636
steps:
3737
- name: Check out the repo
38-
uses: actions/checkout@v3
38+
uses: actions/checkout@v4
3939
with:
4040
ref: ${{ inputs.checkout-sha == null && github.sha || inputs.checkout-sha }}
41+
- name: Set up Python
42+
uses: actions/setup-python@v5
43+
with:
44+
python-version: '3.12'
4145
- name: Install PyInstaller and client dependencies
4246
run: |
43-
pip3 install pyinstaller
44-
pip3 install -r software/script/requirements.txt
47+
python -m pip install --upgrade pip
48+
pip install pyinstaller
49+
pip install -r software/script/requirements.txt
4550
- name: Run OS specific setup
4651
run: ${{ matrix.pre_command }}
4752
- name: Compile native code
@@ -56,14 +61,14 @@ jobs:
5661
cd software
5762
pyinstaller pyinstaller.spec
5863
- name: Upload built client
59-
uses: actions/upload-artifact@v3
64+
uses: actions/upload-artifact@v4
6065
with:
6166
name: client-${{ matrix.name }}
6267
path: software/dist/*
6368
- name: Zip up client for release
6469
run: ${{ matrix.bundle_command }}
6570
- name: Upload release artifacts
66-
uses: actions/upload-artifact@v3
71+
uses: actions/upload-artifact@v4
6772
with:
68-
name: release-artifacts
73+
name: release-artifacts-${{ matrix.name }}
6974
path: client-${{ matrix.name }}.zip

.github/workflows/build_firmware.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Set up Docker Buildx
2121
uses: docker/setup-buildx-action@v2
2222
- name: Check out the repo
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2424
with:
2525
ref: ${{ inputs.checkout-sha == null && github.sha || inputs.checkout-sha }}
2626
fetch-depth: 0
@@ -54,7 +54,7 @@ jobs:
5454
device_type: [ultra, lite]
5555
steps:
5656
- name: Check out the repo
57-
uses: actions/checkout@v3
57+
uses: actions/checkout@v4
5858
with:
5959
ref: ${{ inputs.checkout-sha == null && github.sha || inputs.checkout-sha }}
6060
fetch-depth: 0
@@ -64,7 +64,7 @@ jobs:
6464
run: |
6565
docker run --rm -v ${PWD}:/workdir -e CURRENT_DEVICE_TYPE=${{ matrix.device_type }} ghcr.io/${repo,,}-fw-builder@${{ needs.build_fw_builder.outputs.image_hash }} firmware/build.sh
6666
- name: Upload built binaries
67-
uses: actions/upload-artifact@v3
67+
uses: actions/upload-artifact@v4
6868
with:
6969
name: ${{ matrix.device_type }}-firmware
7070
path: firmware/objects/*.hex
@@ -76,17 +76,17 @@ jobs:
7676
unzip firmware/objects/${{ matrix.device_type }}-dfu-app.zip -d firmware/objects/${{ matrix.device_type }}-dfu-app
7777
unzip firmware/objects/${{ matrix.device_type }}-dfu-full.zip -d firmware/objects/${{ matrix.device_type }}-dfu-full
7878
- name: Upload dfu app image
79-
uses: actions/upload-artifact@v3
79+
uses: actions/upload-artifact@v4
8080
with:
8181
name: ${{ matrix.device_type }}-dfu-app
8282
path: firmware/objects/${{ matrix.device_type }}-dfu-app/*
8383
- name: Upload dfu full image
84-
uses: actions/upload-artifact@v3
84+
uses: actions/upload-artifact@v4
8585
with:
8686
name: ${{ matrix.device_type }}-dfu-full
8787
path: firmware/objects/${{ matrix.device_type }}-dfu-full/*
8888
- name: Upload release artifacts
89-
uses: actions/upload-artifact@v3
89+
uses: actions/upload-artifact@v4
9090
with:
91-
name: release-artifacts
91+
name: release-artifacts-${{ matrix.device_type }}
9292
path: firmware/objects/*.zip
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Deploy wiki to GitHub Pages with Jekyll
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
workflow_dispatch:
7+
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
20+
jobs:
21+
# Build job
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
with:
28+
repository: ${{ github.repository }}.wiki
29+
- name: Setup Pages
30+
uses: actions/configure-pages@v5
31+
- name: Build with Jekyll
32+
uses: actions/jekyll-build-pages@v1
33+
with:
34+
source: ./
35+
destination: ./_site
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v3
38+
39+
# Deployment job
40+
deploy:
41+
environment:
42+
name: github-pages
43+
url: ${{ steps.deployment.outputs.page_url }}
44+
runs-on: ubuntu-latest
45+
needs: build
46+
steps:
47+
- name: Deploy to GitHub Pages
48+
id: deployment
49+
uses: actions/deploy-pages@v4

.github/workflows/on_pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ jobs:
1010
contents: read
1111
uses: ./.github/workflows/build_firmware.yml
1212
with:
13-
checkout-sha: "${{ github.event.pull_request.merge_commit_sha }}"
13+
checkout-sha: "${{ github.event.pull_request.head.sha }}"
1414
client_pipeline:
1515
name: Build Firmware
1616
uses: ./.github/workflows/build_client.yml
1717
with:
18-
checkout-sha: "${{ github.event.pull_request.merge_commit_sha }}"
18+
checkout-sha: "${{ github.event.pull_request.head.sha }}"
1919
comment:
2020
runs-on: ubuntu-latest
2121
name: Comment on PR

.github/workflows/on_push.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ jobs:
2424
- client_pipeline
2525
steps:
2626
- name: Check out the repo
27-
uses: actions/checkout@v3
27+
uses: actions/checkout@v4
2828
- name: Download release artifacts
29-
uses: actions/download-artifact@v3
29+
uses: actions/download-artifact@v4
3030
with:
31-
name: release-artifacts
31+
pattern: release-artifacts-*
32+
merge-multiple: true
3233
path: release-artifacts
3334
- name: Upload to dev release
3435
uses: softprops/action-gh-release@v1
@@ -60,11 +61,12 @@ jobs:
6061
- client_pipeline
6162
steps:
6263
- name: Check out the repo
63-
uses: actions/checkout@v3
64+
uses: actions/checkout@v4
6465
- name: Download release artifacts
65-
uses: actions/download-artifact@v3
66+
uses: actions/download-artifact@v4
6667
with:
67-
name: release-artifacts
68+
pattern: release-artifacts-*
69+
merge-multiple: true
6870
path: release-artifacts
6971
- name: Upload to tagged release
7072
uses: softprops/action-gh-release@v1
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Lint (pyrefly + ruff)
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "software/**"
7+
- ".github/workflows/**"
8+
workflow_dispatch:
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
defaults:
14+
run:
15+
shell: bash
16+
working-directory: software
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.13"
26+
cache: "pip"
27+
cache-dependency-path: |
28+
software/pyproject.toml
29+
software/uv.lock
30+
software/script/requirements.txt
31+
32+
- name: Set up uv
33+
uses: astral-sh/setup-uv@v6
34+
35+
- name: Install dependencies with uv (if lockfile present)
36+
if: ${{ hashFiles('software/uv.lock') != '' }}
37+
run: uv sync --dev
38+
39+
- name: Install tools with pip (fallback)
40+
if: ${{ hashFiles('software/uv.lock') == '' }}
41+
run: |
42+
python -m pip install --upgrade pip
43+
# Try project requirements if present
44+
if [ -f script/requirements.txt ]; then pip install -r script/requirements.txt || true; fi
45+
# Ensure ruff and pyrefly are available
46+
pip install ruff pyrefly
47+
48+
- name: Ruff check
49+
run: |
50+
set -e
51+
(uv run ruff --version && uv run ruff check .) || ruff check .
52+
53+
- name: Pyrefly check
54+
run: |
55+
set -e
56+
(uv run pyrefly --help >/dev/null 2>&1 && uv run pyrefly check) || pyrefly check

0 commit comments

Comments
 (0)