Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Ensure cert/key files always use LF line endings so that hashes
# remain consistent across platforms.
*.pem eol=lf
*.cnf eol=lf
*.cfg eol=lf

# DER files are binary and must never be transformed.
*.der binary
75 changes: 75 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: CI

on:
push:
branches: ['*']
pull_request:
branches: ['*']

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
config:
- '--enable-wolfclu'
- '--enable-wolfclu --enable-crl --enable-dsa --enable-pkcs7'
- '--enable-wolfclu --enable-smallstack'
- '--enable-wolfclu --enable-experimental --enable-dilithium'
- '--enable-wolfclu --enable-smallstack --enable-experimental --enable-dilithium'
- '--enable-all'
sanitize: ['', 'CC="cc -fsanitize=address"']

name: ${{ matrix.os }} ${{ matrix.sanitize && 'ASAN' || '' }} (${{ matrix.config }})
runs-on: ${{ matrix.os }}
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
with:
path: wolfclu

- uses: actions/checkout@v4
with:
repository: wolfssl/wolfssl
ref: master
path: wolfssl

- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get install -y openssl
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: brew install automake libtool

- name: Build and install wolfSSL
working-directory: ./wolfssl
run: |
./autogen.sh
./configure ${{ matrix.config }} ${{ matrix.sanitize }} --prefix=$GITHUB_WORKSPACE/build-dir
make -j
make install
- name: Build wolfCLU
working-directory: ./wolfclu
run: |
./autogen.sh
./configure ${{ matrix.sanitize }} --with-wolfssl=$GITHUB_WORKSPACE/build-dir
make -j
- name: Run tests
working-directory: ./wolfclu
env:
LD_LIBRARY_PATH: ${{ github.workspace }}/build-dir/lib
DYLD_LIBRARY_PATH: ${{ github.workspace }}/build-dir/lib
run: make check

- name: Display log
if: always()
working-directory: ./wolfclu
run: cat test-suite.log || true
91 changes: 0 additions & 91 deletions .github/workflows/fsanitize-check.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/macos-check.yml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/ubuntu-check.yml

This file was deleted.

95 changes: 44 additions & 51 deletions .github/workflows/windows-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,56 @@ name: Windows Build Test

on:
push:
branches: [ '*' ]
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: wolfclu.sln
USER_SETTINGS_H_NEW: wolfclu/ide/winvs/user_settings.h
USER_SETTINGS_H: wolfssl/IDE/WIN/user_settings.h
INCLUDE_DIR: wolfclu

# 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
branches: ['*']

jobs:
build:
runs-on: windows-latest
timeout-minutes: 10

env:
BUILD_PLATFORM: x64
BUILD_CONFIGURATION: Release

steps:
- uses: actions/checkout@v2
with:
repository: wolfssl/wolfssl
path: wolfssl

- uses: actions/checkout@master
with:
path: wolfclu

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1
- uses: actions/checkout@v4
with:
repository: wolfssl/wolfssl
ref: master
path: wolfssl

- uses: actions/checkout@v4
with:
path: wolfclu

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Replace user_settings.h
run: cp wolfclu/ide/winvs/user_settings.h wolfssl/IDE/WIN/user_settings.h

- name: Detect platform toolset
id: toolset
run: |
$major = (vswhere -latest -property installationVersion).Split('.')[0]
$toolsets = @{ "16" = "v142"; "17" = "v143"; "18" = "v145" }
$ts = $toolsets[$major]
if (-not $ts) {
Write-Error "Unsupported Visual Studio major version '$major'."
exit 1
}
echo "value=$ts" >> $env:GITHUB_OUTPUT

- name: Build wolfSSL
run: msbuild /m /p:PlatformToolset=${{ steps.toolset.outputs.value }} /p:Platform=${{ env.BUILD_PLATFORM }} /p:Configuration=${{ env.BUILD_CONFIGURATION }} wolfssl/wolfssl64.sln

- name: Build wolfCLU
working-directory: wolfclu
run: msbuild /m /p:Platform=${{ env.BUILD_PLATFORM }} /p:Configuration=${{ env.BUILD_CONFIGURATION }} wolfclu.sln

- name: Restore wolfSSL NuGet packages
working-directory: ${{env.GITHUB_WORKSPACE}}
run: nuget restore ${{env.WOLFSSL_SOLUTION_FILE_PATH}}

- name: replace with wolfCLU 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: Run tests
working-directory: wolfclu
run: python tests/run_tests.py

- name: Restore NuGet packages
working-directory: ${{env.GITHUB_WORKSPACE}}wolfclu
run: nuget restore ${{env.SOLUTION_FILE_PATH}}

- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}wolfclu
# 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}}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,8 @@ src/stamp-h1
.project
.settings/
AGENTS.md
Win32/
x64/
.vs/
__pycache__/
CLAUDE.md
Loading
Loading