Skip to content

Commit

Permalink
use new chroot compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed May 17, 2024
1 parent 7da4193 commit 691036e
Show file tree
Hide file tree
Showing 10 changed files with 76 additions and 33 deletions.
57 changes: 46 additions & 11 deletions .github/workflows/build_package_Rock5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "2.5-evo"
- "dev-release"
- "release"
- "experiments"
- "rapha-dev"

jobs:
build:
Expand All @@ -24,23 +24,58 @@ jobs:
remove-android: 'true'
remove-haskell: 'true'
overprovision-lvm: 'true'
- name: Add environment variables
- name: test
run: |
echo "DT=$(date +'%Y-%m-%d_%H%M')" >> $GITHUB_ENV
echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
sudo apt install git -y
echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Checkout repository and submodules
uses: actions/checkout@v3
with:
submodules: recursive

- name: Build Package
- name: Building QOpenHD in CHROOT
run: |
git clone https://github.com/OpenHD/ChrootCompilationTest /opt/ChrootCompilationTest
git clone -b ${{ github.ref_name }} https://github.com/OpenHD/QOpenHD --recursive /opt/ChrootCompilationTest/additionalFiles
echo $CLOUDSMITH_API_KEY > /opt/ChrootCompilationTest/additionalFiles/cloudsmith_api_key.txt
cd /opt/ChrootCompilationTest/
git clone https://github.com/OpenHD/OpenHD-ChrootCompiler /opt/OpenHD-ChrootCompiler
mkdir -p /opt/OpenHD-ChrootCompiler/additionalFiles
git clone https://github.com/OpenHD/QOpenHD -b ${{ github.ref_name }} /opt/OpenHD-ChrootCompiler/additionalFiles/ --recursive
echo $CLOUDSMITH_API_KEY > /opt/OpenHD-ChrootCompiler/additionalFiles/cloudsmith_api_key.txt
echo "standard" > /opt/OpenHD-ChrootCompiler/additionalFiles/custom.txt
echo "arm64" > /opt/OpenHD-ChrootCompiler/additionalFiles/arch.txt
echo "debian" > /opt/OpenHD-ChrootCompiler/additionalFiles/distro.txt
echo "bullseye" > /opt/OpenHD-ChrootCompiler/additionalFiles/flavor.txt
echo "${{ github.ref_name }}" > /opt/OpenHD-ChrootCompiler/additionalFiles/repo.txt
cd /opt/OpenHD-ChrootCompiler/
sudo apt update
sudo bash install_dep.sh
sudo bash build.sh rock5-debian $API_KEY
sudo bash build.sh rock5b $API_KEY debian bullseye
- name: debug
run:
cp -r /opt/OpenHD-ChrootCompiler/out/* .

- name: Compose release filename
run: echo "artifact_name=QOpenHD-${{ env.DT }}" >> $GITHUB_ENV

- name: Upload to Github
uses: 'actions/upload-artifact@v4'
with:
name: "QOpenHD-${{ env.DT }}"
path: |
*.deb
- name: Push
id: push
if: github.ref_name == 'release' || github.ref_name == 'dev-release'
uses: cloudsmith-io/action@master
with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
command: "push"
format: "deb"
owner: "openhd"
repo: ${{ github.ref_name }}
distro: "debian"
release: "bullseye"
republish: "true" # needed ONLY if version is not changing
file: "*.deb"

2 changes: 1 addition & 1 deletion .github/workflows/build_package_rpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
- name: Push
id: push
if: github.ref_name == 'release' || github.ref_name == 'dev-release'
uses: cloudsmith-io/action@master
with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
Expand All @@ -74,7 +75,6 @@ jobs:
release: "bullseye"
republish: "true" # needed ONLY if version is not changing
file: "QOpenHD/*.deb"
if: ${{ github.ref != 'refs/heads/2.5-evo' }}

#- name: Install
# run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build_package_x86_jammy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
- name: Push
id: push
if: github.ref_name == 'release' || github.ref_name == 'dev-release'
uses: cloudsmith-io/action@master
with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build_package_x86_lunar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
# file: "QOpenHD/*.deb"

- name: Push
if: github.ref_name == 'release' || github.ref_name == 'dev-release'
run: |
ls -a
cloudsmith push deb -k ${{ secrets.CLOUDSMITH_API_KEY }} openhd/${{ github.ref_name }}/ubuntu/lunar QOpenHD/*.deb
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build_package_x86_noble.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,6 @@ jobs:

- name: Push
run: |
if: github.ref_name == 'release' || github.ref_name == 'dev-release'
ls -a
cloudsmith push deb -k ${{ secrets.CLOUDSMITH_API_KEY }} openhd/${{ github.ref_name }}/ubuntu/noble QOpenHD/*.deb
File renamed without changes.
File renamed without changes.
7 changes: 6 additions & 1 deletion .github/workflows/ubuntu22_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ name: ubuntu22_build_test
# NOTE: This test only checks if the code in the repository builds under ubuntu x86 (dependencies installed)
# Which is - simply put - the most basic test. If this test fails, there is something wrong with the code.

on: [push]
on:
push:
branches-ignore:
- release
- dev-release
- 2.5-evo

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/ubuntu22_build_test_qt6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ name: ubuntu22_build_test_qt6
# NOTE: This test only checks if the code in the repository builds under ubuntu x86 (dependencies installed)
# Which is - simply put - the most basic test. If this test fails, there is something wrong with the code.

on: [push]
on:
push:
branches-ignore:
- release
- dev-release
- 2.5-evo

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
Expand Down
33 changes: 14 additions & 19 deletions build_chroot.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
#!/bin/bash
#This file is the install instruction for the CHROOT build
#We're using cloudsmith-cli to upload the file in CHROOT
# This file is the install instruction for the CHROOT build
# We're using cloudsmith-cli to upload the file in CHROOT

echo "____________build like a rockSTAR___________"
sudo apt install -y python3-pip git
sudo pip3 install --upgrade cloudsmith-cli
bash install_build_dep.sh rock5
mkdir -p /usr/local/share/openhd/platform/rock/
sudo ./package.sh arm64 debian bullseye-rock5 || exit 1
mkdir -p /opt/out/
cp -v *.dep /opt/out/
echo "copied deb file"
echo "push to cloudsmith"
git describe --exact-match HEAD >/dev/null 2>&1
echo "Pushing the package to OpenHD dev-release repository"
ls -a
API_KEY=$(cat cloudsmith_api_key.txt)
cloudsmith push deb --api-key "$API_KEY" openhd/release/debian/bullseye qopenhd_rk3566*.deb || exit 1
cloudsmith push deb --api-key "$API_KEY" openhd/release/debian/bullseye qopenhd_rk3588a*.deb || exit 1
rm -Rf qopenhd_rk3588a*.deb
cloudsmith push deb --api-key "$API_KEY" openhd/release/debian/bullseye qopenhd_rk3588*.deb || exit 1
DISTRO=$(cat distro.txt)
FLAVOR=$(cat flavor.txt)
REPO=$(cat repo.txt)
CUSTOM=$(cat custom.txt)
ARCH=$(cat arch.txt)

echo ${DISTRO}
echo ${FLAVOR}
echo ${CUSTOM}
echo ${ARCH}

bash install_build_dep.sh rock5
sudo ./package.sh ${CUSTOM} ${ARCH} ${DISTRO} ${FLAVOR} || exit 1

0 comments on commit 691036e

Please sign in to comment.