Skip to content
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

Update dependency vite to v6.0.2 #41

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f4c5810
Initial uwb work (#9)
jordojordo Nov 20, 2024
b08540e
Add display to calibration tag - lint (#10)
jordojordo Nov 21, 2024
45b0b5a
Initial Pi UI and Server (#11)
jordojordo Nov 21, 2024
1632f91
Fix typo
jordojordo Nov 21, 2024
ca41157
Fix pnpm setup
jordojordo Nov 21, 2024
596a240
Fix package build - fix ui destinations (#15)
jordojordo Nov 21, 2024
4d296e7
Fix UI static location - start dev loading functionality (#16)
jordojordo Nov 22, 2024
e94f543
Dynamic scaling for UI based on anchor distances (#17)
jordojordo Nov 22, 2024
215c7a5
Add lawndon-pi to tests workflow - lint UI
jordojordo Nov 22, 2024
c7da0a7
Add eslint to server - update deps - fix ui build error
jordojordo Nov 22, 2024
0e375e6
Revert "Add eslint to server - update deps - fix ui build error"
jordojordo Nov 22, 2024
db2bb16
Revert "Add lawndon-pi to tests workflow - lint UI"
jordojordo Nov 22, 2024
d2beec6
Add lawndon-pi build and package tests to test workflow - fix UI buil…
jordojordo Nov 22, 2024
14e0b36
Refactor lawndon-pi build and deployment (#22)
jordojordo Nov 23, 2024
365f81c
Fix docker build context
jordojordo Nov 23, 2024
007908a
Update docker/build-push-action action to v6 (#23)
renovate[bot] Nov 23, 2024
31b13ef
Update docker/login-action action to v3 (#24)
renovate[bot] Nov 23, 2024
916203c
Move dependencies - update test badge (#25)
jordojordo Nov 24, 2024
6fdc1b9
Bump buildx action - fix server dockerfile (#27)
jordojordo Nov 24, 2024
cdeb29b
Update dependency @vue/eslint-config-typescript to v14.1.4 (#28)
renovate[bot] Nov 25, 2024
5560406
Update dependency vue-router to v4.5.0 (#29)
renovate[bot] Nov 25, 2024
c2eed37
Update dependency @types/node to v22.9.4 (#21)
renovate[bot] Nov 26, 2024
c80c6e6
Update dependency prettier to v3.4.0 (#30)
renovate[bot] Nov 26, 2024
25204fd
Fix prod socket and api routes for UI (#32)
jordojordo Nov 26, 2024
9f7e62c
Add apiConfig.json to ui runtime
jordojordo Nov 26, 2024
1baaee3
Add Lawndon Pi readme - Update dependencies (#39)
jordojordo Dec 1, 2024
6917b1f
Update dependency @vue/tsconfig to ^0.7.0 (#12)
renovate[bot] Dec 1, 2024
9ec61d8
Update dependency eslint to v9.16.0 (#37)
renovate[bot] Dec 1, 2024
8d7ec4c
Update dependency vite to v6 (#33)
renovate[bot] Dec 1, 2024
8467130
Update dependency @types/node to v22.10.1 (#31)
renovate[bot] Dec 1, 2024
584dad3
Update pnpm to v9.14.4 (#13)
renovate[bot] Dec 1, 2024
df11410
Update dependency globals to v15.13.0 (#40)
renovate[bot] Dec 2, 2024
b062d16
Update dependency dotenv to v16.4.6 (#42)
renovate[bot] Dec 3, 2024
a61f7f8
Update dependency vite to v6.0.2
renovate[bot] Dec 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 108 additions & 0 deletions .github/workflows/build-lawndon.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Build Lawndon

on:
workflow_dispatch:
release:
types: [released]

jobs:
build-lawndon:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Arduino cli
uses: arduino/setup-arduino-cli@v2

- name: Install libraries
run: |
arduino-cli lib install IBusBM Servo

- name: Compile Lawndon
uses: arduino/compile-sketches@v1
with:
fqbn: "arduino:avr:mega"
libraries: |
- name: IBusBM
- name: Servo
sketch-paths: |
- ./lawndon
enable-warnings-report: true
verbose: false
cli-compile-flags: |
- --export-binaries

- name: Package build
if: startsWith(github.ref, 'refs/tags/')
run: |
for dir in ./lawndon/build/*; do
if [ -d "${dir}" ]; then
tar -czvf "${dir}.tar.gz" -C "${dir}" .
fi
done

- name: Release build
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
lawndon/build/*.tar.gz

build-lawndon-pi:
runs-on: ubuntu-latest
needs: build-lawndon
env:
WORKING_DIR: ./pi
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up QEMU for multi-platform builds
uses: docker/setup-qemu-action@v3
with:
platforms: linux/amd64,linux/arm64

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: --allow-insecure-entitlement security.insecure
install: true

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push server image
uses: docker/build-push-action@v6
with:
context: ./pi
file: ./pi/Dockerfile.server
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/${{ github.repository_owner }}/lawndon-pi-server:${{ github.ref_name }}
ghcr.io/${{ github.repository_owner }}/lawndon-pi-server:${{ github.sha }}
ghcr.io/${{ github.repository_owner }}/lawndon-pi-server:latest

- name: Build and push UI image
uses: docker/build-push-action@v6
with:
context: ./pi
file: ./pi/Dockerfile.ui
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/${{ github.repository_owner }}/lawndon-pi-ui:${{ github.ref_name }}
ghcr.io/${{ github.repository_owner }}/lawndon-pi-ui:${{ github.sha }}
ghcr.io/${{ github.repository_owner }}/lawndon-pi-ui:latest
53 changes: 0 additions & 53 deletions .github/workflows/compile-lawndon.yml

This file was deleted.

106 changes: 106 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Build Tests

on:
pull_request:
branches:
- main
schedule:
- cron: "0 4 * * 4"

jobs:
build-lawndon-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Arduino cli
uses: arduino/setup-arduino-cli@v2

- name: Install libraries
run: |
arduino-cli lib install IBusBM Servo

- name: Lint project
uses: arduino/arduino-lint-action@v2
with:
path: ./lawndon
library-manager: update

- name: Compile Lawndon
uses: arduino/compile-sketches@v1
with:
fqbn: "arduino:avr:mega"
libraries: |
- name: IBusBM
- name: Servo
sketch-paths: |
- ./lawndon
enable-warnings-report: true
verbose: false
cli-compile-flags: |
- --export-binaries

build-lawndon-pi-test:
runs-on: ubuntu-latest
env:
WORKING_DIR: ./pi
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'

- name: Install dependencies for UI
working-directory: ${{ env.WORKING_DIR }}
run: |
pnpm install:ui

- name: Build UI
working-directory: ${{ env.WORKING_DIR }}
run: |
pnpm build:ui

- name: Install dependencies for Server
working-directory: ${{ env.WORKING_DIR }}
run: |
pnpm install:server

- name: Build Server
working-directory: ${{ env.WORKING_DIR }}
run: |
pnpm build:server

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: --allow-insecure-entitlement security.insecure
install: true

- name: Test Docker build for Server
uses: docker/build-push-action@v6
with:
context: ./pi
file: ./pi/Dockerfile.server
push: false
platforms: linux/arm64
tags: |
ghcr.io/${{ github.repository_owner }}/lawndon-pi-server:test

- name: Test Docker build for UI
uses: docker/build-push-action@v6
with:
context: ./pi
file: ./pi/Dockerfile.ui
push: false
platforms: linux/arm64
tags: |
ghcr.io/${{ github.repository_owner }}/lawndon-pi-ui:test
42 changes: 0 additions & 42 deletions .github/workflows/tests.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/*/node_modules
**/*/dist
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Tests](https://github.com/jordojordo/lawndon-lite/actions/workflows/tests.yml/badge.svg?event=schedule)](https://github.com/jordojordo/lawndon-lite/actions/workflows/tests.yml)
[![Build Tests](https://github.com/jordojordo/lawndon/actions/workflows/tests.yaml/badge.svg?event=schedule)](https://github.com/jordojordo/lawndon/actions/workflows/tests.yaml)

# Lawndon Lite

Expand Down
Binary file added libraries/dw1000.tar.gz
Binary file not shown.
26 changes: 26 additions & 0 deletions pi/Dockerfile.server
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Build stage
FROM node:22-alpine AS build
WORKDIR /usr/src/app

ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
ENV CONFIG_PATH=/usr/src/app/config

RUN corepack enable
COPY server/package.json server/pnpm-lock.yaml ./server/
WORKDIR /usr/src/app/server
RUN pnpm install --prod=false

COPY server ./
RUN pnpm build

# Runtime stage
FROM node:22-alpine
WORKDIR /usr/src/app

COPY --from=build /usr/src/app/server/dist ./dist
COPY --from=build /usr/src/app/server/node_modules ./node_modules
COPY config ./config

EXPOSE 5000 8080
CMD ["node", "dist/server.js"]
23 changes: 23 additions & 0 deletions pi/Dockerfile.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Build stage
FROM node:22-alpine AS build
WORKDIR /usr/src/app

ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"

RUN corepack enable
COPY ui/package.json ui/pnpm-lock.yaml ./ui/
WORKDIR /usr/src/app/ui
RUN pnpm install --prod=false

COPY ui ./
RUN pnpm build

# Runtime stage
FROM nginx:alpine

COPY --from=build /usr/src/app/ui/dist /app
COPY --from=build /usr/src/app/ui/nginx.conf /etc/nginx/nginx.conf

EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
8 changes: 8 additions & 0 deletions pi/config/anchorPositions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"anchors": ["50", "51", "52"],
"distances": {
"50-51": 5.42,
"50-52": 1.92,
"51-52": 6.21
}
}
Loading
Loading