Add MSVC-based CI build
This commit is contained in:
5
.github/workflows/linux-ci.yml
vendored
5
.github/workflows/linux-ci.yml
vendored
@@ -6,9 +6,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Build and Test
|
||||
- name: Configure and Build
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug ..
|
||||
make -j2
|
||||
- name: Test
|
||||
run: |
|
||||
cd build
|
||||
make check
|
||||
|
23
.github/workflows/msvc-ci.yml
vendored
Normal file
23
.github/workflows/msvc-ci.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: MSVC-CI
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Configure and Build
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
cmake -G "Visual Studio 16 2019" -A Win32 ..
|
||||
cmake --build . --config Debug
|
||||
|
||||
# This should probably be fixed to work from MSVC without needing to
|
||||
# use a bash shell and the GNU userland tools... But for now, the
|
||||
# GH Actions environment provides what we need.
|
||||
- name: Test
|
||||
run: |
|
||||
cd build\Debug
|
||||
bash.exe ..\..\tests\all_tests.sh
|
||||
env:
|
||||
PYTHON_EXE: python.exe
|
@@ -9,6 +9,9 @@ find_package(PythonInterp REQUIRED)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wshadow -Werror ${CMAKE_CXX_FLAGS}")
|
||||
elseif(MSVC)
|
||||
set(CMAKE_CXX_FLAGS "/WX ${CMAKE_CXX_FLAGS}")
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
set(PYTHON_VERSIONS
|
||||
|
@@ -5,6 +5,10 @@ testdir="$srcdir/tests"
|
||||
testname="$1"
|
||||
outdir="$2"
|
||||
|
||||
if [[ -z "$PYTHON_EXE" ]]; then
|
||||
PYTHON_EXE="$(which python3)"
|
||||
fi
|
||||
|
||||
if [[ -z "$testname" ]]; then
|
||||
echo "Missing required parameter: testname" >&2
|
||||
exit 1
|
||||
@@ -51,7 +55,7 @@ for pyc in "${compfiles[@]}" "${xfcfiles[@]}"; do
|
||||
continue
|
||||
fi
|
||||
|
||||
"$srcdir"/scripts/token_dump "$base.src.py" 2>"$base.tok.err" 1>"$base.tok.txt"
|
||||
"$PYTHON_EXE" "$srcdir"/scripts/token_dump "$base.src.py" 2>"$base.tok.err" 1>"$base.tok.txt"
|
||||
if (( $? )) || [[ -s "$base.tok.err" ]]
|
||||
then
|
||||
if [[ "$(dirname "$pyc")" =~ xfail ]]
|
||||
|
Reference in New Issue
Block a user