|
1 | | -name: modharbour for Win64 and msvc |
| 1 | +name: Harbour for Win64 using msvc |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | | - paths: |
6 | | - - 'apache.prg' |
7 | | - - 'mod_harbour.c' |
8 | | - - 'windows/modharbour.hbp' |
9 | | - - 'windows/mod.hbp' |
10 | | - - '.github/workflows/modharbour_win64_msvc.yml' |
11 | 5 | watch: |
12 | 6 | types: [started] |
13 | 7 |
|
14 | 8 | jobs: |
15 | 9 | build: |
16 | 10 | runs-on: windows-latest |
17 | 11 |
|
18 | | - if: github.actor == github.event.repository.owner.login |
19 | | - |
20 | 12 | steps: |
21 | | - - uses: actions/checkout@v2 |
| 13 | + - uses: actions/checkout@v2 |
22 | 14 |
|
23 | | - - name: Checkout harbour/core repo |
24 | | - uses: actions/checkout@v2 |
25 | | - with: |
26 | | - repository: harbour/core |
27 | | - path: harbour |
| 15 | + - name: Checkout harbour/core repo |
| 16 | + uses: actions/checkout@v2 |
| 17 | + with: |
| 18 | + repository: harbour/core |
| 19 | + path: harbour |
| 20 | + |
| 21 | + - name: Installing dependencies |
| 22 | + shell: cmd |
| 23 | + run: | |
| 24 | + choco install apache-httpd --params '"/installLocation:C:"' |
| 25 | + vcpkg.exe install curl:x64-windows |
| 26 | + vcpkg.exe install openssl:x64-windows |
| 27 | + vcpkg integrate install |
| 28 | + |
| 29 | + - name: Fixing Harbour hbssl.hbp |
| 30 | + run: | |
| 31 | + (Get-Content -path harbour\contrib\hbssl\hbssl.hbp) -replace 'libeay32','libcrypto' | Set-Content -path harbour\contrib\hbssl\hbssl.hbp |
| 32 | + (Get-Content -path harbour\contrib\hbssl\hbssl.hbp) -replace 'ssleay32','libssl' | Set-Content -path harbour\contrib\hbssl\hbssl.hbp |
| 33 | + (Get-Content -path harbour\contrib\hbssl\hbssl.hbc) -replace 'libeay32','libcrypto-1_1-x64' | Set-Content -path harbour\contrib\hbssl\hbssl.hbc |
| 34 | + (Get-Content -path harbour\contrib\hbssl\hbssl.hbc) -replace 'ssleay32','libssl-1_1-x64' | Set-Content -path harbour\contrib\hbssl\hbssl.hbc |
28 | 35 |
|
29 | | - - name: Install dependencies |
30 | | - run: | |
31 | | - choco install apache-httpd --params '"/installLocation:C:"' |
32 | | - choco install openssl |
33 | | - (new-object System.Net.WebClient).DownloadFile( 'https://curl.haxx.se/download/curl-7.70.0.zip', 'c:\temp\curl-7.70.0.zip') |
34 | | - Expand-Archive -LiteralPath 'c:\temp\curl-7.70.0.zip' -DestinationPath 'curl-7.70.0' -Force |
35 | | - (Get-Content -path harbour\contrib\hbssl\hbssl.hbp) -replace '/../inc32','' | Set-Content -path harbour\contrib\hbssl\hbssl.hbp |
36 | | - copy-Item 'c:\Program Files\OpenSSL-Win64' -destination 'c:\OpenSSL-Win64' -recurse |
37 | | - |
38 | | - - name: Build curl using msvc |
39 | | - shell: cmd |
40 | | - run: | |
41 | | - cd curl-7.70.0\curl-7.70.0\winbuild |
42 | | - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 |
43 | | - set MACHINE=x64 |
44 | | - nmake /f Makefile.vc mode=static |
45 | | - |
46 | | - - name: Compile Harbour |
47 | | - shell: cmd |
48 | | - run: | |
49 | | - 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 |
50 | | - cd harbour |
51 | | - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 |
52 | | - set HB_BUILD_MODE=c |
53 | | - set HB_USER_PRGFLAGS=-l- |
54 | | - set HB_BUILD_CONTRIBS= |
55 | | - set HB_WITH_OPENSSL=c:/OpenSSL-Win64/include |
56 | | - set HB_WITH_CURL=c:\curl-7.70.0\curl-7-70.0\builds\libcurl-vc-x64-release-static-ipv6-sspi-winssl\include |
57 | | - set HB_OPENSSL_STATIC= |
58 | | - set HB_STATIC_CURL=no |
59 | | - set HB_BUILD_DYN=no |
60 | | - set HB_BUILD_CONTRIB_DYN=no |
61 | | - set HB_COMPILER=msvc64 |
62 | | - win-make.exe |
63 | | - |
64 | | - - name: Compile mod_harbour |
65 | | - shell: cmd |
66 | | - run: | |
67 | | - cd windows |
68 | | - set oldpath=%Path% |
69 | | - set oldinclude=%INCLUDE% |
70 | | - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 |
71 | | - ..\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 |
72 | | - set Path=%oldpath% |
73 | | - set INCLUDE=%oldinclude% |
| 36 | + - name: Compile Harbour |
| 37 | + shell: cmd |
| 38 | + run: | |
| 39 | + cd harbour |
| 40 | + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 |
| 41 | + set HB_BUILD_MODE=c |
| 42 | + set HB_USER_PRGFLAGS=-l- |
| 43 | + set HB_BUILD_CONTRIBS= |
| 44 | + set HB_WITH_OPENSSL=c:\vcpkg\packages\openssl-windows_x64-windows\include\ |
| 45 | + set HB_WITH_CURL=c:\vcpkg\packages\curl_x64-windows\include |
| 46 | + set HB_OPENSSL_STATIC=yes |
| 47 | + set HB_STATIC_OPENSSL=yes |
| 48 | + set HB_STATIC_CURL=yes |
| 49 | + set HB_BUILD_DYN=no |
| 50 | + set HB_BUILD_CONTRIB_DYN=no |
| 51 | + set HB_COMPILER=msvc64 |
| 52 | + win-make.exe |
| 53 | + copy lib\win\msvc64\libcrypto-1_1-x64.lib lib\win\msvc64\libeay32.lib |
| 54 | + copy lib\win\msvc64\libssl-1_1-x64.lib lib\win\msvc64\ssleay32.lib |
| 55 | + |
| 56 | + - name: Compile mod_harbour |
| 57 | + shell: cmd |
| 58 | + run: | |
| 59 | + cd windows |
| 60 | + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 |
| 61 | + ..\harbour\bin\win\msvc64\hbmk2 modharbour.hbp -comp=msvc64 -Lc:\Apache24\lib -Lc:\vcpkg\packages\curl_x64-windows\lib |
74 | 62 | |
75 | | - - name: Create output folders |
76 | | - shell: cmd |
77 | | - run: | |
78 | | - mkdir output |
79 | | - mkdir output\samples |
80 | | - copy .\windows\mod_harbour.so output |
81 | | - copy .\windows\libharbour.dll output |
82 | | - copy .\windows\readme.md output |
83 | | - copy -r .\samples\* output\samples |
| 63 | + - name: Create output folders |
| 64 | + shell: cmd |
| 65 | + run: | |
| 66 | + mkdir output |
| 67 | + mkdir output\samples |
| 68 | + mkdir output\harbour |
| 69 | + copy .\windows\mod_harbour.so output |
| 70 | + copy .\windows\libharbour.dll output |
| 71 | + copy .\windows\readme.md output |
| 72 | + xcopy samples output\samples\ /E |
| 73 | + xcopy harbour output\harbour\ /E |
84 | 74 | |
85 | | - - name: Get current time |
86 | | - uses: srfrnk/current-time@master |
87 | | - id: current-time |
88 | | - with: |
89 | | - format: YYYY_MM_DD |
| 75 | + - name: Get current time |
| 76 | + uses: srfrnk/current-time@master |
| 77 | + id: current-time |
| 78 | + with: |
| 79 | + format: YYYY_MM_DD |
90 | 80 |
|
91 | | - - name: Upload mod_harbour to artifact |
92 | | - env: |
93 | | - TIME: "${{ steps.current-time.outputs.formattedTime }}" |
94 | | - uses: actions/upload-artifact@v2 |
95 | | - with: |
96 | | - name: modharbour_win64_msvc_${{ env.TIME }} |
97 | | - path: output |
| 81 | + - name: Upload mod_harbour to artifact |
| 82 | + env: |
| 83 | + TIME: "${{ steps.current-time.outputs.formattedTime }}" |
| 84 | + uses: actions/upload-artifact@v2 |
| 85 | + with: |
| 86 | + name: modharbour_win64_msvc_${{ env.TIME }} |
| 87 | + path: output |
0 commit comments