Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSVC support, CI github Actions windows-2019 #2098

Merged
merged 89 commits into from
Mar 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
e22e198
github windows CI
quentin Jul 21, 2021
2b6bdfb
build on Windows with CMake + MSVC
quentin Jul 21, 2021
bb44010
format
quentin Jul 21, 2021
cca53ed
disable profile test on MSVC
quentin Jul 21, 2021
a9499ee
remove imcompatible compiler options
quentin Jul 21, 2021
49b1a41
standard exception handling
quentin Jul 21, 2021
0b06d6c
not constexpr
quentin Jul 21, 2021
17027e2
fix conversion
quentin Jul 21, 2021
0a877ce
intrinsics
quentin Jul 21, 2021
aca8b09
intrinsics
quentin Jul 21, 2021
6e977be
intrinsics
quentin Jul 21, 2021
c851de9
intrinsics
quentin Jul 21, 2021
3d3ba4c
intrinsics
quentin Jul 21, 2021
e10a17d
temporarily restricts CI
quentin Jul 22, 2021
bb76b8f
unistd.h
quentin Jul 22, 2021
e421a7a
STDERR_FILENO
quentin Jul 22, 2021
5656613
inline functions
quentin Jul 22, 2021
439b16a
fix yaml
quentin Jul 22, 2021
8716501
fix xml
quentin Jul 22, 2021
93b38e8
fix choco packages
quentin Jul 22, 2021
6509c78
dependencies, tests
quentin Jul 22, 2021
7fae615
getopt_long test, fixes
quentin Jul 22, 2021
441f4c6
fix getopt_long_test
quentin Jul 22, 2021
419c29f
ctest command
quentin Jul 22, 2021
195d76e
disable a getopt_long testcase
quentin Jul 22, 2021
78600e7
disable testing with MSVC
quentin Jul 22, 2021
733e4f1
format
quentin Jul 22, 2021
e96f23a
add getopt test in CMakeLists
quentin Sep 1, 2021
953e5a2
run CI on push
quentin Sep 1, 2021
93c320f
some fixes
quentin Sep 1, 2021
764ed07
fixes
quentin Sep 1, 2021
f0dae0c
fixes
quentin Oct 10, 2021
8be7acf
fixes
quentin Oct 11, 2021
adb0088
fixes
quentin Oct 11, 2021
daad62b
unistd.h sys/wait.h
quentin Oct 11, 2021
cc1952b
SubProcess::execute
quentin Oct 11, 2021
1b52205
fixes
quentin Oct 11, 2021
33f98af
execute new GH action during development
quentin Oct 11, 2021
226b334
fix brie_test
quentin Oct 12, 2021
e03630e
fix 32bits disjoint_set_property_test
quentin Oct 12, 2021
d0fde5d
restart actions
quentin Oct 12, 2021
34bbefa
include for YieldProcessor
quentin Oct 16, 2021
98ab3f9
replace sh scripts with ruby scripts for portability
quentin Oct 20, 2021
fe7f947
more fixes to pass tests
quentin Oct 22, 2021
59d7dfb
generate a json file with compilation flags and options
quentin Oct 22, 2021
89f6fda
lot of fixes for windows
quentin Nov 2, 2021
6e1d3c2
some fixes
quentin Nov 16, 2021
770b758
more fixes
quentin Nov 17, 2021
fb335fb
reformat
quentin Nov 17, 2021
11f237a
fix souffle-compile.rb
quentin Jan 6, 2022
22e3983
fix issue with Choco
quentin Jan 6, 2022
ffc11f6
clause_visit_in_progress only available in DEBUG
quentin Jan 6, 2022
e76b088
remove deprecated derivation of `std::iterator`
quentin Jan 6, 2022
47c440e
fix size_t to int conversion
quentin Jan 6, 2022
bf8b9c6
allow more tests to run on Windows
quentin Jan 6, 2022
1bf7a25
OpenMP `reduction` availability
quentin Jan 6, 2022
440aaa2
tests must find libraries
quentin Jan 7, 2022
1d8f279
pass more tests
quentin Jan 7, 2022
ea85840
use python scripts
quentin Jan 10, 2022
b25fb26
more fixes about loading functor libraries
quentin Jan 11, 2022
91a297e
MSVC preprocessor preserve all whitespaces
quentin Jan 12, 2022
5c6ffa5
cannot use `_Pragma` identifier with MSVC preprocessor
quentin Jan 12, 2022
2720810
reduce MAX_INSTANTIATION_DEPTH
quentin Jan 12, 2022
5d18a8c
disable some syntaxic tests
quentin Jan 12, 2022
fc1b3d4
fix non-deterministic behavior in semantics checker
quentin Jan 13, 2022
a923a65
`magic_nqueen` stack-overflow in Debug with VS
quentin Jan 13, 2022
f4a43e1
formatting
quentin Jan 12, 2022
fbe6e17
MacOS fix
quentin Jan 12, 2022
fadd3cd
formatting
quentin Jan 13, 2022
cca86d3
fix non-deterministic behavior in semantics checker
quentin Jan 13, 2022
93e9240
test `load6` needs zlib
quentin Jan 13, 2022
4d51ba2
test has non-deterministic behavior in semantics checker
quentin Jan 13, 2022
757208a
remove Ruby scripts and generation of old souffle-compile
quentin Jan 24, 2022
431ae10
support tests of SWIG python
quentin Jan 24, 2022
a835740
support tests of SWIG Java
quentin Jan 24, 2022
f20891e
cancel workflow for VS-CI-Tests
quentin Jan 25, 2022
bb55902
remove bash scripts replaced by python scripts
quentin Jan 25, 2022
8813d61
add python3 dependencies
quentin Jan 25, 2022
73ec369
add copyright notice to python scripts
quentin Jan 25, 2022
3bd42ca
copyright notices
quentin Jan 25, 2022
107027b
cleanup
quentin Jan 25, 2022
ef5c591
use windows-2019
quentin Mar 4, 2022
2a617f3
fix getopt_long implementation
quentin Mar 5, 2022
5681e85
fixes
quentin Mar 5, 2022
195cff7
formatting
quentin Mar 5, 2022
a9a6587
fix ram arithmetic test
quentin Mar 6, 2022
70bb49d
windows CI tests with only 2 jobs
quentin Mar 6, 2022
c2eb17c
formatting
quentin Mar 6, 2022
4dff141
formatting
quentin Mar 6, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/images/arch-linux/PKGBUILD.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ arch=('any')
url="https://github.com/souffle-lang/souffle"
license=('UPL')
groups=()
depends=('mcpp' 'gcc>=8' 'openmp' 'sqlite')
makedepends=('git' 'cmake>=3.15' 'bison>=3.0.4' 'flex' 'libffi' 'ncurses' 'zlib')
depends=('mcpp' 'gcc>=8' 'openmp' 'sqlite' 'python3')
makedepends=('git' 'cmake>=3.15' 'bison>=3.0.4' 'flex' 'libffi' 'ncurses' 'zlib' 'python3')
optdepends=('bash-completion')
provides=('souffle')
conflicts=('souffle-git')
Expand Down
76 changes: 76 additions & 0 deletions .github/workflows/VS-CI-Tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: VS-CI-Tests

