Skip to content

Commit

Permalink
bu test
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed Jan 9, 2024
1 parent 7a54b83 commit 7bea01e
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 6 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build_for_x86.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: build on x86 lunar

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/rtl88x2bu -b ${{ github.ref_name }} /opt/ChrootCompilationTest/additionalFiles/ --recursive
echo $CLOUDSMITH_API_KEY > /opt/ChrootCompilationTest/additionalFiles/cloudsmith_api_key.txt
echo "AMD64" > /opt/ChrootCompilationTest/additionalFiles/arch.txt
echo "ubuntu" > /opt/ChrootCompilationTest/additionalFiles/distro.txt
echo "lunar" > /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 x86-lunar $API_KEY ubuntu lunar
7 changes: 1 addition & 6 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,9 @@ jobs:
with:
submodules: recursive

- name: install dependencies
run: |
sudo apt install -y ruby-dev
sudo gem install fpm
- name: build on x86
run: |
sudo apt update
sudo apt install -y build-essential tree
sudo apt install -y build-essential
make
ls
2 changes: 2 additions & 0 deletions before-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
sudo rm -Rf /lib/modules/6.3.13-060313-generic/kernel/drivers/net/wireless/88X2bu.ko
35 changes: 35 additions & 0 deletions build_chroot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash
# This file is the install instruction for the CHROOT build
# We're using cloudsmith-cli to upload the file in CHROOT

sudo apt install -y python3-pip ruby ruby-dev rubygems build-essential
gem install fpm
sudo pip3 install --upgrade cloudsmith-cli --break-system-packages
ls -a
API_KEY=$(cat cloudsmith_api_key.txt)
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}


sudo apt update
sudo apt install -y build-essential flex bc bison dkms
make KSRC=/usr/src/linux-headers-6.3.13-060313-generic O="" modules
mkdir -p package/lib/modules/6.3.13-060313-generic/kernel/drivers/net/wireless/
cp *.ko package/lib/modules/6.3.13-060313-generic/kernel/drivers/net/wireless/
ls -a
fpm -a amd64 -s dir -t deb -n rtl88x2bu-x86 -v 2.5-evo-$(date '+%m%d%H%M') -C package -p rtl88x2bu-x86.deb --before-install before-install.sh

echo "copied deb file"
echo "push to cloudsmith"
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 rtl88x2bu-x86.deb || exit 1

0 comments on commit 7bea01e

Please sign in to comment.