Skip to content

Commit

Permalink
test new gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
endail committed Jan 21, 2024
1 parent 0278f75 commit 35e4217
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/buildcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
strategy:
matrix:
base_image: ["raspios_lite:latest"]
cpu: [arm1176, cortex-a8]
cpu: [arm1176, cortex-a7, cortex-a8, cortex-a53]

steps:

Expand All @@ -49,13 +49,16 @@ jobs:
ref: ${{ github.ref }}

- name: Build RPI environment
uses: pguyot/arm-runner-action@v2
uses: pguyot/arm-runner-action@v2.5.2
with:
commands: ./gh-actions-rpi-cmd.sh
base_image: ${{ matrix.base_image }}
image_additional_mb: 10000
cpu: ${{ matrix.cpu }}
optimize_image: false
shell: /bin/bash
exit_on_fail: false
debug: true

notify_hx711-rpi-py:
runs-on: ubuntu-latest
Expand Down
12 changes: 6 additions & 6 deletions gh-actions-rpi-cmd.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

# note that this is running on a virtual rpi
export VIRTUAL_PI=1
apt-get update -y && apt-get full-upgrade -y
ldconfig
./install-deps.sh
make && make install
ldconfig
export VIRTUAL_PI=1;
apt-get update -y && apt-get full-upgrade -y;
./install-deps.sh;
make;
make install;
ldconfig;
17 changes: 9 additions & 8 deletions install-deps.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
#!/bin/bash

if [ `id -u` -ne 0 ]; then
echo "Run as root"
echo "Run as root";
exit 1;
fi

# build and install liblgpio if not found
if ! $(ldconfig -p | grep -q liblgpio); then
wget https://abyz.me.uk/lg/lg.zip
unzip lg.zip
cd lg
make
make install
cd ..
wget https://github.com/joan2937/lg/archive/master.zip;
unzip master.zip;
cd lg-master;
make;
make install;
ldconfig;
cd ..;
else
echo "liblgpio already installed"
echo "liblgpio already installed";
fi

0 comments on commit 35e4217

Please sign in to comment.