mirror of
https://github.com/3proxy/3proxy.git
synced 2026-04-06 21:30:12 +08:00
68 lines
2.2 KiB
YAML
68 lines
2.2 KiB
YAML
name: C/C++ CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ "test-ci" ]
|
|
paths: [ 'RELEASE', '.github/workflows/build-win64.yml' ]
|
|
|
|
jobs:
|
|
ci:
|
|
name: "${{ matrix.target }}"
|
|
strategy:
|
|
matrix:
|
|
target:
|
|
- windows-2022
|
|
runs-on: ${{ matrix.target }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
# - name: configure
|
|
# run: ./configure
|
|
- name: set date
|
|
run: |
|
|
$NOW = Get-Date -Format "yyMMddHHmmss"
|
|
echo "now: $NOW"
|
|
$RELEASE = Get-Content -Path "RELEASE" -Raw
|
|
echo "release: $RELEASE"
|
|
echo "NOW=$NOW" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
echo "RELEASE=$RELEASE" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
echo "VERSION=VERSION=`"$RELEASE`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
echo "BUILDDATE=BUILDDATE=`"$NOW`"" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
- name: install packages
|
|
run: vcpkg install pcre2:x64-windows openssl:x64-windows
|
|
- name: Add msbuild to PATH
|
|
uses: microsoft/setup-msbuild@v3
|
|
- name: make Windows MSVC
|
|
if: ${{ startsWith(matrix.target, 'windows') }}
|
|
shell: cmd
|
|
run: |
|
|
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
|
D:
|
|
cd "D:/a/3proxy/3proxy"
|
|
mkdir bin64
|
|
set "LIB=%LIB%;c:/vcpkg/installed/x64-windows/lib"
|
|
set "INCLUDE=%INCLUDE%;c:/vcpkg/installed/x64-windows/include"
|
|
echo "volatile char VerSion[]=^"3APA3A-3proxy-Internal-Build: 3proxy-%RELEASE%%-%NOW%\r\nCode certificate: https://3proxy.org/3proxy.cer\r\n^";" >>src/3proxy.c
|
|
nmake /F Makefile.msvc64
|
|
dir c:\vcpkg\installed\x64-windows\bin\
|
|
copy /Y c:\vcpkg\installed\x64-windows\bin\*.dll bin64
|
|
- name: Get artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: "3proxy-${{ env.RELEASE }}-x64.zip"
|
|
path: |
|
|
bin64/3proxy.exe
|
|
bin64/*.dll
|
|
bin64/mycrypt.exe
|
|
cfg/*.*
|
|
cfg/sql/*.*
|
|
doc/ru/*.*
|
|
doc/html/*.*
|
|
doc/html/plugins/*.*
|
|
doc/html/man8/*.*
|
|
doc/html/man3/*.*
|
|
doc/devel/*.rtf
|
|
copying
|
|
authors
|
|
README
|
|
rus.3ps
|