Update generate-pdf.yml #673
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: modharbour Win64 msvc and ADS using choco | |
on: | |
push: | |
jobs: | |
build: | |
runs-on: windows-latest | |
if: github.actor == github.event.repository.owner.login | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Checkout harbour/core repo | |
uses: actions/checkout@v2 | |
with: | |
repository: harbour/core | |
path: harbour | |
- name: Install dependencies | |
run: | | |
choco install apache-httpd --params '"/installLocation:C:"' | |
choco install openssl | |
choco install curl | |
Copy-Item 'C:\Program Files\OpenSSL-Win64' 'C:\OpenSSL-Win64' -Recurse | |
Copy-Item 'C:\ProgramData\chocolatey\lib\curl\tools\curl-7.78.0-win64-mingw' 'C:\curl' -Recurse | |
(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 | |
(Get-Content -path harbour\contrib\hbcurl\hbcurl.hbp) -replace 'libcurl','libcurl-x64' | Set-Content -path harbour\contrib\hbcurl\hbcurl.hbp | |
(new-object System.Net.WebClient).DownloadFile('https://bitbucket.org/lorenzodla/mod_harbour_actions_resources/downloads/acesdk-x64.zip', 'C:\temp\acesdk-x64.zip') | |
Expand-Archive -LiteralPath C:\temp\acesdk-x64.zip -DestinationPath C:\acesdk -Force | |
- 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:\OpenSSL-Win64\include | |
set HB_WITH_CURL=C:\curl\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_WITH_ADS=C:\acesdk | |
set HB_COMPILER=msvc64 | |
win-make.exe | |
copy lib\win\msvc64\libcrypto-1_1-x64.lib lib\win\msvc64\libcrypto.lib | |
copy lib\win\msvc64\libssl-1_1-x64.lib lib\win\msvc64\libeay32.lib | |
copy lib\win\msvc64\libcurl-x64.lib lib\win\msvc64\libcurl.lib | |
- 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\lib -dHB_WITH_ADS="c:\acesdk\" rddads.hbc | |
set Path=%oldpath% | |
set INCLUDE=%oldinclude% | |
- name: Create output folders | |
shell: cmd | |
run: | | |
mkdir output | |
mkdir output\bin | |
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 | |
copy c:\curl\bin\libcurl-x64.dll output\bin | |
copy c:\OpenSSL-Win64\bin\libcrypto-1_1-x64.dll output\bin | |
copy c:\OpenSSL-Win64\bin\libssl-1_1-x64.dll output\bin | |
- 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_ads_${{ env.TIME }} | |
path: output |