on:
# TODO remove me before merge
push:
branches:
- '**'
Comment on lines +4 to +7
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be removed before merge

pull_request:
types: [opened, synchronize]
workflow_dispatch:

env:
CHOCO_CACHE_DIR: "${{ github.workspace }}/choco-cache"

jobs:

Windows-CMake-MSVC:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2

- name: Dependencies Cache
uses: actions/cache@v2
env:
cache-name: cache-chocolatey
with:
# cache Chocolatey packages to speed-up the deployment.
path: |
${{ env.CHOCO_CACHE_DIR }}
key: windows-${{ hashFiles('choco-packages.config') }}

# Use Chocolatey to install binary dependencies.
- name: Binary Dependencies (Chocolatey)
run: |
choco config set cacheLocation ${{ env.CHOCO_CACHE_DIR }}
choco install choco-packages.config --no-progress --installargs 'ADD_CMAKE_TO_PATH=""System""'

# Use vcpkg to install devel library dependencies.
- name: Library Dependencies (vcpkg)
uses: lukka/run-vcpkg@v7
with:
vcpkgGitCommitId: '3a28333d605f92f8659f3af1137324b2d9886101'
vcpkgTriplet: x64-windows
vcpkgArguments: 'sqlite3 zlib libffi'

- name: Create Build Directory
working-directory: ${{github.workspace}}
run: mkdir build

