mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 01:19:52 +03:00
Merge 56c146e6c0
into 9f01143c83
This commit is contained in:
commit
3c04860b33
45
.github/workflows/build_source_release.yml
vendored
45
.github/workflows/build_source_release.yml
vendored
@ -8,32 +8,29 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: build
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- uses: actions/checkout@v1
|
- name: Checkout
|
||||||
with:
|
uses: actions/checkout@v4
|
||||||
submodules: true
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
- name: archive
|
- name: Archive
|
||||||
id: archive
|
id: archive
|
||||||
run: |
|
run: |
|
||||||
VERSION=${{ github.event.release.tag_name }}
|
VERSION=${{ github.event.release.tag_name }}
|
||||||
PKGNAME="SoftEtherVPN-$VERSION"
|
PKGNAME="SoftEtherVPN-$VERSION"
|
||||||
mkdir -p /tmp/$PKGNAME
|
mkdir -p /tmp/$PKGNAME
|
||||||
mv * /tmp/$PKGNAME
|
mv * /tmp/$PKGNAME
|
||||||
mv /tmp/$PKGNAME .
|
mv /tmp/$PKGNAME .
|
||||||
TARBALL=$PKGNAME.tar.xz
|
TARBALL=$PKGNAME.tar.xz
|
||||||
tar cJf $TARBALL $PKGNAME
|
tar cJf $TARBALL $PKGNAME
|
||||||
echo "tarball=$TARBALL" >> $GITHUB_OUTPUT
|
echo "tarball=$TARBALL" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: upload tarball
|
- name: Upload tarball
|
||||||
uses: actions/upload-release-asset@v1
|
uses: softprops/action-gh-release@v2
|
||||||
env:
|
with:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
files: ./${{ steps.archive.outputs.tarball }}
|
||||||
with:
|
name: ${{ steps.archive.outputs.tarball }}
|
||||||
upload_url: ${{ github.event.release.upload_url }}
|
|
||||||
asset_path: ./${{ steps.archive.outputs.tarball }}
|
|
||||||
asset_name: ${{ steps.archive.outputs.tarball }}
|
|
||||||
asset_content_type: application/gzip
|
|
69
.github/workflows/coverity.yml
vendored
69
.github/workflows/coverity.yml
vendored
@ -1,43 +1,50 @@
|
|||||||
|
|
||||||
name: Coverity
|
name: Coverity
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 * * *"
|
- cron: "0 0 * * *"
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
scan:
|
scan:
|
||||||
|
name: Scan
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.repository_owner == 'SoftEtherVPN' }}
|
if: github.repository_owner == 'SoftEtherVPN'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
- name: Checkout
|
||||||
submodules: true
|
uses: actions/checkout@v4
|
||||||
- name: Install apt dependencies
|
with:
|
||||||
run: |
|
submodules: true
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y cmake gcc g++ libncurses5-dev libreadline-dev libssl-dev make zlib1g-dev libsodium-dev
|
- name: Install dependencies
|
||||||
- name: Download Coverity build tool
|
run: |
|
||||||
run: |
|
sudo apt-get update
|
||||||
wget -c -N https://scan.coverity.com/download/linux64 --post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=SoftEtherVPN%2FSoftEtherVPN" -O coverity_tool.tar.gz
|
sudo apt-get install -y cmake gcc g++ libncurses5-dev libreadline-dev libssl-dev make zlib1g-dev libsodium-dev
|
||||||
mkdir coverity_tool
|
|
||||||
tar xzf coverity_tool.tar.gz --strip 1 -C coverity_tool
|
- name: Download Coverity build tool
|
||||||
- name: Configure
|
run: |
|
||||||
run: |
|
wget -c -N https://scan.coverity.com/download/linux64 --post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=SoftEtherVPN%2FSoftEtherVPN" -O coverity_tool.tar.gz
|
||||||
./configure
|
mkdir coverity_tool
|
||||||
- name: Build with Coverity build tool
|
tar xzf coverity_tool.tar.gz --strip 1 -C coverity_tool
|
||||||
run: |
|
|
||||||
export PATH=`pwd`/coverity_tool/bin:$PATH
|
- name: Configure
|
||||||
cov-build --dir cov-int make -C build
|
run: |
|
||||||
- name: Submit build result to Coverity Scan
|
./configure
|
||||||
run: |
|
|
||||||
tar czvf cov.tar.gz cov-int
|
- name: Build with Coverity build tool
|
||||||
curl --form token=${{ secrets.COVERITY_SCAN_TOKEN }} \
|
run: |
|
||||||
--form email=chipitsine@gmail.com \
|
export PATH=`pwd`/coverity_tool/bin:$PATH
|
||||||
--form file=@cov.tar.gz \
|
cov-build --dir cov-int make -C build
|
||||||
--form version="Commit $GITHUB_SHA" \
|
|
||||||
--form description="Build submitted via CI" \
|
- name: Submit build result to Coverity Scan
|
||||||
https://scan.coverity.com/builds?project=SoftEtherVPN%2FSoftEtherVPN
|
run: |
|
||||||
|
tar czvf cov.tar.gz cov-int
|
||||||
|
curl --form token=${{ secrets.COVERITY_SCAN_TOKEN }} \
|
||||||
|
--form email=chipitsine@gmail.com \
|
||||||
|
--form file=@cov.tar.gz \
|
||||||
|
--form version="Commit $GITHUB_SHA" \
|
||||||
|
--form description="Build submitted via CI" \
|
||||||
|
https://scan.coverity.com/builds?project=SoftEtherVPN%2FSoftEtherVPN
|
32
.github/workflows/fedora-rawhide.yml
vendored
32
.github/workflows/fedora-rawhide.yml
vendored
@ -7,28 +7,30 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_and_test:
|
build_and_test:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
cc: [ gcc, clang ]
|
cc:
|
||||||
|
- gcc
|
||||||
|
- clang
|
||||||
name: ${{ matrix.cc }}
|
name: ${{ matrix.cc }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: fedora:rawhide
|
image: fedora:rawhide
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
dnf -y install git cmake ncurses-devel openssl-devel-engine libsodium-devel readline-devel zlib-devel gcc-c++ clang
|
|
||||||
- name: Compile with ${{ matrix.cc }}
|
|
||||||
run: |
|
|
||||||
export CC=${{ matrix.cc }}
|
|
||||||
./configure
|
|
||||||
make -C build
|
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
dnf -y install git cmake ncurses-devel openssl-devel-engine libsodium-devel readline-devel zlib-devel gcc-c++ clang
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Compile with ${{ matrix.cc }}
|
||||||
|
run: |
|
||||||
|
export CC=${{ matrix.cc }}
|
||||||
|
./configure
|
||||||
|
make -C build
|
54
.github/workflows/linux.yml
vendored
54
.github/workflows/linux.yml
vendored
@ -1,34 +1,40 @@
|
|||||||
on: [push, pull_request]
|
name: Linux
|
||||||
|
|
||||||
permissions:
|
on:
|
||||||
contents: read
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_and_test:
|
build_and_test:
|
||||||
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Checkout
|
||||||
run: sudo apt update && sudo apt-get -y install cmake gcc g++ ninja-build libncurses5-dev libreadline-dev libsodium-dev libssl-dev make zlib1g-dev liblz4-dev libnl-genl-3-dev
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
- name: Build
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
mkdir build
|
sudo apt-get update
|
||||||
cd build
|
sudo apt-get -y install cmake gcc g++ ninja-build libncurses5-dev libreadline-dev libsodium-dev libssl-dev make zlib1g-dev liblz4-dev libnl-genl-3-dev
|
||||||
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
|
|
||||||
cmake --build .
|
|
||||||
|
|
||||||
- name: Build deb packages
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
cd build
|
mkdir build
|
||||||
cpack -C Release -G DEB
|
cd build
|
||||||
|
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
|
||||||
|
cmake --build .
|
||||||
|
|
||||||
- name: Test
|
- name: Build deb packages
|
||||||
run: |
|
run: |
|
||||||
.ci/appveyor-deb-install-test.sh
|
cd build
|
||||||
sudo apt-get -y install autoconf libtool liblzo2-dev libpam-dev fping unzip libcap-ng-dev # To build OpenVPN
|
cpack -C Release -G DEB
|
||||||
sudo .ci/start-se-openvpn.sh
|
|
||||||
sudo .ci/run-openvpn-tests.sh
|
- name: Test
|
||||||
|
run: |
|
||||||
|
.ci/appveyor-deb-install-test.sh
|
||||||
|
sudo apt-get -y install autoconf libtool liblzo2-dev libpam-dev fping unzip libcap-ng-dev # To build OpenVPN
|
||||||
|
sudo .ci/start-se-openvpn.sh
|
||||||
|
sudo .ci/run-openvpn-tests.sh
|
45
.github/workflows/macos.yml
vendored
45
.github/workflows/macos.yml
vendored
@ -1,28 +1,37 @@
|
|||||||
on: [push, pull_request, workflow_dispatch]
|
name: macOS
|
||||||
|
|
||||||
permissions:
|
on:
|
||||||
contents: read
|
push:
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_and_test:
|
build_and_test:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-14, macos-13, macos-12]
|
os:
|
||||||
|
- macos-14
|
||||||
|
- macos-13
|
||||||
|
- macos-12
|
||||||
name: ${{ matrix.os }}
|
name: ${{ matrix.os }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
brew install libsodium
|
|
||||||
- name: Compile
|
|
||||||
run: |
|
|
||||||
./configure
|
|
||||||
make -C build
|
|
||||||
- name: Test
|
|
||||||
run: |
|
|
||||||
otool -L build/vpnserver
|
|
||||||
.ci/memory-leak-test.sh
|
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
brew install libsodium
|
||||||
|
|
||||||
|
- name: Compile
|
||||||
|
run: |
|
||||||
|
./configure
|
||||||
|
make -C build
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: |
|
||||||
|
otool -L build/vpnserver
|
||||||
|
.ci/memory-leak-test.sh
|
37
.github/workflows/musl.yml
vendored
37
.github/workflows/musl.yml
vendored
@ -1,23 +1,30 @@
|
|||||||
name: alpine/musl
|
name: Alpine/musl
|
||||||
|
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
push:
|
||||||
permissions:
|
pull_request:
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
musl:
|
musl:
|
||||||
name: gcc
|
name: gcc
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
apk add binutils --no-cache build-base readline-dev openssl-dev ncurses-dev git cmake zlib-dev libsodium-dev gnu-libiconv
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Install dependencies
|
|
||||||
run: apk add binutils --no-cache build-base readline-dev openssl-dev ncurses-dev git cmake zlib-dev libsodium-dev gnu-libiconv
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: ./configure
|
run: |
|
||||||
|
./configure
|
||||||
|
|
||||||
- name: make
|
- name: make
|
||||||
run: make -C build
|
run: |
|
||||||
|
make -C build
|
25
.github/workflows/stb_check.yml
vendored
25
.github/workflows/stb_check.yml
vendored
@ -1,16 +1,21 @@
|
|||||||
on: [push, pull_request]
|
name: STB Check
|
||||||
|
|
||||||
permissions:
|
on:
|
||||||
contents: read
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
|
name: Check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
|
||||||
with:
|
- name: Checkout
|
||||||
submodules: true
|
uses: actions/checkout@v4
|
||||||
- name: Check
|
with:
|
||||||
run: |
|
submodules: true
|
||||||
cd developer_tools/stbchecker
|
|
||||||
dotnet run ../../src/bin/hamcore
|
- name: Check
|
||||||
|
run: |
|
||||||
|
cd developer_tools/stbchecker
|
||||||
|
dotnet run ../../src/bin/hamcore
|
124
.github/workflows/windows.yml
vendored
124
.github/workflows/windows.yml
vendored
@ -1,63 +1,83 @@
|
|||||||
on: [push, pull_request]
|
name: Windows
|
||||||
|
|
||||||
permissions:
|
on:
|
||||||
contents: read
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_and_test:
|
build_and_test:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
platform: [
|
platform: [
|
||||||
{ ARCHITECTURE: x86, COMPILER_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/Llvm/bin/clang-cl.exe", VCPKG_TRIPLET: "x86-windows-static", VCVARS_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars32.bat"},
|
{
|
||||||
{ ARCHITECTURE: x64, COMPILER_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/Llvm/x64/bin/clang-cl.exe", VCPKG_TRIPLET: "x64-windows-static", VCVARS_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat"}
|
ARCHITECTURE: x86,
|
||||||
|
COMPILER_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/Llvm/bin/clang-cl.exe",
|
||||||
|
VCPKG_TRIPLET: "x86-windows-static",
|
||||||
|
VCVARS_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars32.bat"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ARCHITECTURE: x64,
|
||||||
|
COMPILER_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/Llvm/x64/bin/clang-cl.exe",
|
||||||
|
VCPKG_TRIPLET: "x64-windows-static",
|
||||||
|
VCVARS_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
name: ${{ matrix.platform.ARCHITECTURE }}
|
name: ${{ matrix.platform.ARCHITECTURE }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
- name: Checkout
|
||||||
submodules: true
|
uses: actions/checkout@v4
|
||||||
- name: Cache vcpkg
|
with:
|
||||||
uses: actions/cache@v4
|
submodules: true
|
||||||
with:
|
|
||||||
path: 'build/vcpkg_installed/'
|
- name: Cache vcpkg
|
||||||
key: vcpkg-${{ matrix.platform.VCPKG_TRIPLET }}
|
uses: actions/cache@v4
|
||||||
- name: Set version variables
|
with:
|
||||||
run: |
|
path: 'build/vcpkg_installed/'
|
||||||
$v = python version.py
|
key: vcpkg-${{ matrix.platform.VCPKG_TRIPLET }}
|
||||||
echo "VERSION=$v" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
|
||||||
shell: pwsh
|
- name: Set version variables
|
||||||
- name: Build
|
run: |
|
||||||
env:
|
Write-Output "VERSION=$(python version.py)" | Out-File -FilePath $Env:GITHUB_ENV -Encoding UTF8 -Append
|
||||||
ARCHITECTURE: ${{ matrix.platform.ARCHITECTURE }}
|
shell: pwsh
|
||||||
COMPILER_PATH: ${{ matrix.platform.COMPILER_PATH }}
|
|
||||||
VCPKG_TRIPLET: ${{ matrix.platform.VCPKG_TRIPLET }}
|
- name: Build
|
||||||
VCVARS_PATH: ${{ matrix.platform.VCVARS_PATH }}
|
env:
|
||||||
run: |
|
ARCHITECTURE: ${{ matrix.platform.ARCHITECTURE }}
|
||||||
set BUILD_NUMBER=0
|
COMPILER_PATH: ${{ matrix.platform.COMPILER_PATH }}
|
||||||
mkdir build
|
VCPKG_TRIPLET: ${{ matrix.platform.VCPKG_TRIPLET }}
|
||||||
cd build
|
VCVARS_PATH: ${{ matrix.platform.VCVARS_PATH }}
|
||||||
call "%VCVARS_PATH%"
|
run: |
|
||||||
cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="C:\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=%VCPKG_TRIPLET% -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER="%COMPILER_PATH%" -DCMAKE_CXX_COMPILER="%COMPILER_PATH%" -DBUILD_NUMBER=%BUILD_NUMBER% ..
|
set BUILD_NUMBER=0
|
||||||
cmake --build .
|
mkdir build
|
||||||
mkdir installers
|
cd build
|
||||||
vpnsetup /SFXMODE:vpnclient /SFXOUT:"installers\softether-vpnclient-%VERSION%.%BUILD_NUMBER%.%ARCHITECTURE%.exe"
|
call "%VCVARS_PATH%"
|
||||||
vpnsetup /SFXMODE:vpnserver_vpnbridge /SFXOUT:"installers\softether-vpnserver_vpnbridge-%VERSION%.%BUILD_NUMBER%.%ARCHITECTURE%.exe"
|
cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="C:\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=%VCPKG_TRIPLET% -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER="%COMPILER_PATH%" -DCMAKE_CXX_COMPILER="%COMPILER_PATH%" -DBUILD_NUMBER=%BUILD_NUMBER% ..
|
||||||
shell: cmd
|
cmake --build .
|
||||||
- name: Test
|
mkdir installers
|
||||||
shell: powershell
|
vpnsetup /SFXMODE:vpnclient /SFXOUT:"installers\softether-vpnclient-%VERSION%.%BUILD_NUMBER%.%ARCHITECTURE%.exe"
|
||||||
run: |
|
vpnsetup /SFXMODE:vpnserver_vpnbridge /SFXOUT:"installers\softether-vpnserver_vpnbridge-%VERSION%.%BUILD_NUMBER%.%ARCHITECTURE%.exe"
|
||||||
. .ci/appveyor-vpntest.ps1
|
shell: cmd
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
- name: Test
|
||||||
if-no-files-found: error
|
shell: powershell
|
||||||
name: Binaries-${{ matrix.platform.ARCHITECTURE }}
|
run: |
|
||||||
path: |
|
. .ci/appveyor-vpntest.ps1
|
||||||
build/*.exe
|
|
||||||
build/*.pdb
|
- name: Upload built binaries
|
||||||
build/*.se2
|
uses: actions/upload-artifact@v4
|
||||||
- uses: actions/upload-artifact@v4
|
with:
|
||||||
with:
|
if-no-files-found: error
|
||||||
if-no-files-found: error
|
name: Binaries-${{ matrix.platform.ARCHITECTURE }}
|
||||||
name: Installers-${{ matrix.platform.ARCHITECTURE }}
|
path: |
|
||||||
path: build/installers
|
build/*.exe
|
||||||
|
build/*.pdb
|
||||||
|
build/*.se2
|
||||||
|
|
||||||
|
- name: Upload installers
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
if-no-files-found: error
|
||||||
|
name: Installers-${{ matrix.platform.ARCHITECTURE }}
|
||||||
|
path: build/installers
|
69
.github/workflows/windows_release.yml
vendored
69
.github/workflows/windows_release.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: "Release"
|
name: Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -14,43 +14,60 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
|
name: Release
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
outputs:
|
outputs:
|
||||||
upload_url: "${{ steps.create_release.outputs.upload_url }}"
|
upload_url: "${{ steps.create_release.outputs.upload_url }}"
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout repository"
|
|
||||||
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: "Create GitHub release"
|
- name: Create GitHub release
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v2
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
name: ${{ matrix.platform.ARCHITECTURE }}
|
name: ${{ matrix.platform.ARCHITECTURE }}
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: ["release"]
|
needs: release
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
platform: [
|
platform: [
|
||||||
{ ARCHITECTURE: x86, COMPILER_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/Llvm/bin/clang-cl.exe", VCPKG_TRIPLET: "x86-windows-static", VCVARS_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars32.bat"},
|
{
|
||||||
{ ARCHITECTURE: x64, COMPILER_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/Llvm/x64/bin/clang-cl.exe", VCPKG_TRIPLET: "x64-windows-static", VCVARS_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat"}
|
ARCHITECTURE: x86,
|
||||||
|
COMPILER_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/Llvm/bin/clang-cl.exe",
|
||||||
|
VCPKG_TRIPLET: "x86-windows-static",
|
||||||
|
VCVARS_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars32.bat"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ARCHITECTURE: x64,
|
||||||
|
COMPILER_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/Llvm/x64/bin/clang-cl.exe",
|
||||||
|
VCPKG_TRIPLET: "x64-windows-static",
|
||||||
|
VCVARS_PATH: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout repository"
|
|
||||||
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Cache vcpkg
|
- name: Cache vcpkg
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: 'build/vcpkg_installed/'
|
path: 'build/vcpkg_installed/'
|
||||||
key: vcpkg-release-${{ matrix.platform.VCPKG_TRIPLET }}
|
key: vcpkg-release-${{ matrix.platform.VCPKG_TRIPLET }}
|
||||||
|
|
||||||
- name: Set version variables
|
- name: Set version variables
|
||||||
run: |
|
run: |
|
||||||
$b=(Get-Content CMakeSettings.json | Out-String | ConvertFrom-Json).environments.BuildNumber
|
@(
|
||||||
echo "BUILD_NUMBER=$b" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
"BUILD_NUMBER=$((Get-Content CMakeSettings.json | Out-String | ConvertFrom-Json).environments.BuildNumber)"
|
||||||
$v = python version.py
|
"VERSION=$(python version.py)"
|
||||||
echo "VERSION=$v" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
) | Out-File -FilePath $Env:GITHUB_ENV -Encoding UTF8 -Append
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
env:
|
env:
|
||||||
ARCHITECTURE: ${{ matrix.platform.ARCHITECTURE }}
|
ARCHITECTURE: ${{ matrix.platform.ARCHITECTURE }}
|
||||||
@ -68,27 +85,19 @@ jobs:
|
|||||||
vpnsetup /SFXMODE:vpnserver_vpnbridge /SFXOUT:"installers\softether-vpnserver_vpnbridge-%VERSION%.%BUILD_NUMBER%.%ARCHITECTURE%.exe"
|
vpnsetup /SFXMODE:vpnserver_vpnbridge /SFXOUT:"installers\softether-vpnserver_vpnbridge-%VERSION%.%BUILD_NUMBER%.%ARCHITECTURE%.exe"
|
||||||
shell: cmd
|
shell: cmd
|
||||||
|
|
||||||
- name: dir
|
- name: Show directory items
|
||||||
run: |
|
run: |
|
||||||
Get-ChildItem -Recurse build/installers
|
Get-ChildItem -Recurse build/installers
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
||||||
- name: "Upload softether-vpnclient"
|
- name: Upload softether-vpnclient
|
||||||
uses: actions/upload-release-asset@v1
|
uses: softprops/action-gh-release@v2
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: "${{ github.token }}"
|
|
||||||
with:
|
with:
|
||||||
upload_url: "${{ needs.release.outputs.upload_url }}"
|
files: "build/installers/softether-vpnclient-${{ env.VERSION }}.${{ env.BUILD_NUMBER }}.${{ matrix.platform.ARCHITECTURE }}.exe"
|
||||||
asset_path: "build/installers/softether-vpnclient-${{ env.VERSION }}.${{ env.BUILD_NUMBER }}.${{ matrix.platform.ARCHITECTURE }}.exe"
|
name: "softether-vpnclient-${{ env.VERSION }}.${{ env.BUILD_NUMBER }}.${{ matrix.platform.ARCHITECTURE }}.exe"
|
||||||
asset_name: "softether-vpnclient-${{ env.VERSION }}.${{ env.BUILD_NUMBER }}.${{ matrix.platform.ARCHITECTURE }}.exe"
|
|
||||||
asset_content_type: "application/octet-stream"
|
- name: Upload softether-vpnserver_vpnbridge
|
||||||
- name: "Upload softether-vpnserver_vpnbridge"
|
uses: softprops/action-gh-release@v2
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: "${{ github.token }}"
|
|
||||||
with:
|
with:
|
||||||
upload_url: "${{ needs.release.outputs.upload_url }}"
|
files: "build/installers/softether-vpnserver_vpnbridge-${{ env.VERSION }}.${{ env.BUILD_NUMBER }}.${{ matrix.platform.ARCHITECTURE }}.exe"
|
||||||
asset_path: "build/installers/softether-vpnserver_vpnbridge-${{ env.VERSION }}.${{ env.BUILD_NUMBER }}.${{ matrix.platform.ARCHITECTURE }}.exe"
|
name: "softether-vpnserver_vpnbridge-${{ env.VERSION }}.${{ env.BUILD_NUMBER }}.${{ matrix.platform.ARCHITECTURE }}.exe"
|
||||||
asset_name: "softether-vpnserver_vpnbridge-${{ env.VERSION }}.${{ env.BUILD_NUMBER }}.${{ matrix.platform.ARCHITECTURE }}.exe"
|
|
||||||
asset_content_type: "application/octet-stream"
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user