mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-20 19:00:22 +08:00
merging version-v2 into dev
This commit is contained in:
commit
620b749e23
117
.github/workflows/Linux.yml
vendored
Normal file
117
.github/workflows/Linux.yml
vendored
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
name: Qv2ray Push Build for Linux
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
release:
|
||||||
|
types: [prereleased]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# =================================================================================== LINUX
|
||||||
|
Linux:
|
||||||
|
name: Push build for Linux
|
||||||
|
runs-on: ubuntu-16.04
|
||||||
|
steps:
|
||||||
|
- name: Checking out sources
|
||||||
|
uses: actions/checkout@master
|
||||||
|
- name: Restoring submodules
|
||||||
|
run: git submodule update --init
|
||||||
|
# --------------------------------------------------------
|
||||||
|
- name: Installing Qt
|
||||||
|
uses: jurplel/install-qt-action@v2
|
||||||
|
with:
|
||||||
|
modules: qtcharts
|
||||||
|
# --------------------------------------------------------
|
||||||
|
- name: Install Packages
|
||||||
|
run: |
|
||||||
|
sudo add-apt-repository ppa:webispy/grpc
|
||||||
|
sudo add-apt-repository ppa:carsten-uppenbrink-net/openssl
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y libgl-dev openssl libx11-dev libxkbcommon-x11-dev libgrpc++-dev libprotobuf-dev protobuf-compiler protobuf-c-compiler protobuf-compiler-grpc
|
||||||
|
# --------------------------------------------------------
|
||||||
|
- name: Extracting gRPC and protobuf libs and headers
|
||||||
|
run: tools/grpc_gen.sh
|
||||||
|
# --------------------------------------------------------
|
||||||
|
- name: Download libqvb static library.
|
||||||
|
uses: Legion2/download-release-action@v2.1.0
|
||||||
|
with:
|
||||||
|
repository: Qv2ray/QvRPCBridge
|
||||||
|
tag: 'latest'
|
||||||
|
path: libs
|
||||||
|
file: libqvb-linux64.a
|
||||||
|
# -------------------------------------------------------- libqvb build
|
||||||
|
- name: libqvb - Build Qv2ray
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
qmake .. CONFIG+=no_increase_build_number CONFIG+=with_new_backend PREFIX=/usr
|
||||||
|
make -j2
|
||||||
|
- name: libqvb - Generating filesystem structure for AppImage
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
make install INSTALL_ROOT=AppDir
|
||||||
|
cd AppDir
|
||||||
|
mkdir -p ./usr/lib/
|
||||||
|
cp /usr/lib/x86_64-linux-gnu/libssl.so.1.1 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 ./usr/lib/
|
||||||
|
- name: libqvb - Building AppImage using linuxdeployqt
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
wget https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage
|
||||||
|
chmod +x ./linuxdeployqt-6-x86_64.AppImage
|
||||||
|
./linuxdeployqt-6-x86_64.AppImage --appimage-extract
|
||||||
|
cd AppDir
|
||||||
|
../squashfs-root/AppRun usr/share/applications/qv2ray.desktop -appimage -no-strip -always-overwrite
|
||||||
|
mv ./Qv2ray*.AppImage ./Qv2ray.AppImage
|
||||||
|
- name: libqvb - Uploading artifact
|
||||||
|
uses: actions/upload-artifact@master
|
||||||
|
with:
|
||||||
|
name: Qv2ray.linux-libqvb.AppImage
|
||||||
|
path: build/AppDir/Qv2ray.AppImage
|
||||||
|
- name: libqvb - Upload binaries to release
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
uses: svenstaro/upload-release-action@v1-release
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: build/AppDir/Qv2ray.AppImage
|
||||||
|
asset_name: Qv2ray-${{ github.ref }}-linux-libqvb.AppImage
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
overwrite: true
|
||||||
|
# -------------------------------------------------------- cleanup build
|
||||||
|
- name: cleanup -- clean up build directory to build against legacy gRPC
|
||||||
|
run: rm -rvf ./build
|
||||||
|
# -------------------------------------------------------- gRPC build
|
||||||
|
- name: gRPC - Build Qv2ray
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
qmake .. CONFIG+=no_increase_build_number PREFIX=/usr
|
||||||
|
make -j2
|
||||||
|
- name: gRPC - Generating filesystem structure for AppImage
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
make install INSTALL_ROOT=AppDir
|
||||||
|
cd AppDir
|
||||||
|
mkdir -p ./usr/lib/
|
||||||
|
cp /usr/lib/x86_64-linux-gnu/libssl.so.1.1 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 ./usr/lib/
|
||||||
|
- name: gRPC - Building AppImage using linuxdeployqt
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
wget https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage
|
||||||
|
chmod +x ./linuxdeployqt-6-x86_64.AppImage
|
||||||
|
./linuxdeployqt-6-x86_64.AppImage --appimage-extract
|
||||||
|
cd AppDir
|
||||||
|
../squashfs-root/AppRun usr/share/applications/qv2ray.desktop -appimage -no-strip -always-overwrite
|
||||||
|
mv ./Qv2ray*.AppImage ./Qv2ray.AppImage
|
||||||
|
- name: gRPC - Uploading artifact
|
||||||
|
uses: actions/upload-artifact@master
|
||||||
|
with:
|
||||||
|
name: Qv2ray.linux-gRPC.AppImage
|
||||||
|
path: build/AppDir/Qv2ray.AppImage
|
||||||
|
- name: gRPC - Upload binaries to release
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
uses: svenstaro/upload-release-action@v1-release
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: build/AppDir/Qv2ray.AppImage
|
||||||
|
asset_name: Qv2ray-${{ github.ref }}-linux.gRPC.AppImage
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
overwrite: true
|
111
.github/workflows/Windows.yml
vendored
Normal file
111
.github/workflows/Windows.yml
vendored
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
name: Qv2ray Push Build for Windows
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
release:
|
||||||
|
types: [prereleased]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# ======================================================================================== WINDOWS
|
||||||
|
Windows:
|
||||||
|
name: Push build for win64
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Checking out Qv2ray sources
|
||||||
|
uses: actions/checkout@master
|
||||||
|
- name: Restoring submodules
|
||||||
|
run: git submodule update --init
|
||||||
|
# --------------------------------------------------------
|
||||||
|
- name: Installing Qt
|
||||||
|
uses: jurplel/install-qt-action@v2
|
||||||
|
with:
|
||||||
|
arch: win64_mingw73
|
||||||
|
modules: qtcharts
|
||||||
|
# --------------------------------------------------------
|
||||||
|
- name: Extracting gRPC and protobuf libs and headers
|
||||||
|
run: tools\grpc_gen.bat
|
||||||
|
# --------------------------------------------------------
|
||||||
|
- name: Download libqvb static library.
|
||||||
|
run: curl -o .\libs\libqvb-win64.a -L https://github.com/Qv2ray/QvRPCBridge/releases/download/v1.0/libqvb-win64.a
|
||||||
|
# -------------------------------------------------------- libqvb
|
||||||
|
- name: libqvb - Building Qv2ray
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
qmake .. CONFIG+=no_increase_build_number CONFIG+=with_new_backend
|
||||||
|
mingw32-make -j2
|
||||||
|
- name: libqvb - Copying DLLs to build output folders
|
||||||
|
shell: cmd
|
||||||
|
run: .github\workflows\copy_DLLs.bat
|
||||||
|
- name: libqvb - Deploy Qt
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
cd release
|
||||||
|
del *.cpp *.h *.o *.qrc *.qm
|
||||||
|
windeployqt ./qv2ray.exe --compiler-runtime
|
||||||
|
- name: libqvb - Create 7z Release
|
||||||
|
uses: DuckSoft/create-7z-action@v1.0
|
||||||
|
with:
|
||||||
|
# file/folder path to compress
|
||||||
|
pathSource: ./build/release/
|
||||||
|
# 7z archive path to write
|
||||||
|
pathTarget: ./release.7z
|
||||||
|
- name: libqvb - Uploading artifact
|
||||||
|
uses: actions/upload-artifact@master
|
||||||
|
with:
|
||||||
|
name: Qv2ray.Win64-libqvb.7z
|
||||||
|
path: release.7z
|
||||||
|
- name: libqvb - Upload binaries to release
|
||||||
|
uses: svenstaro/upload-release-action@v1-release
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: release.7z
|
||||||
|
asset_name: Qv2ray-${{ github.ref }}-win64-libqvb.7z
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
overwrite: true
|
||||||
|
# -------------------------------------------------------- cleanup
|
||||||
|
- name: cleanup -- clean up build directory to build against legacy gRPC
|
||||||
|
shell: cmd
|
||||||
|
run: echo y|rmdir /S build
|
||||||
|
# -------------------------------------------------------- gRPC
|
||||||
|
- name: gRPC - Building Qv2ray
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
qmake .. CONFIG+=no_increase_build_number CONFIG+=with_new_backend
|
||||||
|
mingw32-make -j2
|
||||||
|
- name: gRPC - Copying DLLs to build output folders
|
||||||
|
shell: cmd
|
||||||
|
run: .github\workflows\copy_DLLs.bat
|
||||||
|
- name: gRPC - Deploy Qt
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
cd release
|
||||||
|
del *.cpp *.h *.o *.qrc *.qm
|
||||||
|
windeployqt ./qv2ray.exe --compiler-runtime
|
||||||
|
- name: gRPC - Create 7z Release
|
||||||
|
uses: DuckSoft/create-7z-action@v1.0
|
||||||
|
with:
|
||||||
|
# file/folder path to compress
|
||||||
|
pathSource: ./build/release/
|
||||||
|
# 7z archive path to write
|
||||||
|
pathTarget: ./release.7z
|
||||||
|
- name: gRPC - Uploading artifact
|
||||||
|
uses: actions/upload-artifact@master
|
||||||
|
with:
|
||||||
|
name: Qv2ray.Win64-gRPC.7z
|
||||||
|
path: release.7z
|
||||||
|
- name: gRPC - Upload binaries to release
|
||||||
|
uses: svenstaro/upload-release-action@v1-release
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: release.7z
|
||||||
|
asset_name: Qv2ray-${{ github.ref }}-win64-gRPC.7z
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
overwrite: true
|
162
.github/workflows/build-push.yml
vendored
162
.github/workflows/build-push.yml
vendored
@ -1,162 +0,0 @@
|
|||||||
name: Qv2ray Push Build
|
|
||||||
|
|
||||||
on: push
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
# ======================================================================================== WINDOWS
|
|
||||||
Windows:
|
|
||||||
name: Push build for win64
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- name: Checking out Qv2ray sources
|
|
||||||
uses: actions/checkout@master
|
|
||||||
- name: Restoring submodules
|
|
||||||
run: git submodule update --init
|
|
||||||
# --------------------------------------------------------
|
|
||||||
- name: Installing Qt
|
|
||||||
uses: jurplel/install-qt-action@v2
|
|
||||||
with:
|
|
||||||
arch: win64_mingw73
|
|
||||||
modules: qtcharts
|
|
||||||
# --------------------------------------------------------
|
|
||||||
- name: Extracting gRPC and protobuf libs and headers
|
|
||||||
run: tools\grpc_gen.bat
|
|
||||||
# --------------------------------------------------------
|
|
||||||
# - name: Download libqvb static library.
|
|
||||||
# run: curl -o .\libs\libqvb-win64.a -L https://github.com/Qv2ray/QvRPCBridge/releases/download/v1.0/libqvb-win64.a
|
|
||||||
# --------------------------------------------------------
|
|
||||||
- name: Building Qv2ray
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
qmake .. CONFIG+=no_increase_build_number
|
|
||||||
mingw32-make -j2
|
|
||||||
- name: Copying DLLs to build output folders
|
|
||||||
shell: cmd
|
|
||||||
run: .github\workflows\copy_DLLs.bat
|
|
||||||
- name: Deploy Qt
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
cd build
|
|
||||||
cd release
|
|
||||||
del *.cpp *.h *.o *.qrc *.qm
|
|
||||||
windeployqt ./qv2ray.exe --compiler-runtime
|
|
||||||
- name: Create 7z Release
|
|
||||||
uses: DuckSoft/create-7z-action@v1.0
|
|
||||||
with:
|
|
||||||
# file/folder path to compress
|
|
||||||
pathSource: ./build/release/
|
|
||||||
# 7z archive path to write
|
|
||||||
pathTarget: ./release.7z
|
|
||||||
- name: Uploading artifact
|
|
||||||
uses: actions/upload-artifact@master
|
|
||||||
with:
|
|
||||||
name: Qv2ray.Win64.7z
|
|
||||||
path: release.7z
|
|
||||||
|
|
||||||
# ========================================================================================= MACOS
|
|
||||||
|
|
||||||
macOS:
|
|
||||||
name: Push build for macOS
|
|
||||||
runs-on: macos-latest
|
|
||||||
steps:
|
|
||||||
- name: Checking out sources
|
|
||||||
uses: actions/checkout@master
|
|
||||||
- name: Restoring submodules
|
|
||||||
run: git submodule update --init
|
|
||||||
# --------------------------------------------------------
|
|
||||||
- name: Installing Qt
|
|
||||||
uses: jurplel/install-qt-action@v2
|
|
||||||
with:
|
|
||||||
modules: qtcharts
|
|
||||||
# --------------------------------------------------------
|
|
||||||
# - name: Extracting gRPC and protobuf libs and headers
|
|
||||||
# run: tools/deps_macOS.sh
|
|
||||||
# --------------------------------------------------------
|
|
||||||
- name: Download libqvb static library.
|
|
||||||
run: curl -o ./libs/libqvb-darwin.a -L https://github.com/Qv2ray/QvRPCBridge/releases/download/v1.0/libqvb-darwin.a
|
|
||||||
# --------------------------------------------------------
|
|
||||||
- name: Building Qv2ray
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
qmake .. CONFIG+=no_increase_build_number CONFIG+=with_new_backend
|
|
||||||
make -j2
|
|
||||||
- name: Making release tarball
|
|
||||||
run: |
|
|
||||||
cd build
|
|
||||||
cd qv2ray.app
|
|
||||||
macdeployqt ./
|
|
||||||
cd ..
|
|
||||||
tar czf Qv2ray.app.tar.gz qv2ray.app
|
|
||||||
- name: Uploading Artifact
|
|
||||||
uses: actions/upload-artifact@master
|
|
||||||
with:
|
|
||||||
name: Qv2ray.macOS.app.zip
|
|
||||||
path: build/Qv2ray.app.tar.gz
|
|
||||||
# =================================================================================== LINUX
|
|
||||||
|
|
||||||
Linux:
|
|
||||||
name: Push build for Linux
|
|
||||||
runs-on: ubuntu-16.04
|
|
||||||
steps:
|
|
||||||
- name: Checking out sources
|
|
||||||
uses: actions/checkout@master
|
|
||||||
- name: Restoring submodules
|
|
||||||
run: git submodule update --init
|
|
||||||
# --------------------------------------------------------
|
|
||||||
- name: Installing Qt
|
|
||||||
uses: jurplel/install-qt-action@v2
|
|
||||||
with:
|
|
||||||
modules: qtcharts
|
|
||||||
# --------------------------------------------------------
|
|
||||||
- name: Install Packages
|
|
||||||
run: |
|
|
||||||
sudo add-apt-repository ppa:webispy/grpc
|
|
||||||
sudo add-apt-repository ppa:carsten-uppenbrink-net/openssl
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install -y libgl-dev openssl libx11-dev libxkbcommon-x11-dev libgrpc++-dev libprotobuf-dev protobuf-compiler protobuf-c-compiler protobuf-compiler-grpc
|
|
||||||
# --------------------------------------------------------
|
|
||||||
# - name: Extracting gRPC and protobuf libs and headers
|
|
||||||
# run: tools/grpc_gen.sh
|
|
||||||
# --------------------------------------------------------
|
|
||||||
- name: Download libqvb static library.
|
|
||||||
uses: Legion2/download-release-action@v2.1.0
|
|
||||||
with:
|
|
||||||
repository: Qv2ray/QvRPCBridge
|
|
||||||
tag: 'latest'
|
|
||||||
path: libs
|
|
||||||
file: libqvb-linux64.a
|
|
||||||
# --------------------------------------------------------
|
|
||||||
- name: Generate Makefile
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
qmake .. CONFIG+=no_increase_build_number CONFIG+=with_new_backend PREFIX=/usr
|
|
||||||
- name: Building Qv2ray
|
|
||||||
run: |
|
|
||||||
cd build
|
|
||||||
make -j2
|
|
||||||
- name: Generating filesystem structure for AppImage
|
|
||||||
run: |
|
|
||||||
cd build
|
|
||||||
make install INSTALL_ROOT=AppDir
|
|
||||||
cd AppDir
|
|
||||||
mkdir -p ./usr/lib/
|
|
||||||
cp /usr/lib/x86_64-linux-gnu/libssl.so.1.1 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 ./usr/lib/
|
|
||||||
- name: Building AppImage using linuxdeployqt
|
|
||||||
run: |
|
|
||||||
cd build
|
|
||||||
wget https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage
|
|
||||||
chmod +x ./linuxdeployqt-6-x86_64.AppImage
|
|
||||||
./linuxdeployqt-6-x86_64.AppImage --appimage-extract
|
|
||||||
cd AppDir
|
|
||||||
../squashfs-root/AppRun usr/share/applications/qv2ray.desktop -appimage -no-strip -always-overwrite
|
|
||||||
mv ./Qv2ray*.AppImage ./Qv2ray.AppImage
|
|
||||||
- name: Uploading artifact
|
|
||||||
uses: actions/upload-artifact@master
|
|
||||||
with:
|
|
||||||
name: Qv2ray.linux.AppImage
|
|
||||||
path: build/AppDir/Qv2ray.AppImage
|
|
||||||
|
|
183
.github/workflows/build-release.yml
vendored
183
.github/workflows/build-release.yml
vendored
@ -1,183 +0,0 @@
|
|||||||
name: Build Pre-Release Qv2ray
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [prereleased]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
Windows:
|
|
||||||
name: Release for Windows x64
|
|
||||||
runs-on: [windows-latest]
|
|
||||||
steps:
|
|
||||||
- name: Checking out Qv2ray sources
|
|
||||||
uses: actions/checkout@master
|
|
||||||
- name: Restoring submodules
|
|
||||||
run: git submodule update --init
|
|
||||||
# --------------------------------------------------------
|
|
||||||
- name: Installing Qt
|
|
||||||
uses: lhy0403/install-qt-action@v2
|
|
||||||
with:
|
|
||||||
arch: win64_mingw73
|
|
||||||
modules: qtcharts
|
|
||||||
# --------------------------------------------------------
|
|
||||||
- name: Extracting gRPC and protobuf libs and headers
|
|
||||||
run: tools\grpc_gen.bat
|
|
||||||
# --------------------------------------------------------
|
|
||||||
# - name: Download libqvb static library.
|
|
||||||
# run: curl -o .\libs\libqvb-win64.a -L https://github.com/Qv2ray/QvRPCBridge/releases/download/v1.0/libqvb-win64.a
|
|
||||||
# --------------------------------------------------------
|
|
||||||
- name: Building Qv2ray
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
qmake .. CONFIG+=no_increase_build_number
|
|
||||||
mingw32-make -j2
|
|
||||||
- name: Copying DLLs to build output folders
|
|
||||||
shell: cmd
|
|
||||||
run: .github\workflows\copy_DLLs.bat
|
|
||||||
- name: Make release zipball
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
cd build
|
|
||||||
cd release
|
|
||||||
del *.cpp *.h *.o *.qrc *.qm
|
|
||||||
windeployqt ./qv2ray.exe --compiler-runtime
|
|
||||||
- name: Create 7z Release
|
|
||||||
uses: DuckSoft/create-7z-action@v1.0
|
|
||||||
with:
|
|
||||||
pathSource: ./build/release/
|
|
||||||
pathTarget: ./release.7z
|
|
||||||
- name: Uploading artifact
|
|
||||||
uses: actions/upload-artifact@master
|
|
||||||
with:
|
|
||||||
name: Qv2ray.Win64.zip
|
|
||||||
path: build/Qv2ray.zip
|
|
||||||
- name: Upload binaries to release
|
|
||||||
uses: svenstaro/upload-release-action@v1-release
|
|
||||||
with:
|
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
file: build/Qv2ray.zip
|
|
||||||
asset_name: Qv2ray-${{ github.ref }}-win64.zip
|
|
||||||
tag: ${{ github.ref }}
|
|
||||||
overwrite: true
|
|
||||||
|
|
||||||
# =========================================================================================
|
|
||||||
|
|
||||||
macOS:
|
|
||||||
name: Release for macOS
|
|
||||||
runs-on: macos-latest
|
|
||||||
steps:
|
|
||||||
- name: Checking out sources
|
|
||||||
uses: actions/checkout@master
|
|
||||||
- name: Restoring submodules
|
|
||||||
run: git submodule update --init
|
|
||||||
# --------------------------------------------------------
|
|
||||||
- name: Installing Qt
|
|
||||||
uses: lhy0403/install-qt-action@v2
|
|
||||||
with:
|
|
||||||
modules: qtcharts
|
|
||||||
# --------------------------------------------------------
|
|
||||||
# - name: Extracting gRPC and protobuf libs and headers
|
|
||||||
# run: tools/deps_macOS.sh
|
|
||||||
# --------------------------------------------------------
|
|
||||||
- name: Download libqvb static library.
|
|
||||||
run: curl -o .\libs\libqvb-darwin.a -L https://github.com/Qv2ray/QvRPCBridge/releases/download/v1.0/libqvb-darwin.a
|
|
||||||
# --------------------------------------------------------
|
|
||||||
- name: Building Qv2ray
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
qmake .. CONFIG+=no_increase_build_number CONFIG+=with_new_backend
|
|
||||||
make -j2
|
|
||||||
- name: Making release tarball
|
|
||||||
run: |
|
|
||||||
cd build
|
|
||||||
cd qv2ray.app
|
|
||||||
macdeployqt ./
|
|
||||||
cd ..
|
|
||||||
tar czf Qv2ray.app.tar.gz qv2ray.app
|
|
||||||
- name: Uploading Artifact
|
|
||||||
uses: actions/upload-artifact@master
|
|
||||||
with:
|
|
||||||
name: Qv2ray.macOS.app.zip
|
|
||||||
path: build/Qv2ray.app.tar.gz
|
|
||||||
- name: Upload binaries to release
|
|
||||||
uses: svenstaro/upload-release-action@v1-release
|
|
||||||
with:
|
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
file: build/Qv2ray.app.tar.gz
|
|
||||||
asset_name: Qv2ray-${{ github.ref }}-macOS.tar.gz
|
|
||||||
tag: ${{ github.ref }}
|
|
||||||
overwrite: true
|
|
||||||
# ===================================================================================
|
|
||||||
|
|
||||||
Linux:
|
|
||||||
name: Release for linux
|
|
||||||
runs-on: ubuntu-16.04
|
|
||||||
steps:
|
|
||||||
- name: Checking out sources
|
|
||||||
uses: actions/checkout@master
|
|
||||||
- name: Restoring submodules
|
|
||||||
run: git submodule update --init
|
|
||||||
# --------------------------------------------------------
|
|
||||||
- name: Installing Qt
|
|
||||||
uses: lhy0403/install-qt-action@v2
|
|
||||||
with:
|
|
||||||
modules: qtcharts
|
|
||||||
# --------------------------------------------------------
|
|
||||||
- name: Install Packages
|
|
||||||
run: |
|
|
||||||
sudo add-apt-repository ppa:webispy/grpc
|
|
||||||
sudo add-apt-repository ppa:carsten-uppenbrink-net/openssl
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install -y libgl-dev openssl libx11-dev libxkbcommon-x11-dev libgrpc++-dev libprotobuf-dev protobuf-compiler protobuf-c-compiler protobuf-compiler-grpc
|
|
||||||
# --------------------------------------------------------
|
|
||||||
# - name: Extracting gRPC and protobuf libs and headers
|
|
||||||
# run: tools/grpc_gen.sh
|
|
||||||
# --------------------------------------------------------
|
|
||||||
- name: Download libqvb static library.
|
|
||||||
uses: Legion2/download-release-action@v2.1.0
|
|
||||||
with:
|
|
||||||
repository: Qv2ray/QvRPCBridge
|
|
||||||
tag: 'latest'
|
|
||||||
path: libs
|
|
||||||
file: libqvb-linux64.a
|
|
||||||
# --------------------------------------------------------
|
|
||||||
- name: Building Qv2ray
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
qmake .. CONFIG+=no_increase_build_number CONFIG+=with_new_backend PREFIX=/usr
|
|
||||||
make -j2
|
|
||||||
- name: Generating filesystem structure for AppImage
|
|
||||||
run: |
|
|
||||||
cd build
|
|
||||||
make install INSTALL_ROOT=AppDir
|
|
||||||
cd AppDir
|
|
||||||
mkdir -p ./usr/lib/
|
|
||||||
cp /usr/lib/x86_64-linux-gnu/libssl.so.1.1 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 ./usr/lib/
|
|
||||||
- name: Building AppImage using linuxdeployqt
|
|
||||||
run: |
|
|
||||||
cd build
|
|
||||||
wget https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage
|
|
||||||
chmod +x ./linuxdeployqt-6-x86_64.AppImage
|
|
||||||
./linuxdeployqt-6-x86_64.AppImage --appimage-extract
|
|
||||||
cd AppDir
|
|
||||||
../squashfs-root/AppRun usr/share/applications/qv2ray.desktop -appimage -no-strip -always-overwrite
|
|
||||||
mv ./Qv2ray*.AppImage ./Qv2ray.AppImage
|
|
||||||
- name: Uploading artifact
|
|
||||||
uses: actions/upload-artifact@master
|
|
||||||
with:
|
|
||||||
name: Qv2ray.linux.AppImage
|
|
||||||
path: build/AppDir/Qv2ray.AppImage
|
|
||||||
- name: Upload binaries to release
|
|
||||||
uses: svenstaro/upload-release-action@v1-release
|
|
||||||
with:
|
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
file: build/AppDir/Qv2ray.AppImage
|
|
||||||
asset_name: Qv2ray-${{ github.ref }}-linux.AppImage
|
|
||||||
tag: ${{ github.ref }}
|
|
||||||
overwrite: true
|
|
||||||
|
|
||||||
|
|
87
.github/workflows/macOS.yml
vendored
Normal file
87
.github/workflows/macOS.yml
vendored
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
name: Qv2ray Push Build for macOS
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
release:
|
||||||
|
types: [prereleased]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
macOS:
|
||||||
|
name: Push build for macOS
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- name: Checking out sources
|
||||||
|
uses: actions/checkout@master
|
||||||
|
- name: Restoring submodules
|
||||||
|
run: git submodule update --init
|
||||||
|
# --------------------------------------------------------
|
||||||
|
- name: Installing Qt
|
||||||
|
uses: jurplel/install-qt-action@v2
|
||||||
|
with:
|
||||||
|
modules: qtcharts
|
||||||
|
# --------------------------------------------------------
|
||||||
|
- name: Extracting gRPC and protobuf libs and headers
|
||||||
|
run: tools/deps_macOS.sh
|
||||||
|
# --------------------------------------------------------
|
||||||
|
- name: Download libqvb static library.
|
||||||
|
run: curl -o ./libs/libqvb-darwin.a -L https://github.com/Qv2ray/QvRPCBridge/releases/download/v1.0/libqvb-darwin.a
|
||||||
|
# -------------------------------------------------------- == build against libqvb
|
||||||
|
- name: libqvb - Build Qv2ray
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
qmake .. CONFIG+=no_increase_build_number CONFIG+=with_new_backend
|
||||||
|
make -j2
|
||||||
|
- name: libqvb - Making release tarball
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
cd qv2ray.app
|
||||||
|
macdeployqt ./
|
||||||
|
cd ..
|
||||||
|
tar czf Qv2ray.app.tar.gz qv2ray.app
|
||||||
|
- name: libqvb - Uploading Artifact
|
||||||
|
uses: actions/upload-artifact@master
|
||||||
|
with:
|
||||||
|
name: Qv2ray.macOS.app-libqvb.zip
|
||||||
|
path: build/Qv2ray.app.tar.gz
|
||||||
|
- name: libqvb - Upload binaries to release
|
||||||
|
uses: svenstaro/upload-release-action@v1-release
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: build/Qv2ray.app.tar.gz
|
||||||
|
asset_name: Qv2ray-${{ github.ref }}-macOS-libqvb.tar.gz
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
overwrite: true
|
||||||
|
# -------------------------------------------------------- == cleanup
|
||||||
|
- name: cleanup -- clean up build directory to build against legacy gRPC
|
||||||
|
run: rm -rvf ./build
|
||||||
|
# -------------------------------------------------------- == build against gRPC
|
||||||
|
- name: gRPC - Build Qv2ray
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
qmake .. CONFIG+=no_increase_build_number
|
||||||
|
make -j2
|
||||||
|
- name: gRPC - Making release tarball
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
cd qv2ray.app
|
||||||
|
macdeployqt ./
|
||||||
|
cd ..
|
||||||
|
tar czf Qv2ray.app.tar.gz qv2ray.app
|
||||||
|
- name: gRPC - Uploading Artifact
|
||||||
|
uses: actions/upload-artifact@master
|
||||||
|
with:
|
||||||
|
name: Qv2ray.macOS.app-gRPC.zip
|
||||||
|
path: build/Qv2ray.app.tar.gz
|
||||||
|
- name: gRPC - Upload binaries to release
|
||||||
|
uses: svenstaro/upload-release-action@v1-release
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: build/Qv2ray.app.tar.gz
|
||||||
|
asset_name: Qv2ray-${{ github.ref }}-macOS-gRPC.tar.gz
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
overwrite: true
|
||||||
|
|
@ -1 +1 @@
|
|||||||
3078
|
3082
|
||||||
|
@ -20,9 +20,11 @@ no_increase_build_number {
|
|||||||
write_file("Build.Counter", _BUILD_NUMBER)
|
write_file("Build.Counter", _BUILD_NUMBER)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Unix (Actually Linux only) prefix config.
|
||||||
isEmpty(PREFIX) {
|
isEmpty(PREFIX) {
|
||||||
PREFIX=/usr/local
|
PREFIX=/usr/local
|
||||||
}
|
}
|
||||||
|
message("Qv2ray installation PREFIX="$$PREFIX)
|
||||||
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS QV2RAY_VERSION_STRING=\"\\\"v$${VERSION}\\\"\" QAPPLICATION_CLASS=QApplication
|
DEFINES += QT_DEPRECATED_WARNINGS QV2RAY_VERSION_STRING=\"\\\"v$${VERSION}\\\"\" QAPPLICATION_CLASS=QApplication
|
||||||
|
|
||||||
|
@ -260,23 +260,29 @@ namespace Qv2ray
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WITH_LIB_GRPCPP
|
#ifdef WITH_LIB_GRPCPP
|
||||||
//GetStatsRequest request;
|
GetStatsRequest request;
|
||||||
//request.set_name(name.toStdString());
|
request.set_name(name.toStdString());
|
||||||
//request.set_reset(false);
|
request.set_reset(false);
|
||||||
//GetStatsResponse response;
|
GetStatsResponse response;
|
||||||
//ClientContext context;
|
ClientContext context;
|
||||||
//Status status = Stub->GetStats(&context, request, &response);
|
Status status = Stub->GetStats(&context, request, &response);
|
||||||
//
|
|
||||||
//if (!status.ok()) {
|
if (!status.ok()) {
|
||||||
// LOG(MODULE_VCORE, "API call returns: " + QSTRN(status.error_code()) + " (" + QString::fromStdString(status.error_message()) + ")")
|
LOG(MODULE_VCORE, "API call returns: " + QSTRN(status.error_code()) + " (" + QString::fromStdString(status.error_message()) + ")")
|
||||||
// apiFailedCounter++;
|
apiFailedCounter++;
|
||||||
//}
|
}
|
||||||
//return response.stat().value();
|
|
||||||
//LOG(MODULE_VCORE, "API RETURN: " + QString::number(data))
|
auto data = response.stat().value();
|
||||||
#else
|
#else
|
||||||
auto data = GetStats(const_cast<char *>(name.toStdString().c_str()), 1000);
|
auto data = GetStats(const_cast<char *>(name.toStdString().c_str()), 1000);
|
||||||
return data;
|
|
||||||
|
if (data < 0) {
|
||||||
|
LOG(MODULE_VCORE, "API call returns: " + QSTRN(data))
|
||||||
|
apiFailedCounter++;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
return data;
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------- API FUNCTIONS --------------------------
|
// ------------------------------------------------------------- API FUNCTIONS --------------------------
|
||||||
long V2rayKernelInstance::getTagSpeedUp(const QString &tag)
|
long V2rayKernelInstance::getTagSpeedUp(const QString &tag)
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user