Skip to content

Commit f8ce24b

Browse files
committed
Merge branch 'main64' into main_64
2 parents d47e647 + 8b5708b commit f8ce24b

File tree

5 files changed

+98
-21
lines changed

5 files changed

+98
-21
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: deploy-release
5+
6+
on:
7+
push:
8+
branches: [ main64 ]
9+
10+
jobs:
11+
deploy-release:
12+
strategy:
13+
max-parallel: 3
14+
matrix:
15+
device:
16+
# - type: raspberrypi3
17+
# fleet: info319/coderbot_test
18+
- type: raspberrypi3-64
19+
fleet: info319/coderbot_pi3_64_test
20+
- type: raspberrypi0-2w-64
21+
fleet: info319/coderbot_pi0w2_64_test
22+
runs-on: ubuntu-latest
23+
environment: test
24+
outputs:
25+
release_id: ${{ steps.build.outputs.release_id }}
26+
steps:
27+
- uses: actions/checkout@v3 # Checking out the repo
28+
- uses: balena-io/[email protected]
29+
id: build
30+
with:
31+
balena_token: ${{ secrets.BALENA_TOKEN }}
32+
fleet: ${{ matrix.device.fleet }}
33+
registry_secrets: ${{ secrets.GHCR_CREDS }}
34+
source: .
35+
- name: Log release ID built
36+
run: echo "Built release version ${{ steps.build.outputs.release_id }}"
37+
38+
build-balena:
39+
strategy:
40+
matrix:
41+
device:
42+
# - type: raspberrypi3
43+
# version: v5.3.21.dev
44+
# fleet: info319/coderbot_test
45+
- type: raspberrypi3-64
46+
version: 6.5.9+rev5.dev
47+
fleet: info319/coderbot_pi3_64_test
48+
- type: raspberrypi0-2w-64
49+
version: 6.5.9+rev5.dev
50+
fleet: info319/coderbot_pi0w2_64_test
51+
env:
52+
IMAGE_NAME: coderbot_${{ matrix.device.type }}.img
53+
DEVICE_TYPE: ${{ matrix.device.type }}
54+
DEVICE_VERSION: ${{ matrix.device.version }}
55+
BALENA_FLEET: ${{ matrix.device.fleet }}
56+
needs: deploy-release
57+
runs-on: ubuntu-latest
58+
environment: test
59+
steps:
60+
- uses: actions/checkout@v3 # Checking out the repo
61+
- run: wget https://github.com/balena-io/balena-cli/releases/download/v18.0.0/balena-cli-v18.0.0-linux-x64-standalone.zip -O balena-cli-v14.4.1-linux-x64-standalone.zip
62+
- run: unzip balena-cli-v14.4.1-linux-x64-standalone.zip
63+
- run: export PATH=$PATH:$(pwd)/balena-cli
64+
- run: ./balena-cli/balena --version
65+
- run: ./balena-cli/balena login --token ${{ secrets.BALENA_TOKEN }}
66+
- run: ./balena-cli/balena os download $DEVICE_TYPE --version $DEVICE_VERSION --output $IMAGE_NAME
67+
- run: sudo mkdir /mnt/resin-boot
68+
- run: sudo mount -o loop,offset=$(( 512 * 8192)) $IMAGE_NAME /mnt/resin-boot
69+
- run: sudo cp rpi/config.txt /mnt/resin-boot
70+
- run: sudo umount /mnt/resin-boot
71+
- run: ./balena-cli/balena config generate --version $DEVICE_VERSION --deviceType $DEVICE_TYPE --fleet $BALENA_FLEET --network ethernet --appUpdatePollInterval 10 --dev -o config.json
72+
- run: ./balena-cli/balena os configure $IMAGE_NAME --fleet $BALENA_FLEET --config config.json --config-network ethernet
73+
- run: sudo ./balena-cli/balena config write --drive $IMAGE_NAME hostname coderbot
74+
- run: echo "RELEASE_COMMIT=current" >> $GITHUB_ENV #echo "RELEASE_COMMIT=$(./balena-cli/balena release ${{ needs.deploy-release.outputs.release_id }}|grep 'COMMIT'|awk '{print $2}')" >> $GITHUB_ENV
75+
- run: ./balena-cli/balena preload $IMAGE_NAME --fleet $BALENA_FLEET -c $RELEASE_COMMIT
76+
- run: mkdir -p dist
77+
- run: mv $IMAGE_NAME ./dist/.
78+
- name: Archive dist
79+
uses: actions/upload-artifact@v3
80+
with:
81+
name: image-preloaded
82+
path: dist

