Skip to content

Commit

Permalink
Update modharbour_win64_msvc.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
FiveTechSoft authored May 17, 2020
1 parent 8ed1fab commit bd7a2a4
Showing 1 changed file with 71 additions and 81 deletions.
152 changes: 71 additions & 81 deletions .github/workflows/modharbour_win64_msvc.yml
Original file line number Diff line number Diff line change
@@ -1,97 +1,87 @@
name: modharbour for Win64 and msvc
name: Harbour for Win64 using msvc

on:
push:
paths:
- 'apache.prg'
- 'mod_harbour.c'
- 'windows/modharbour.hbp'
- 'windows/mod.hbp'
- '.github/workflows/modharbour_win64_msvc.yml'
watch:
types: [started]

jobs:
build:
runs-on: windows-latest

if: github.actor == github.event.repository.owner.login

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Checkout harbour/core repo
uses: actions/checkout@v2
with:
repository: harbour/core
path: harbour
- name: Checkout harbour/core repo
uses: actions/checkout@v2
with:
repository: harbour/core
path: harbour

- name: Installing dependencies
shell: cmd
run: |
choco install apache-httpd --params '"/installLocation:C:"'
vcpkg.exe install curl:x64-windows
vcpkg.exe install openssl:x64-windows
vcpkg integrate install
- name: Fixing Harbour hbssl.hbp
run: |
(Get-Content -path harbour\contrib\hbssl\hbssl.hbp) -replace 'libeay32','libcrypto' | Set-Content -path harbour\contrib\hbssl\hbssl.hbp
(Get-Content -path harbour\contrib\hbssl\hbssl.hbp) -replace 'ssleay32','libssl' | Set-Content -path harbour\contrib\hbssl\hbssl.hbp
(Get-Content -path harbour\contrib\hbssl\hbssl.hbc) -replace 'libeay32','libcrypto-1_1-x64' | Set-Content -path harbour\contrib\hbssl\hbssl.hbc
(Get-Content -path harbour\contrib\hbssl\hbssl.hbc) -replace 'ssleay32','libssl-1_1-x64' | Set-Content -path harbour\contrib\hbssl\hbssl.hbc
- name: Install dependencies
run: |
choco install apache-httpd --params '"/installLocation:C:"'
choco install openssl
(new-object System.Net.WebClient).DownloadFile( 'https://curl.haxx.se/download/curl-7.70.0.zip', 'c:\temp\curl-7.70.0.zip')
Expand-Archive -LiteralPath 'c:\temp\curl-7.70.0.zip' -DestinationPath 'curl-7.70.0' -Force
(Get-Content -path harbour\contrib\hbssl\hbssl.hbp) -replace '/../inc32','' | Set-Content -path harbour\contrib\hbssl\hbssl.hbp
copy-Item 'c:\Program Files\OpenSSL-Win64' -destination 'c:\OpenSSL-Win64' -recurse
- name: Build curl using msvc
shell: cmd
run: |
cd curl-7.70.0\curl-7.70.0\winbuild
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
set MACHINE=x64
nmake /f Makefile.vc mode=static
- name: Compile Harbour
shell: cmd
run: |
copy c:\curl-7.70.0\curl-7-70.0\builds\libcurl-vc-x64-release-static-ipv6-sspi-winssl\lib\libcurl_a.lib c:\curl-7.70.0\curl-7-70.0\builds\libcurl-vc-x64-release-static-ipv6-sspi-winssl\lib\libcur.lib
cd harbour
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
set HB_BUILD_MODE=c
set HB_USER_PRGFLAGS=-l-
set HB_BUILD_CONTRIBS=
set HB_WITH_OPENSSL=c:/OpenSSL-Win64/include
set HB_WITH_CURL=c:\curl-7.70.0\curl-7-70.0\builds\libcurl-vc-x64-release-static-ipv6-sspi-winssl\include
set HB_OPENSSL_STATIC=
set HB_STATIC_CURL=no
set HB_BUILD_DYN=no
set HB_BUILD_CONTRIB_DYN=no
set HB_COMPILER=msvc64
win-make.exe
- name: Compile mod_harbour
shell: cmd
run: |
cd windows
set oldpath=%Path%
set oldinclude=%INCLUDE%
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
..\harbour\bin\win\msvc64\hbmk2 modharbour.hbp -comp=msvc64 -Lc:\Apache24\lib -Lc:\curl-7.70.0\curl-7-70.0\builds\libcurl-vc-x64-release-static-ipv6-sspi-winssl\lib
set Path=%oldpath%
set INCLUDE=%oldinclude%
- name: Compile Harbour
shell: cmd
run: |
cd harbour
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
set HB_BUILD_MODE=c
set HB_USER_PRGFLAGS=-l-
set HB_BUILD_CONTRIBS=
set HB_WITH_OPENSSL=c:\vcpkg\packages\openssl-windows_x64-windows\include\
set HB_WITH_CURL=c:\vcpkg\packages\curl_x64-windows\include
set HB_OPENSSL_STATIC=yes
set HB_STATIC_OPENSSL=yes
set HB_STATIC_CURL=yes
set HB_BUILD_DYN=no
set HB_BUILD_CONTRIB_DYN=no
set HB_COMPILER=msvc64
win-make.exe
copy lib\win\msvc64\libcrypto-1_1-x64.lib lib\win\msvc64\libeay32.lib
copy lib\win\msvc64\libssl-1_1-x64.lib lib\win\msvc64\ssleay32.lib
- name: Compile mod_harbour
shell: cmd
run: |
cd windows
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
..\harbour\bin\win\msvc64\hbmk2 modharbour.hbp -comp=msvc64 -Lc:\Apache24\lib -Lc:\vcpkg\packages\curl_x64-windows\lib
- name: Create output folders
shell: cmd
run: |
mkdir output
mkdir output\samples
copy .\windows\mod_harbour.so output
copy .\windows\libharbour.dll output
copy .\windows\readme.md output
copy -r .\samples\* output\samples
- name: Create output folders
shell: cmd
run: |
mkdir output
mkdir output\samples
mkdir output\harbour
copy .\windows\mod_harbour.so output
copy .\windows\libharbour.dll output
copy .\windows\readme.md output
xcopy samples output\samples\ /E
xcopy harbour output\harbour\ /E
- name: Get current time
uses: srfrnk/current-time@master
id: current-time
with:
format: YYYY_MM_DD
- name: Get current time
uses: srfrnk/current-time@master
id: current-time
with:
format: YYYY_MM_DD

- name: Upload mod_harbour to artifact
env:
TIME: "${{ steps.current-time.outputs.formattedTime }}"
uses: actions/upload-artifact@v2
with:
name: modharbour_win64_msvc_${{ env.TIME }}
path: output
- name: Upload mod_harbour to artifact
env:
TIME: "${{ steps.current-time.outputs.formattedTime }}"
uses: actions/upload-artifact@v2
with:
name: modharbour_win64_msvc_${{ env.TIME }}
path: output

0 comments on commit bd7a2a4

Please sign in to comment.