mirror of
https://github.com/3proxy/3proxy.git
synced 2026-04-13 00:10:11 +08:00
Update workflows and makefiles (12 commits squashed)
This commit is contained in:
parent
8d2a788c58
commit
afd71eb6a0
74
.github/workflows/build-rpm-armhf.yml
vendored
Normal file
74
.github/workflows/build-rpm-armhf.yml
vendored
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
name: RPM build arm
|
||||||
|
|
||||||
|
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" > ~/ubuntu.sources
|
||||||
|
echo "URIs: http://archive.ubuntu.com/ubuntu/" >> ~/ubuntu.sources
|
||||||
|
echo "Suites: noble noble-updates noble-backports" >> ~/ubuntu.sources
|
||||||
|
echo "Components: main restricted universe multiverse" >> ~/ubuntu.sources
|
||||||
|
echo "Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg" >> ~/ubuntu.sources
|
||||||
|
echo "Architectures: amd64" >> ~/ubuntu.sources
|
||||||
|
echo "" >> ~/ubuntu.sources
|
||||||
|
echo "Types: deb" >> ~/ubuntu.sources
|
||||||
|
echo "URIs: http://security.ubuntu.com/ubuntu/" >> ~/ubuntu.sources
|
||||||
|
echo "Suites: noble-security" >> ~/ubuntu.sources
|
||||||
|
echo "Components: main restricted universe multiverse" >> ~/ubuntu.sources
|
||||||
|
echo "Architectures: amd64" >> ~/ubuntu.sources
|
||||||
|
echo "Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg" >> ~/ubuntu.sources
|
||||||
|
echo "" >> ~/ubuntu.sources
|
||||||
|
echo "Types: deb" >>~/ubuntu.sources
|
||||||
|
echo "URIs: http://ports.ubuntu.com/ubuntu-ports/" >>~/ubuntu.sources
|
||||||
|
echo "Suites: noble noble-updates" >>~/ubuntu.sources
|
||||||
|
echo "Components: main restricted universe multiverse" >>~/ubuntu.sources
|
||||||
|
echo "Architectures: armhf" >>~/ubuntu.sources
|
||||||
|
echo "Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg" >>~/ubuntu.sources
|
||||||
|
sudo cp ~/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install libssl-dev:armhf libpam-dev:armhf libpcre2-dev:armhf rpm crossbuild-essential-armhf
|
||||||
|
- 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"
|
||||||
|
|
||||||
7
.github/workflows/build-rpm-x86-64.yml
vendored
7
.github/workflows/build-rpm-x86-64.yml
vendored
@ -40,11 +40,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
ret=`pwd`
|
ret=`pwd`
|
||||||
cd ~/rpmbuild/SPECS
|
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
|
cd $ret
|
||||||
mv ~/rpmbuild/RPMS/x86_64/3proxy-$RELEASE-1.x86_64.rpm ../3proxy-$RELEASE.x86_64.rpm
|
mv ~/rpmbuild/RPMS/x86_64/3proxy-$RELEASE-1.x86_64.rpm 3proxy-$RELEASE.x86_64.rpm
|
||||||
- name: Get artifact
|
- name: Get artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: "3proxy-${{ env.RELEASE }}-rpm"
|
name: "3proxy-${{ env.RELEASE }}-x86_64.rpm"
|
||||||
path: "*.rpm"
|
path: "*.rpm"
|
||||||
|
|
||||||
|
|||||||
4
.github/workflows/c-cpp-Linux.yml
vendored
4
.github/workflows/c-cpp-Linux.yml
vendored
@ -3,10 +3,10 @@ name: C/C++ CI Linux
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "master" ]
|
branches: [ "master" ]
|
||||||
paths: [ '**.c', '**.h', 'Makefile.**', '.github/configs', '.github/workflows/c-cpp-Linux.yml' ]
|
paths: [ '**.c', '**.h', 'Makefile.Linux', '.github/configs', '.github/workflows/c-cpp-Linux.yml' ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "master" ]
|
branches: [ "master" ]
|
||||||
paths: [ '**.c', '**.h', 'Makefile.**', '.github/configs', '.github/workflows/c-cpp-Linux.yml' ]
|
paths: [ '**.c', '**.h', 'Makefile.Linux', '.github/configs', '.github/workflows/c-cpp-Linux.yml' ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
|
|||||||
4
.github/workflows/c-cpp-MacOS.yml
vendored
4
.github/workflows/c-cpp-MacOS.yml
vendored
@ -3,10 +3,10 @@ name: C/C++ CI MacOS
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "master" ]
|
branches: [ "master" ]
|
||||||
paths: [ '**.c', '**.h', 'Makefile.**', '.github/configs', '.github/workflows/c-cpp-MacOS.yml' ]
|
paths: [ '**.c', '**.h', 'Makefile.FreeBSD', '.github/configs', '.github/workflows/c-cpp-MacOS.yml' ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "master" ]
|
branches: [ "master" ]
|
||||||
paths: [ '**.c', '**.h', 'Makefile.**', '.github/configs', '.github/workflows/c-cpp-MacOS.yml' ]
|
paths: [ '**.c', '**.h', 'Makefile.FreeBSD', '.github/configs', '.github/workflows/c-cpp-MacOS.yml' ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
|
|||||||
4
.github/workflows/c-cpp-Windows.yml
vendored
4
.github/workflows/c-cpp-Windows.yml
vendored
@ -3,10 +3,10 @@ name: C/C++ CI Windows
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "master" ]
|
branches: [ "master" ]
|
||||||
paths: [ '**.c', '**.h', 'Makefile.**', '.github/configs', '.github/workflows/c-cpp-Windows.yml' ]
|
paths: [ '**.c', '**.h', 'Makefile.msvc', '.github/configs', '.github/workflows/c-cpp-Windows.yml' ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "master" ]
|
branches: [ "master" ]
|
||||||
paths: [ '**.c', '**.h', 'Makefile.**', '.github/configs', '.github/workflows/c-cpp-Windows.yml' ]
|
paths: [ '**.c', '**.h', 'Makefile.msvc', '.github/configs', '.github/workflows/c-cpp-Windows.yml' ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
|
|||||||
4
.github/workflows/c-cpp-cmake.yml
vendored
4
.github/workflows/c-cpp-cmake.yml
vendored
@ -3,10 +3,10 @@ name: C/C++ CI cmake
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "master" ]
|
branches: [ "master" ]
|
||||||
paths: [ '**.c', '**.h', 'Makefile.**', '.github/configs', '.github/workflows/c-cpp-cmake.yml' ]
|
paths: [ '**.c', '**.h', '**.cmake', 'CMakeLists.txt', '.github/configs', '.github/workflows/c-cpp-cmake.yml' ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "master" ]
|
branches: [ "master" ]
|
||||||
paths: [ '**.c', '**.h', 'Makefile.**', '.github/configs', '.github/workflows/c-cpp-cmake.yml' ]
|
paths: [ '**.c', '**.h', '**.cmake', 'CMakeLists.txt', '.github/configs', '.github/workflows/c-cpp-cmake.yml' ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
|
|||||||
@ -99,7 +99,6 @@ install-bin:
|
|||||||
$(INSTALL_BIN) -d $(BINDIR)
|
$(INSTALL_BIN) -d $(BINDIR)
|
||||||
$(INSTALL_BIN) -s $(INSTALL_OBJS) $(BINDIR)
|
$(INSTALL_BIN) -s $(INSTALL_OBJS) $(BINDIR)
|
||||||
$(INSTALL_BIN) -s bin/*.ld.so $(CHROOTDIR)/libexec
|
$(INSTALL_BIN) -s bin/*.ld.so $(CHROOTDIR)/libexec
|
||||||
chmod -R a-w $(CHROOTDIR)/libexec
|
|
||||||
|
|
||||||
install-etc-dir:
|
install-etc-dir:
|
||||||
$(INSTALL_BIN) -d $(ETCDIR)
|
$(INSTALL_BIN) -d $(ETCDIR)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user