From 2a933daf9de06ef2fe4330587e9d9ff6ce8c64e3 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Fri, 2 Feb 2024 10:38:10 -0700 Subject: [PATCH] add windows github action build test --- .github/workflows/windows-check.yml | 74 +++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 .github/workflows/windows-check.yml diff --git a/.github/workflows/windows-check.yml b/.github/workflows/windows-check.yml new file mode 100644 index 000000000..762efbb87 --- /dev/null +++ b/.github/workflows/windows-check.yml @@ -0,0 +1,74 @@ +name: Windows Build Test + +on: + push: + branches: [ '*' ] + pull_request: + branches: [ '*' ] + +env: + # Path to the solution file relative to the root of the project. + WOLFSSL_SOLUTION_FILE_PATH: wolfssl/wolfssl64.sln + SOLUTION_FILE_PATH: wolfssh.sln + USER_SETTINGS_H_NEW: wolfssh/ide/winvs/user_settings.h + USER_SETTINGS_H: wolfssl/IDE/WIN/user_settings.h + INCLUDE_DIR: wolfssh + + # Configuration type to build. + # You can convert this to a build matrix if you need coverage of multiple configuration types. + # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + WOLFSSL_BUILD_CONFIGURATION: Release + WOLFCLU_BUILD_CONFIGURATION: Release + BUILD_PLATFORM: x64 + TARGET_PLATFORM: 10 + +jobs: + build: + runs-on: windows-latest + matrix: + include: + default: 0 + all: 1 + + steps: + - uses: actions/checkout@v2 + with: + repository: wolfssl/wolfssl + path: wolfssl + + - uses: actions/checkout@master + with: + path: wolfssh + + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v1 + + - name: Restore wolfSSL NuGet packages + working-directory: ${{env.GITHUB_WORKSPACE}} + run: nuget restore ${{env.WOLFSSL_SOLUTION_FILE_PATH}} + + - if: ${{ matrix.all }} + shell: powershell + working-directory: ${{env.GITHUB_WORKSPACE}} + run: get-content ${{env.USER_SETTINGS_H_NEW}} | %{$_ -replace "if 0","if 1"} + + - name: replace with wolfSSH user_settings.h + working-directory: ${{env.GITHUB_WORKSPACE}} + run: cp ${{env.USER_SETTINGS_H_NEW}} ${{env.USER_SETTINGS_H}} + + - name: Build wolfssl + working-directory: ${{env.GITHUB_WORKSPACE}} + # Add additional options to the MSBuild command line here (like platform or verbosity level). + # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference + run: msbuild /m /p:PlatformToolset=v142 /p:Platform=${{env.BUILD_PLATFORM}} /p:WindowsTargetPlatformVersion=${{env.TARGET_PLATFORM}} /p:Configuration=${{env.WOLFSSL_BUILD_CONFIGURATION}} ${{env.WOLFSSL_SOLUTION_FILE_PATH}} + + - name: Restore NuGet packages + working-directory: ${{env.GITHUB_WORKSPACE}}wolfclu + run: nuget restore ${{env.SOLUTION_FILE_PATH}} + + - name: Build wolfssh + working-directory: ${{env.GITHUB_WORKSPACE}}wolfssh + # Add additional options to the MSBuild command line here (like platform or verbosity level). + # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference + run: msbuild /m /p:PlatformToolset=v142 /p:Platform=${{env.BUILD_PLATFORM}} /p:WindowsTargetPlatformVersion=${{env.TARGET_PLATFORM}} /p:Configuration=${{env.WOLFCLU_BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} +