Skip to content

Commit

Permalink
testing changes
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed Apr 22, 2024
1 parent b1250ef commit 2b4ee85
Show file tree
Hide file tree
Showing 11 changed files with 804 additions and 0 deletions.
125 changes: 125 additions & 0 deletions .github/workflows/build_android_signed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: build_android_signed

on:
push:
branches:
- "2.5-evo"
- "dev-release"
- "release"
paths-ignore:
- '**.md'
- '**.asciidoc'
- '**.adoc'
- '.gitignore'
- 'LICENSE'

defaults:
run:
shell: bash

env:
SOURCE_DIR: ${{ github.workspace }}
QT_VERSION: 5.15.2
BUILD_TYPE: ${{ fromJSON('["DailyBuild", "StableBuild"]')[ github.ref_type == 'tag' || contains(github.ref, 'Stable_' ) ] }}

jobs:
build:
runs-on: ubuntu-20.04

strategy:
matrix:
include:
- architecture: armv7
eabi: armeabi-v7a
ARTIFACT: QOpenHD_armv7.aab
- architecture: armv8
eabi: arm64-v8a
ARTIFACT: QOpenHD_armv8.aab

steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: recursive

- name: fix ci
run: sudo apt-mark hold grub-efi-amd64-signed

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
host: linux
target: android
dir: ${{ runner.temp }}
modules: qtcharts
setup-python: true

- name: Install Android NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r21e
add-to-path: false

- name: Install ccache
run: sudo apt-get install ccache

- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ runner.os }}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: ${{ runner.os }}-ccache-

- name: Setup ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 5" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: Create build directory
run: mkdir ${{ runner.temp }}/shadow_build_dir

- name: Install gstreamer
working-directory: ${{ github.workspace }}
run: |
cd lib/gstreamer_prebuilts/
./fetch_extract_locally.sh
- name: Build
working-directory: ${{ runner.temp }}/shadow_build_dir
env:
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
ANDROID_NDK_LATEST_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
ANDROID_NDK: ${{ steps.setup-ndk.outputs.ndk-path }}
run: |
qmake ${SOURCE_DIR}/QOpenHD.pro -spec android-clang CONFIG+=installer ANDROID_ABIS="${{ matrix.eabi }}" BUILD_TYPE=Release
make -j$(($(nproc)/2)) qmake_all
make -j12
make install INSTALL_ROOT=android
androiddeployqt --output android --verbose --input android-QOpenHD-deployment-settings.json --android-platform android-33 --gradle --aab --release --sign ${SOURCE_DIR}/android/qopenhd_key.jks key0 --storepass '${{ secrets.ANDROID_KEYSTORE_PASSWORD }}'
zip -r file.zip .
- name: ccache post-run
run: ccache -s

- name: Save artifact
uses: actions/upload-artifact@master
with:
name: ${{ matrix.ARTIFACT }}
path: ${{ runner.temp }}/shadow_build_dir/android/build/outputs/bundle/release/*.aab

113 changes: 113 additions & 0 deletions .github/workflows/build_android_unsigned.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: build_android_unsigned

on: [push]


defaults:
run:
shell: bash

env:
SOURCE_DIR: ${{ github.workspace }}
QT_VERSION: 5.15.2
BUILD_TYPE: ${{ fromJSON('["DailyBuild", "StableBuild"]')[ github.ref_type == 'tag' || contains(github.ref, 'Stable_' ) ] }}

jobs:
build:
runs-on: ubuntu-20.04

strategy:
matrix:
include:
- architecture: armv7
eabi: armeabi-v7a
ARTIFACT: QOpenHD_armv7.apk
- architecture: armv8
eabi: arm64-v8a
ARTIFACT: QOpenHD_armv8.apk

steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: recursive

- name: fix ci
run: sudo apt-mark hold grub-efi-amd64-signed

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
host: linux
target: android
dir: ${{ runner.temp }}
modules: qtcharts
setup-python: true

- name: Install Android NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r21e
add-to-path: false

- name: Install ccache
run: sudo apt-get install ccache

- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ runner.os }}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
restore-keys: ${{ runner.os }}-ccache-

- name: Setup ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 5" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: Create build directory
run: mkdir ${{ runner.temp }}/shadow_build_dir

- name: Install gstreamer
working-directory: ${{ github.workspace }}
run: |
cd lib/gstreamer_prebuilts/
./fetch_extract_locally.sh
- name: Build
working-directory: ${{ runner.temp }}/shadow_build_dir
env:
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
ANDROID_NDK_LATEST_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
ANDROID_NDK: ${{ steps.setup-ndk.outputs.ndk-path }}
run: |
qmake ${SOURCE_DIR}/QOpenHD.pro -spec android-clang CONFIG+=installer ANDROID_ABIS="${{ matrix.eabi }}"
make -j$(($(nproc)/2)) qmake_all
make -j12
make install INSTALL_ROOT=android
androiddeployqt --output android --verbose --input android-QOpenHD-deployment-settings.json --android-platform android-33 --gradle
- name: ccache post-run
run: ccache -s

- name: Save artifact
uses: actions/upload-artifact@master
with:
name: ${{ matrix.ARTIFACT }}
path: ${{ runner.temp }}/shadow_build_dir/android/build/outputs/apk/debug/*.apk

46 changes: 46 additions & 0 deletions .github/workflows/build_package_Rock5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: build_package_rock5_debian

on:
push:
branches:
- "2.5-evo"
- "dev-release"
- "release"
- "experiments"

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: Add environment variables
run: |
echo "DT=$(date +'%Y-%m-%d_%H%M')" >> $GITHUB_ENV
echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
sudo apt install git -y
- name: Checkout repository and submodules
uses: actions/checkout@v3
with:
submodules: recursive

- name: Build Package
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/
sudo apt update
sudo bash install_dep.sh
sudo bash build.sh rock5-debian $API_KEY
87 changes: 87 additions & 0 deletions .github/workflows/build_package_rpi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: build_package_rpi

on:
push:
branches:
- "2.5-evo"
- "dev-release"
- "release"

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build:
runs-on: ubuntu-latest
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'

- uses: actions/checkout@v2
with:
submodules: recursive

- name: Emulating Raspberry Pi 4
id: qemu
uses: pguyot/[email protected]
with:
base_image: https://fra1.digitaloceanspaces.com/openhd-images/BaseImages/OpenHD-image-2022-05-28_1033.zip
copy_repository_path: /opt
copy_artifact_path: QOpenHD
import_github_env: true
cpu: cortex-a53
commands: |
rm -Rf /etc/apt/sources.list.d/openhd*
apt update
apt upgrade -y
apt install -y curl
apt-get clean
rm -rf /var/lib/apt/lists/*
sudo chown -R root:root /opt/QOpenHD
ls -a
cd QOpenHD
sudo ./install_build_dep.sh rpi custom
sudo ./package.sh armhf raspbian bullseye
ls -a
- name: Upload to Github
uses: 'actions/upload-artifact@v2'
with:
name: "QOpenHd"
path: |
QOpenHD/*.deb
- name: Push
id: push
uses: cloudsmith-io/action@master
with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
command: "push"
format: "deb"
owner: "openhd"
repo: ${{ github.ref_name }}
distro: "raspbian"
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: |
# cd OpenHD/build
# sudo cmake --install .
#- name: Build ninja
# run: |
# sudo apt -y install ninja-build
# cd OpenHD
# ./build_cmake.sh
Loading

0 comments on commit 2b4ee85

Please sign in to comment.