forked from RinCat/RTL88x2BU-Linux-Driver
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
917657c
commit a9c9614
Showing
2 changed files
with
92 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,45 @@ | ||
name: Build test | ||
name: build on x86 lunar | ||
|
||
on: [push] | ||
|
||
env: | ||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | ||
BUILD_TYPE: Release | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
#runs-on: ubuntu-18.04 | ||
runs-on: ubuntu-22.04 | ||
env: | ||
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- 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 | ||
- name: build on x86 | ||
run: | | ||
ls -a /usr/src/ | ||
sudo apt update | ||
sudo apt install -y build-essential | ||
make KSRC=/usr/src/linux-headers-6.5.0-1016-azure O="" modules | ||
ls | ||
cd /opt/ChrootCompilationTest/ | ||
sudo apt update | ||
sudo bash install_dep.sh | ||
sudo bash ./build.sh x86-lunar $API_KEY ubuntu lunar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/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} | ||
|
||
if [[ -e /etc/os-release && $(grep -c "Raspbian" /etc/os-release) -gt 0 ]]; then | ||
sudo pip3 install --upgrade cloudsmith-cli | ||
echo "building for the raspberry pi" | ||
sudo apt update | ||
sudo apt install -y build-essential flex bc bison dkms raspberrypi-kernel-headers | ||
echo "___________________BUILDING-DRIVER___________________" | ||
make KSRC=/usr/src/linux-headers-6.1.21-v7l+ O="" modules | ||
mkdir -p package/lib/modules/6.1.21-v7l+/kernel/drivers/net/wireless/ | ||
cp *.ko package/lib/modules/6.1.21-v7l+/kernel/drivers/net/wireless/ | ||
ls -a | ||
make clean | ||
make KSRC=/usr/src/linux-headers-6.1.21-v7+ O="" modules | ||
mkdir -p package/lib/modules/6.1.21-v7+/kernel/drivers/net/wireless/ | ||
cp *.ko package/lib/modules/6.1.21-v7+/kernel/drivers/net/wireless/ | ||
fpm -a armhf -s dir -t deb -n 88X2bu-rpi -v 2.5-evo-$(date '+%m%d%H%M') -C package -p 88X2bu-rpi.deb --before-install before-install-pi.sh --after-install after-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/raspbian/bullseye 88X2bu-rpi.deb || exit 1 | ||
else | ||
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 --after-install after-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 | ||
fi |