From 11ff2692d86089ed15d4944ff3fafc7c30136b22 Mon Sep 17 00:00:00 2001 From: Vladimir Dubrovin <3proxy@3proxy.ru> Date: Mon, 6 Apr 2026 18:53:11 +0300 Subject: [PATCH] Add arm32 rpm build --- .github/workflows/build-rpm-armhf.yml | 60 ++++++++++++++++++++++++++ .github/workflows/build-rpm-x86-64.yml | 8 +--- 2 files changed, 62 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/build-rpm-armhf.yml diff --git a/.github/workflows/build-rpm-armhf.yml b/.github/workflows/build-rpm-armhf.yml new file mode 100644 index 0000000..f8936ff --- /dev/null +++ b/.github/workflows/build-rpm-armhf.yml @@ -0,0 +1,60 @@ +name: RPM build x86-64 + +on: + push: + branches: [ "master" ] + paths: [ 'RELEASE', '.github/workflows/build-rpm-armhf.yml' ] + +jobs: + ci: + name: "${{ matrix.target }}" + strategy: + matrix: + target: + - ubuntu-latest + runs-on: ${{ matrix.target }} + steps: + - uses: actions/checkout@v4 + - name: env + run: | + pwd + echo "RELEASE=$(cat RELEASE)" >> $GITHUB_ENV + echo "VERSION=$(date +%y%m%d%H%M%S)" >> $GITHUB_ENV + echo "MAJOR=$(cat RELEASE | cut -d "-" -f 1)" >> $GITHUB_ENV + echo "SUBMAJOR=$(cat RELEASE | cut -d "-" -f 2)" >> $GITHUB_ENV + echo "MINOR=$(cat RELEASE | cut -d "-" -f 3)" >> $GITHUB_ENV + - name: echo env + run: echo "release $RELEASE version $VERSION major $MAJOR submajor $SUBMAJOR minor $MINOR" + - name: Linux libraries + run: | + sudo apt update + sudo dpkg --add-architecture armhf + echo "Types: deb" >~/armhf.sources + echo "URIs: http://ports.ubuntu.com/ubuntu-ports/" >>~/armhf.sources + echo "Suites: noble noble-updates noble-security" >>~/armhf.sources + echo "Components: main restricted universe multiverse" >>~/armhf.sources + echo "Architectures: armhf" >>~/armhf.sources + echo "Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg" >>~/armhf.sources + sudo cp ~/armhf.sources /etc/apt/sources.list.d/armhf.sources + sudo apt update + sudo apt install libssl-dev:armhf libpam-dev:armhf libpcre2-dev:armhfv rpm + - name: make rpmbuild dir + run: mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} + - name: configure rpm env + run: | + tar -czf ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz --transform "s,^,3proxy-$RELEASE/," . + ln -s ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/rpmbuild/SOURCES/$RELEASE.tar.gz + cp scripts/rh/3proxy.spec ~/rpmbuild/SPECS/3proxy-$RELEASE.spec + - name: rpmbuild + run: | + ret=`pwd` + cd ~/rpmbuild/SPECS + rpmbuild -ba --define "_arch arm" --define "cross yes" --target=arm-linux-gnueabi 3proxy-$RELEASE.spec + cd $ret + mv ~/rpmbuild/RPMS/arm/3proxy-$RELEASE-1.arm.rpm ../3proxy-$RELEASE.arm.rpm + - name: Get artifact + uses: actions/upload-artifact@v4 + with: + name: "3proxy-${{ env.RELEASE }}-arm.rpm" + path: "*.rpm" + diff --git a/.github/workflows/build-rpm-x86-64.yml b/.github/workflows/build-rpm-x86-64.yml index a6009b5..8bd08d5 100644 --- a/.github/workflows/build-rpm-x86-64.yml +++ b/.github/workflows/build-rpm-x86-64.yml @@ -39,17 +39,13 @@ jobs: - name: rpmbuild run: | ret=`pwd` - mkdir ~/tmp - cd ~/tmp - TEMP=`pwd` - TMP=`pwd` cd ~/rpmbuild/SPECS - rpmbuild --define "devel_version $VERSION" --define "version $VERSION" --define "name 3proxy" -ba 3proxy-$RELEASE.spec + rpmbuild -ba 3proxy-$RELEASE.spec cd $ret mv ~/rpmbuild/RPMS/x86_64/3proxy-$RELEASE-1.x86_64.rpm ../3proxy-$RELEASE.x86_64.rpm - name: Get artifact uses: actions/upload-artifact@v4 with: - name: "3proxy-${{ env.RELEASE }}-rpm" + name: "3proxy-${{ env.RELEASE }}-x86_64.rpm" path: "*.rpm"