Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed Jan 27, 2024
1 parent 08dd315 commit 073b864
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build_for_pi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: build on rpi

on: [push]


jobs:
build:
#runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
env:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 512
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
overprovision-lvm: 'true'
- name: test
run: |
echo "DT=$(date +'%Y-%m-%d_%H%M')" >> $GITHUB_ENV
echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Checkout repository and submodules
uses: actions/checkout@v3
with:
submodules: recursive
- name: Building OpenHD in CHROOT
run: |
git clone https://github.com/OpenHD/ChrootCompilationTest /opt/ChrootCompilationTest
mkdir -p /opt/ChrootCompilationTest/additionalFiles
git clone https://github.com/OpenHD/rtl8812au -b ${{ github.ref_name }} /opt/ChrootCompilationTest/additionalFiles/ --recursive
echo $CLOUDSMITH_API_KEY > /opt/ChrootCompilationTest/additionalFiles/cloudsmith_api_key.txt
echo "armhf" > /opt/ChrootCompilationTest/additionalFiles/arch.txt
echo "debian" > /opt/ChrootCompilationTest/additionalFiles/distro.txt
echo "bullseye" > /opt/ChrootCompilationTest/additionalFiles/flavor.txt
echo "${{ github.ref_name }}" > /opt/ChrootCompilationTest/additionalFiles/repo.txt
cd /opt/ChrootCompilationTest/
sudo apt update
sudo bash install_dep.sh
sudo bash ./build.sh rpi-bullseye $API_KEY debian bullseye
5 changes: 5 additions & 0 deletions build_chroot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ echo ${FLAVOR}
echo ${CUSTOM}
echo ${ARCH}

if [[ $(tr -d '\0' </proc/device-tree/model) == *"Raspberry Pi"* ]]; then
echo "Running on a Raspberry Pi"
else
echo "Running on something else"

sudo apt update
sudo apt install -y build-essential flex bc bison dkms
Expand All @@ -33,3 +37,4 @@ git describe --exact-match HEAD >/dev/null 2>&1
echo "Pushing the package to OpenHD 2.5 repository"
ls -a
cloudsmith push deb --api-key "$API_KEY" openhd/release/ubuntu/lunar rtl8812au-x86.deb || exit 1
fi

0 comments on commit 073b864

Please sign in to comment.