ARM64 #171
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: Windows | |
on: | |
pull_request: | |
paths: | |
- '**.c' | |
- '**.h' | |
- '**.sh' | |
- .github/workflows/windows.yml | |
- '**.am' | |
- '**.mak' | |
- configure.ac | |
push: | |
permissions: | |
contents: read # to fetch code (actions/checkout) | |
jobs: | |
build: | |
runs-on: ${{ matrix.image }} | |
strategy: | |
matrix: | |
platform: [x86, x64, arm64] | |
configuration: [Light, Release] | |
image: [windows-2019, windows-2022] | |
include: | |
- platform: x86 | |
setenv: amd64_x86 | |
- platform: x64 | |
setenv: amd64 | |
- platform: arm64 | |
setenv: amd64_arm64 | |
env: | |
OPENPACE_VER: 1.1.3 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install CPDK | |
run: choco install windows-cryptographic-provider-development-kit -y > $null | |
- name: Install autotools | |
uses: msys2/setup-msys2@v2 | |
with: | |
install: autotools mingw-w64-x86_64-pkg-config | |
- name: Bootstrap | |
shell: msys2 {0} | |
run: | | |
if [[ "${{ github.event_name }}" == "push" && "${{ github.ref_name }}" == "master" ]]; then | |
./bootstrap | |
elif [[ "${{ github.event_name }}" == "push" ]]; then | |
./bootstrap.ci -s "-${{ github.ref_name }}" | |
elif [[ "${{ github.event_name }}" == "pull_request" && "${{ github.base_ref }}" == "master" ]]; then | |
./bootstrap.ci -s "-pr${{ github.event.number }}" | |
else | |
./bootstrap.ci -s "-${{ github.base_ref }}-pr${{ github.event.number }}" | |
fi | |
- name: Configure | |
shell: bash | |
run: ./configure --disable-openssl --disable-readline --disable-zlib || cat config.log | |
- name: Setup dev env | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: ${{ matrix.setenv }} | |
- name: Prepare vcpkg | |
if: matrix.configuration == 'Release' | |
uses: lukka/run-vcpkg@v7 | |
with: | |
vcpkgArguments: zlib openssl | |
vcpkgGitCommitId: 511d74f695bd45959d12b50b00f1b68f69e8f0b0 | |
vcpkgTriplet: ${{ matrix.platform }}-windows-static | |
- name: Install WIX | |
run: powershell -ExecutionPolicy Bypass -File .github/setup-wix.ps1 | |
- name: Restore Cache | |
if: matrix.configuration == 'Release' | |
uses: actions/cache@v4 | |
id: cache | |
with: | |
path: openpace-${{ env.OPENPACE_VER }} | |
key: OpenPACE-${{ env.OPENPACE_VER }}-${{ matrix.image }}-${{ matrix.platform }} | |
- name: Build OpenPACE | |
if: matrix.configuration == 'Release' && steps.cache.outputs.cache-hit != 'true' | |
run: | | |
Invoke-WebRequest "https://github.com/frankmorgner/openpace/archive/${env:OPENPACE_VER}.zip" -OutFile openpace.zip | |
tar xf openpace.zip | |
cd openpace-${env:OPENPACE_VER}\src | |
cl /nologo /O1 /Zi /W3 /GS /MT /I${env:RUNVCPKG_VCPKG_ROOT}\installed\${env:RUNVCPKG_VCPKG_TRIPLET}\include /I. ` | |
/DX509DIR=`"/`" /DCVCDIR=`"/`" /D_CRT_SECURE_NO_DEPRECATE /DWIN32_LEAN_AND_MEAN ` | |
/DHAVE_ASN1_STRING_GET0_DATA /DHAVE_DECL_OPENSSL_ZALLOC /DHAVE_DH_GET0_KEY /DHAVE_DH_GET0_PQG ` | |
/DHAVE_DH_SET0_KEY /DHAVE_DH_SET0_PQG /DHAVE_ECDSA_SIG_GET0 /DHAVE_ECDSA_SIG_SET0 ` | |
/DHAVE_EC_KEY_METHOD /DHAVE_RSA_GET0_KEY /DHAVE_RSA_SET0_KEY /DHAVE_EC_POINT_GET_AFFINE_COORDINATES ` | |
/DHAVE_EC_POINT_SET_AFFINE_COORDINATES /DHAVE_EVP_PKEY_DUP /c ` | |
ca_lib.c cv_cert.c cvc_lookup.c x509_lookup.c eac_asn1.c eac.c eac_ca.c eac_dh.c ` | |
eac_ecdh.c eac_kdf.c eac_lib.c eac_print.c eac_util.c misc.c pace.c pace_lib.c ` | |
pace_mappings.c ri.c ri_lib.c ta.c ta_lib.c objects.c ssl_compat.c | |
lib /nologo /out:libeac.lib ` | |
ca_lib.obj cv_cert.obj cvc_lookup.obj x509_lookup.obj eac_asn1.obj eac.obj eac_ca.obj eac_dh.obj ` | |
eac_ecdh.obj eac_kdf.obj eac_lib.obj eac_print.obj eac_util.obj misc.obj pace.obj pace_lib.obj ` | |
pace_mappings.obj ri.obj ri_lib.obj ta.obj ta_lib.obj objects.obj ssl_compat.obj | |
- name: Set NMake Variables Light | |
if: matrix.configuration == 'Light' | |
run: | | |
echo "DIST_SUFFIX=-Light" >> $env:GITHUB_ENV | |
- name: Set NMake Variables Release | |
if: matrix.configuration == 'Release' | |
run: | | |
$VCPKG_DIR="${env:RUNVCPKG_VCPKG_ROOT}\installed\${env:RUNVCPKG_VCPKG_TRIPLET}" | |
echo "ZLIBSTATIC_DEF=/DENABLE_ZLIB_STATIC" >> $env:GITHUB_ENV | |
echo "ZLIB_INCL_DIR=/I${VCPKG_DIR}\include" >> $env:GITHUB_ENV | |
echo "ZLIB_LIB=${VCPKG_DIR}\lib\zlib.lib" >> $env:GITHUB_ENV | |
echo "OPENSSL_DEF=/DENABLE_OPENSSL" >> $env:GITHUB_ENV | |
echo "OPENSSL_DIR=${VCPKG_DIR}" >> $env:GITHUB_ENV | |
echo "OPENSSL_LIB=${VCPKG_DIR}\lib\libcrypto.lib" >> $env:GITHUB_ENV | |
echo "OPENSSL_EXTRA_CFLAGS=/DOPENSSL_SECURE_MALLOC_SIZE=65536" >> $env:GITHUB_ENV | |
echo "OPENPACE_DEF=/DENABLE_OPENPACE" >> $env:GITHUB_ENV | |
echo "OPENPACE_DIR=${env:GITHUB_WORKSPACE}\openpace-${env:OPENPACE_VER}" >> $env:GITHUB_ENV | |
- name: Build OpenSC | |
run: nmake /nologo /f Makefile.mak opensc.msi | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: msi_${{ matrix.image }}_${{ matrix.platform }}_${{ matrix.configuration }} | |
path: | | |
./**/*.msi | |
- name: Archive debug artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: debug_${{ matrix.image }}_${{ matrix.platform }}_${{ matrix.configuration }} | |
path: | | |
./src/**/*.pdb | |
!./src/**/vc*.pdb |