mirror of
https://github.com/open-quantum-safe/liboqs.git
synced 2025-10-04 00:02:01 -04:00
ci: github actions CI for Windows x86 and x64 (#1554)
* ci: add windows x86 builds * ci: run windows tests
This commit is contained in:
parent
e6c650c2ef
commit
007219c347
12
.CMake/toolchain_windows_amd64.cmake
Normal file
12
.CMake/toolchain_windows_amd64.cmake
Normal file
@ -0,0 +1,12 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
|
||||
set(CMAKE_SYSTEM_PROCESSOR AMD64)
|
||||
|
||||
set(CMAKE_CROSSCOMPILING OFF)
|
||||
|
||||
set(CMAKE_GENERATOR_PLATFORM
|
||||
x64
|
||||
CACHE STRING "Platform" FORCE
|
||||
)
|
12
.CMake/toolchain_windows_x86.cmake
Normal file
12
.CMake/toolchain_windows_x86.cmake
Normal file
@ -0,0 +1,12 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86)
|
||||
|
||||
set(CMAKE_CROSSCOMPILING OFF)
|
||||
|
||||
set(CMAKE_GENERATOR_PLATFORM
|
||||
Win32
|
||||
CACHE STRING "Platform" FORCE
|
||||
)
|
18
.github/workflows/windows.yml
vendored
18
.github/workflows/windows.yml
vendored
@ -12,3 +12,21 @@ jobs:
|
||||
run: cmake -B build --toolchain .CMake/toolchain_windows_arm64.cmake .
|
||||
- name: Build Project
|
||||
run: cmake --build build
|
||||
|
||||
windows-x86:
|
||||
runs-on: windows-2022
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
toolchain: [.CMake/toolchain_windows_x86.cmake, .CMake/toolchain_windows_amd64.cmake]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Generate Project
|
||||
run: cmake -B build --toolchain ${{ matrix.toolchain }} .
|
||||
- name: Build Project
|
||||
run: cmake --build build
|
||||
- name: Test dependencies
|
||||
run: pip.exe install pytest pytest-xdist pyyaml
|
||||
- name: Run tests
|
||||
run: |
|
||||
python -m pytest --numprocesses=auto -vv --maxfail=10 --ignore=tests/test_code_conventions.py --junitxml=build\test-results\pytest\test-results.xml
|
||||
|
@ -141,6 +141,9 @@ def path_to_executable(program_name):
|
||||
if 'APPVEYOR_BUILD_FOLDER' not in os.environ: os.environ['APPVEYOR_BUILD_FOLDER'] = "."
|
||||
path = os.path.join(path, os.environ['APPVEYOR_BUILD_FOLDER'])
|
||||
path = os.path.join(path, get_current_build_dir_name(), "tests")
|
||||
if sys.platform.startswith("win"):
|
||||
if 'GITHUB_ACTIONS' in os.environ:
|
||||
path = os.path.join(path, "Debug")
|
||||
for executable in [
|
||||
os.path.join(path, program_name),
|
||||
os.path.join(path, program_name + ".EXE"),
|
||||
|
@ -11,11 +11,19 @@
|
||||
#define MAXPATHLEN 128
|
||||
|
||||
#if (defined(_WIN32) || defined(__WIN32__))
|
||||
#define mkdir(A, B) mkdir(A)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
static OQS_STATUS oqs_fstore_init(void) {
|
||||
#ifndef _WIN32
|
||||
return mkdir(OQS_STORE_DIR, 0755);
|
||||
#else
|
||||
if (CreateDirectory(OQS_STORE_DIR, NULL)) {
|
||||
return OQS_SUCCESS;
|
||||
} else {
|
||||
return OQS_ERROR;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static OQS_STATUS oqs_fstore(const char *fname, const char *mname, uint8_t *data, size_t len) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user