.github/workflows/deploy-release-test.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
max-parallel: 3
1414
matrix:
1515
device:
16-
# - type: raspberrypi3
17-
# fleet: info319/coderbot_test
18-
- type: raspberrypi3-64
19-
fleet: info319/coderbot_pi3_64_test
20-
- type: raspberrypi0-2w-64
21-
fleet: info319/coderbot_pi0w2_64_test
16+
- type: raspberrypi3
17+
fleet: info319/coderbot_test
18+
# - type: raspberrypi3-64
19+
# fleet: info319/coderbot_pi3_64_test
20+
# - type: raspberrypi0-2w-64
21+
# fleet: info319/coderbot_pi0w2_64_test
2222
runs-on: ubuntu-latest
2323
environment: test
2424
outputs:
@@ -42,12 +42,12 @@ jobs:
4242
- type: raspberrypi3
4343
version: v5.3.21.dev
4444
fleet: info319/coderbot_test
45-
- type: raspberrypi3-64
46-
version: v5.0.8.dev
47-
fleet: info319/coderbot_pi3_64_test
48-
- type: raspberrypi0-2w-64
49-
version: v5.3.21.dev
50-
fleet: info319/coderbot_pi0w2_64_test
45+
# - type: raspberrypi3-64
46+
# version: 6.5.9+rev5.dev
47+
# fleet: info319/coderbot_pi3_64_test
48+
# - type: raspberrypi0-2w-64
49+
# version: 6.5.9+rev5.dev
50+
# fleet: info319/coderbot_pi0w2_64_test
5151
env:
5252
IMAGE_NAME: coderbot_${{ matrix.device.type }}.img
5353
DEVICE_TYPE: ${{ matrix.device.type }}

balena.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: CoderBot
22
type: sw.application
3-
version: "0.0.9"
3+
version: "0.0.12"
44
description: >-
55
CoderBot is an educational robot developed by Università di Milano - Bicocca.
66
fleetcta: CoderBot is an educational robot

docker-compose.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@ version: '2'
22
services:
33
frontend:
44
image: ghcr.io/coderbotorg/frontend:latest-arm64
5-
platform: linux/arm64
65
restart: unless-stopped
76
network_mode: host
87
privileged: true
98

109
backend:
11-
image: ghcr.io/coderbotorg/backend:git-c2ccffa-arm64
12-
platform: linux/arm64
10+
image: ghcr.io/coderbotorg/backend:git-84b098d-arm64
1311
restart: unless-stopped
1412
network_mode: host
1513
privileged: true
@@ -23,7 +21,6 @@ services:
2321

2422
wifi-py:
2523
image: ghcr.io/coderbotorg/python-wifi-connect:0.0.16
26-
platform: linux/arm64
2724
restart: unless-stopped
2825
network_mode: host
2926
privileged: true
@@ -43,7 +40,6 @@ services:
4340

4441
pigpio:
4542
image: coderbot/alpine-pigpiod:pigpio-v79
46-
platform: linux/arm64
4743
restart: unless-stopped
4844
network_mode: host
4945
privileged: true

rpi/config.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@
466466
##
467467
## Default 0
468468
##
469-
start_x=0
469+
start_x=1
470470

471471
## disable_camera_led
472472
## Turn off the red camera led when recording video or taking a still
@@ -1191,5 +1191,4 @@ dtparam=spi=on
11911191
disable_splash=1
11921192
avoid_warnings=1
11931193
dtparam=audio=on
1194-
#arm_freq=1000
1195-
camera_auto_detect=1
1194+
arm_freq=1000

0 commit comments

Comments
 (0)