- name: Configure Build
working-directory: ${{github.workspace}}
run: |
$env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Path)\..\.."
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
refreshenv
cmake -S . -B build -G "Visual Studio 16 2019" -A x64 "-DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=/bigobj -DSOUFFLE_DOMAIN_64BIT=ON -DCMAKE_FIND_LIBRARY_PREFIXES=";lib" -DCMAKE_FIND_LIBRARY_SUFFIXES=".lib;.dll" -DSOUFFLE_USE_CURSES=OFF -DSOUFFLE_USE_ZLIB=ON -DCMAKE_FIND_DEBUG_MODE=FALSE -DSOUFFLE_BASH_COMPLETION=OFF

- name: Build
working-directory: ${{github.workspace}}
run: cmake --build build --config Release -j4

# Run the tests, Visual Studio must be in the environment because cl.exe is required for compiled Souffle.
- name: Check interpreter
working-directory: ${{github.workspace}}/build
shell: cmd
run: |
pushd "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build" & call vcvars64.bat & popd
ctest --output-on-failure --build-config Release --progress -j4 -L interpreted

- name: Check others
working-directory: ${{github.workspace}}/build
shell: cmd
run: |
pushd "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build" & call vcvars64.bat & popd
ctest --output-on-failure --build-config Release --progress -j2 -LE interpreted

