mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-29 22:26:26 -04:00
Update build
This commit is contained in:
parent
e8a64539aa
commit
354f50b671
74
.github/workflows/build.yaml
vendored
74
.github/workflows/build.yaml
vendored
@ -53,7 +53,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
tar -xzf *.tar.gz
|
tar -xzf *.tar.gz
|
||||||
cd globalprotect-openconnect-*
|
cd globalprotect-openconnect-*
|
||||||
make deb
|
|
||||||
|
make deb BUILD_FE=0
|
||||||
- name: Install DEB package
|
- name: Install DEB package
|
||||||
run: |
|
run: |
|
||||||
cd globalprotect-openconnect-*/
|
cd globalprotect-openconnect-*/
|
||||||
@ -87,7 +88,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
tar -xzf globalprotect-openconnect-*.tar.gz
|
tar -xzf globalprotect-openconnect-*.tar.gz
|
||||||
cd globalprotect-openconnect-*/
|
cd globalprotect-openconnect-*/
|
||||||
make rpm
|
|
||||||
|
make rpm BUILD_FE=0
|
||||||
- name: Install RPM package
|
- name: Install RPM package
|
||||||
run: |
|
run: |
|
||||||
cd globalprotect-openconnect-*/
|
cd globalprotect-openconnect-*/
|
||||||
@ -106,6 +108,74 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
globalprotect-openconnect-*/.build/rpm/*.rpm
|
globalprotect-openconnect-*/.build/rpm/*.rpm
|
||||||
|
|
||||||
|
pkgbuild:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [tarball]
|
||||||
|
container:
|
||||||
|
image: yuezk/gpdev:pkgbuild
|
||||||
|
credentials:
|
||||||
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
||||||
|
steps:
|
||||||
|
- name: Download tarball
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: artifact-tarball
|
||||||
|
- name: Build PKGBUILD package
|
||||||
|
run: |
|
||||||
|
tar -xzf globalprotect-openconnect-*.tar.gz
|
||||||
|
cd globalprotect-openconnect-*/
|
||||||
|
|
||||||
|
make pkgbuild BUILD_FE=0
|
||||||
|
- name: Install PKGBUILD package
|
||||||
|
run: |
|
||||||
|
cd globalprotect-openconnect-*/
|
||||||
|
sudo pacman -U .build/pkgbuild/*.pkg.tar.zst
|
||||||
|
|
||||||
|
gpclient --version
|
||||||
|
gpservice --version
|
||||||
|
gpauth --version
|
||||||
|
gpgui-helper --version
|
||||||
|
- name: Upload PKGBUILD package
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: artifact-pkgbuild
|
||||||
|
path: |
|
||||||
|
globalprotect-openconnect-*/.build/pkgbuild/*.pkg.tar.zst
|
||||||
|
|
||||||
|
binary:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: yuezk/gpdev:main
|
||||||
|
credentials:
|
||||||
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout GlobalProtect-openconnect
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GH_PAT }}
|
||||||
|
repository: yuezk/GlobalProtect-openconnect
|
||||||
|
path: gp
|
||||||
|
- name: Build binary using OFFLINE mode
|
||||||
|
run: |
|
||||||
|
cd gp
|
||||||
|
make binary OFFLINE=1
|
||||||
|
- name: Install binary
|
||||||
|
run: |
|
||||||
|
cd gp/.build/binary/globalprotect-openconnect_*_$(uname -m)
|
||||||
|
|
||||||
|
sudo make install
|
||||||
|
gpclient --version
|
||||||
|
gpservice --version
|
||||||
|
gpauth --version
|
||||||
|
gpgui-helper --version
|
||||||
|
- name: Upload binary
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: artifact-binary
|
||||||
|
path: |
|
||||||
|
gp/.build/binary/*.bin.tar.gz
|
||||||
|
|
||||||
# Include arm64 if ref is a tag
|
# Include arm64 if ref is a tag
|
||||||
# setup-matrix:
|
# setup-matrix:
|
||||||
|
11
Makefile
11
Makefile
@ -1,4 +1,5 @@
|
|||||||
OFFLINE ?= 0
|
OFFLINE ?= 0
|
||||||
|
BUILD_FE ?= 1
|
||||||
CARGO ?= cargo
|
CARGO ?= cargo
|
||||||
|
|
||||||
VERSION = $(shell $(CARGO) metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
|
VERSION = $(shell $(CARGO) metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
|
||||||
@ -50,7 +51,9 @@ build: build-fe build-rs
|
|||||||
# Install and build the frontend
|
# Install and build the frontend
|
||||||
# If OFFLINE is set to 1, skip it
|
# If OFFLINE is set to 1, skip it
|
||||||
build-fe:
|
build-fe:
|
||||||
if [ $(OFFLINE) -eq 0 ]; then \
|
if [ $(OFFLINE) -eq 1 ] || [ $(BUILD_FE) -eq 0 ]; then \
|
||||||
|
echo "Skipping frontend build (OFFLINE=1 or BUILD_FE=0)"; \
|
||||||
|
else \
|
||||||
cd apps/gpgui-helper && pnpm install && pnpm build; \
|
cd apps/gpgui-helper && pnpm install && pnpm build; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -112,7 +115,7 @@ init-debian: clean-debian tarball
|
|||||||
mkdir -p .build/deb
|
mkdir -p .build/deb
|
||||||
cp .build/tarball/${PKG}.tar.gz .build/deb
|
cp .build/tarball/${PKG}.tar.gz .build/deb
|
||||||
|
|
||||||
tar -xzf .build/deb/${PKG}.tar.gz
|
tar -xzf .build/deb/${PKG}.tar.gz -C .build/deb
|
||||||
cd .build/deb/${PKG}
|
cd .build/deb/${PKG}
|
||||||
|
|
||||||
debmake
|
debmake
|
||||||
@ -136,7 +139,7 @@ deb: init-debian
|
|||||||
|
|
||||||
check-ppa:
|
check-ppa:
|
||||||
if [ $(OFFLINE) -eq 0 ]; then \
|
if [ $(OFFLINE) -eq 0 ]; then \
|
||||||
@echo "Error: ppa build requires offline mode (OFFLINE=1)"; \
|
echo "Error: ppa build requires offline mode (OFFLINE=1)"; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Usage: make ppa SERIES=focal OFFLINE=1 PUBLISH=1
|
# Usage: make ppa SERIES=focal OFFLINE=1 PUBLISH=1
|
||||||
@ -155,7 +158,7 @@ ppa: check-ppa init-debian
|
|||||||
if [ $(PUBLISH) -eq 1 ]; then \
|
if [ $(PUBLISH) -eq 1 ]; then \
|
||||||
dput ppa:yuezk/globalprotect-openconnect ../*.changes; \
|
dput ppa:yuezk/globalprotect-openconnect ../*.changes; \
|
||||||
else
|
else
|
||||||
@echo "Skipping ppa publish (PUBLISH=0)"
|
echo "Skipping ppa publish (PUBLISH=0)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
clean-rpm:
|
clean-rpm:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user