add 32/64 builds

This commit is contained in:
Vladimir Dubrovin 2026-04-05 14:48:08 +03:00
parent 68b6a8f205
commit 403ef71884
2 changed files with 70 additions and 8 deletions

View File

@ -27,11 +27,16 @@ jobs:
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
echo COMMONFILES=cfg/*.* cfg/sql/*.* doc/ru/*.* doc/html/*.* doc/html/plugins/*.* doc/html/man8/*.* doc/html/man3/*.* doc/devel/*.rtf copying authors README rus.3ps | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo COMMONFILES2=3proxy/rus.3ps 3proxy/cfg/*.* 3proxy/cfg/sql/*.* 3proxy/doc/ru/*.* 3proxy/doc/html/*.* 3proxy/doc/html/plugins/*.* 3proxy/doc/html/man8/*.* 3proxy/doc/html/man3/*.* 3proxy/copying 3proxy/authors 3proxy/README | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: echo variables
shell: cmd
run: echo builddate:%BUILDDATE% release:%RELEASE% version:%VERSION% now:%NOW%
run: |
echo builddate:%BUILDDATE% release:%RELEASE% version:%VERSION% now:%NOW%
dir c:\program files\openssl\lib\VC\
dir c:\vcpkg\installed/
- name: install packages
run: vcpkg install pcre2:x64-windows && c:\msys64\usr\bin\pacman.exe -S --noconfirm mingw-w64-x86_64-pcre2 mingw-w64-x86_64-openssl
run: vcpkg install pcre2:x86-windows && c:\msys64\usr\bin\pacman.exe -S --noconfirm mingw-w64-i686-pcre2 mingw-w64-i686-openssl
# - name: make Windows
# run: make -f Makefile.win
# env:
@ -46,11 +51,10 @@ jobs:
if: ${{ startsWith(matrix.target, 'windows') }}
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
D:
cd "D:/a/3proxy/3proxy"
mkdir bin64
set "LIB=%LIB%;c:/program files/openssl/lib/VC/x64/MT;c:/vcpkg/installed/x64-windows/lib"
set "INCLUDE=%INCLUDE%;c:/program files/openssl/include;c:/vcpkg/installed/x64-windows/include"
nmake /F Makefile.msvc64
nmake /F Makefile.msvc64 clean
set "LIB=%LIB%;c:/program files/openssl/lib/VC/x86/MT;c:/vcpkg/installed/x86-windows/lib"
set "INCLUDE=%INCLUDE%;c:/program files/openssl/include;c:/vcpkg/installed/x86-windows/include"
nmake /F Makefile.msvc
nmake /F Makefile.msvc clean

58
.github/workflows/build-win64.yml vendored Normal file
View File

@ -0,0 +1,58 @@
name: C/C++ CI
on:
push:
branches: [ "test-ci" ]
paths: [ 'RELEASE', '.github/workflows/build-win.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
echo COMMONFILES=cfg/*.* cfg/sql/*.* doc/ru/*.* doc/html/*.* doc/html/plugins/*.* doc/html/man8/*.* doc/html/man3/*.* doc/devel/*.rtf copying authors README rus.3ps | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo COMMONFILES2=3proxy/rus.3ps 3proxy/cfg/*.* 3proxy/cfg/sql/*.* 3proxy/doc/ru/*.* 3proxy/doc/html/*.* 3proxy/doc/html/plugins/*.* 3proxy/doc/html/man8/*.* 3proxy/doc/html/man3/*.* 3proxy/copying 3proxy/authors 3proxy/README | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: echo variables
shell: cmd
run: echo builddate:%BUILDDATE% release:%RELEASE% version:%VERSION% now:%NOW%
- name: install packages
run: vcpkg install pcre2:x64-windows && c:\msys64\usr\bin\pacman.exe -S --noconfirm mingw-w64-x86_64-pcre2 mingw-w64-x86_64-openssl
# - name: make Windows
# run: make -f Makefile.win
# env:
# LDFLAGS: '-L "c:/msys64/mingw64/lib"'
# CFLAGS: '-I "c:/msys64/mingw64/include"'
# - name: make clean Windows
# if: ${{ startsWith(matrix.target, 'windows') }}
# run: make -f Makefile.win clean
- 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:/program files/openssl/lib/VC/x64/MT;c:/vcpkg/installed/x64-windows/lib"
set "INCLUDE=%INCLUDE%;c:/program files/openssl/include;c:/vcpkg/installed/x64-windows/include"
nmake /F Makefile.msvc64
nmake /F Makefile.msvc64 clean