2 changes: 1 addition & 1 deletion .github/workflows/cancel.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Cancel
on:
workflow_run:
workflows: ["CI-Tests"]
workflows: ["CI-Tests", "VS-CI-Tests"]
types:
- requested
jobs:
Expand Down
64 changes: 42 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ option(SOUFFLE_GENERATE_DOXYGEN "Generate Doxygen files (html;htmlhelp;man;rtf;x
option(SOUFFLE_CODE_COVERAGE "Enable coverage reporting" OFF)
option(SOUFFLE_BASH_COMPLETION "Enable/Disable bash completion" OFF)
option(SOUFFLE_USE_LIBFFI "Enable/Disable use of libffi" ON)
option(SOUFFLE_CUSTOM_GETOPTLONG "Enable/Disable custom getopt_long implementation" OFF)

cmake_dependent_option(SOUFFLE_USE_LIBCPP "Link to libc++ instead of libstdc++" ON
"CMAKE_CXX_COMPILER_ID STREQUAL Clang" OFF)
Expand All @@ -120,6 +121,24 @@ if (SOUFFLE_USE_LIBCPP)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lc++abi")
endif()

if (WIN32)
# Search libraries with and without 'lib' prefix.
set(CMAKE_FIND_LIBRARY_PREFIXES ";lib")

# Prefix all shared libraries with 'lib'.
set(CMAKE_SHARED_LIBRARY_PREFIX "lib")

# Prefix all static libraries with 'lib'.
set(CMAKE_STATIC_LIBRARY_PREFIX "lib")

SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${OUTPUT_DIRECTORY}")
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${OUTPUT_DIRECTORY}")
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${OUTPUT_DIRECTORY}")
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${OUTPUT_DIRECTORY}")
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${OUTPUT_DIRECTORY}")
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${OUTPUT_DIRECTORY}")
endif ()

# --------------------------------------------------
# curses libraries for Provenance information
# --------------------------------------------------
Expand Down Expand Up @@ -147,7 +166,7 @@ if (SOUFFLE_SWIG_PYTHON OR SOUFFLE_SWIG_JAVA)
find_package(SWIG REQUIRED)

if (SOUFFLE_SWIG_PYTHON)
find_package(Python "3.7" REQUIRED)
find_package(Python3 3.7 REQUIRED)
endif()

if (SOUFFLE_SWIG_JAVA)
Expand Down Expand Up @@ -218,7 +237,10 @@ endif()
# libffi
# --------------------------------------------------
if (SOUFFLE_USE_LIBFFI)
find_package(LibFFI REQUIRED)
find_package(libffi CONFIG QUIET)
if (NOT libffi_FOUND)
find_package(LibFFI REQUIRED)
endif()
endif()

# --------------------------------------------------
Expand All @@ -232,11 +254,6 @@ find_package(Threads REQUIRED)
# --------------------------------------------------
if (SOUFFLE_USE_OPENMP)
find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
endif()

# --------------------------------------------------
Expand Down Expand Up @@ -338,6 +355,7 @@ endif(SOUFFLE_CODE_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
add_subdirectory(src)

if (SOUFFLE_ENABLE_TESTING)
find_package(Python3 3.7 REQUIRED)
add_subdirectory(src/tests)
add_subdirectory(tests)
endif()
Expand Down Expand Up @@ -367,6 +385,7 @@ IF (SOUFFLE_BASH_COMPLETION)
endif()


if (NOT WIN32)
# --------------------------------------------------
# CPack configuration
# --------------------------------------------------
Expand Down Expand Up @@ -396,7 +415,7 @@ if (CHECK_OS_RESULT EQUAL 0)
# --------------------------------------------------

# Specifying runtime dependencies
set(CPACK_DEBIAN_PACKAGE_DEPENDS "g++ (>= 8), libffi-dev, libncurses5-dev, libsqlite3-dev, mcpp, zlib1g-dev")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "g++ (>= 8), libffi-dev, libncurses5-dev, libsqlite3-dev, mcpp, zlib1g-dev, python3")

# Auto-generate any runtime dependencies that are required
SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
Expand All @@ -407,22 +426,23 @@ if (CHECK_OS_RESULT EQUAL 0)
endif()

if (CHECK_OS_OUTPUT MATCHES "FEDORA" OR CHECK_OS_OUTPUT MATCHES "CENTOS")
SET(CPACK_RPM_PACKAGE_GROUP "Unspecified")
SET(CPACK_RPM_PACKAGE_LICENSE "UPL-1.0 License")
SET(CPACK_RPM_PACKAGE_VENDOR "Souffle-lang")
SET(CPACK_RPM_PACKAGE_GROUP "Unspecified")
SET(CPACK_RPM_PACKAGE_LICENSE "UPL-1.0 License")
SET(CPACK_RPM_PACKAGE_VENDOR "Souffle-lang")

# Generate both DEB and RPM packages
SET(CPACK_GENERATOR "RPM")
# Generate both DEB and RPM packages
SET(CPACK_GENERATOR "RPM")

# --------------------------------------------------
# Variables relevent to RPM packages
# --------------------------------------------------
# --------------------------------------------------
# Variables relevent to RPM packages
# --------------------------------------------------

# Specifying runtime dependencies
set(CPACK_RPM_PACKAGE_REQUIRES "gcc-c++ >= 8, libffi, libffi-devel, ncurses-devel, sqlite-devel, mcpp, zlib-devel")
# Specifying runtime dependencies
set(CPACK_RPM_PACKAGE_REQUIRES "gcc-c++ >= 8, libffi, libffi-devel, ncurses-devel, sqlite-devel, mcpp, zlib-devel, python3")

# Note: By default automatic dependency detection is enabled by rpm generator.
# SET(CPACK_RPM_PACKAGE_AUTOREQPROV "no")
INCLUDE(CPack)
endif()
# Note: By default automatic dependency detection is enabled by rpm generator.
# SET(CPACK_RPM_PACKAGE_AUTOREQPROV "no")
INCLUDE(CPack)
endif()
endif()
endif()
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ domain-specific language for analysis problems.

[![License: UPL](https://img.shields.io/badge/License-UPL--1.0-blue.svg)](https://github.com/souffle-lang/souffle/blob/master/LICENSE)
[![CI-Tests](https://github.com/souffle-lang/souffle/actions/workflows/CI-Tests.yml/badge.svg)](https://github.com/souffle-lang/souffle/actions/workflows/CI-Tests.yml)
[![MSVC-CI-Tests](https://github.com/souffle-lang/souffle/actions/workflows/VS-CI-Tests.yml/badge.svg)](https://github.com/souffle-lang/souffle/actions/workflows/VS-CI-Tests.yml)
[![codecov](https://codecov.io/gh/souffle-lang/souffle/branch/master/graph/badge.svg)](https://codecov.io/gh/souffle-lang/souffle)

## Features of Soufflé
Expand Down
6 changes: 6 additions & 0 deletions choco-packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="winflexbison3"/>
<package id="sqlite"/>
<package id="cmake" version="3.21.3"/>
</packages>