|
| 1 | +name: Makefile CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | + |
| 7 | +env: |
| 8 | + OPENSSL_VERSION: 3.5.0 |
| 9 | + APR_VERSION: 1.7.6 |
| 10 | + NASM_VERSION: 2.16.03 |
| 11 | + |
| 12 | +jobs: |
| 13 | + build: |
| 14 | + strategy: |
| 15 | + fail-fast: false |
| 16 | + matrix: |
| 17 | + include: |
| 18 | + - name: Default |
| 19 | + triplet: x64-windows |
| 20 | + arch: x64 |
| 21 | + build-arch: X64 |
| 22 | + build-type: Debug |
| 23 | + generator: "Ninja" |
| 24 | + runs-on: windows-latest |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@v4 |
| 27 | + with: |
| 28 | + ref: trunk |
| 29 | + - name: Download Openssl using curl and Expand-Archive |
| 30 | + shell: pwsh |
| 31 | + run: | |
| 32 | + echo on |
| 33 | + curl -L -o openssl.zip https://github.com/openssl/openssl/archive/refs/tags/openssl-$env:OPENSSL_VERSION.zip |
| 34 | + Expand-Archive openssl.zip -DestinationPath . |
| 35 | + - name: Download and install strawberryperl |
| 36 | + shell: pwsh |
| 37 | + run: | |
| 38 | + echo on |
| 39 | + curl -L -o perl.msi https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_54021_64bit_UCRT/strawberry-perl-5.40.2.1-64bit.msi |
| 40 | + msiexec.exe /i perl.msi |
| 41 | + - name: Download and install nasm |
| 42 | + shell: pwsh |
| 43 | + run: | |
| 44 | + echo on |
| 45 | + echo "https://www.nasm.us/pub/nasm/releasebuilds/$env:NASM_VERSION/win64/nasm-$env:NASM_VERSION-win64.zip" |
| 46 | + curl -o nasm.zip https://www.nasm.us/pub/nasm/releasebuilds/$env:NASM_VERSION/win64/nasm-$env:NASM_VERSION-win64.zip |
| 47 | + Expand-Archive nasm.zip -DestinationPath . |
| 48 | + - name: Build Openssl using Nmake and nasm |
| 49 | + shell: cmd |
| 50 | + run: | |
| 51 | + echo on |
| 52 | + echo %CD% |
| 53 | + set PATH=%PATH%;%CD%\nasm-%NASM_VERSION% |
| 54 | + dir %CD%\nasm-%NASM_VERSION% |
| 55 | + cd openssl-openssl-%OPENSSL_VERSION% |
| 56 | + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }} |
| 57 | + C:\strawberry\perl\bin\perl Configure no-shared VC-WIN64A --prefix=C:\OPENSSL |
| 58 | + nmake |
| 59 | + nmake install |
| 60 | + - name: Download apr using curl and Expand-Archive |
| 61 | + shell: pwsh |
| 62 | + run: | |
| 63 | + echo on |
| 64 | + curl -L -o apr.zip https://github.com/apache/apr/archive/refs/tags/$env:APR_VERSION.zip |
| 65 | + Expand-Archive apr.zip |
| 66 | + cd apr\apr-$env:APR_VERSION |
| 67 | + (Get-Content .\include\apr.hw).Replace('0x0501', '0x0600') | Set-Content .\include\apr.hw |
| 68 | + - name: Build apr using Nmake |
| 69 | + shell: cmd |
| 70 | + run: | |
| 71 | + echo on |
| 72 | + cd apr\apr-%APR_VERSION% |
| 73 | + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }} |
| 74 | + nmake -f Makefile.win ARCH="x64 Release" buildall PREFIX=C:\APR |
| 75 | + nmake -f Makefile.win ARCH="x64 Release" install PREFIX=C:\APR |
| 76 | + mkdir C:\APR\include\arch\win32 |
| 77 | + copy include\arch\win32\*.h c:\APR\include\arch\win32 |
| 78 | + copy include\arch\*.h c:\APR\include\arch |
| 79 | + - name: Build using Nmake |
| 80 | + shell: cmd |
| 81 | + run: | |
| 82 | + echo on |
| 83 | + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }} |
| 84 | + cd native |
| 85 | + echo "Building for ${{ matrix.build-arch }}" |
| 86 | + nmake -f NMAKEmakefile CPU=${{ matrix.build-arch }} WITH_APR=C:\APR WITH_OPENSSL=C:\OPENSSL APR_DECLARE_STATIC=1 STATIC_CRT=Hybrid OPENSSL_NEW_LIBS=1 ENABLE_OCSP=1 |
0 commit comments