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

DILL upstream #3118

Merged
merged 2 commits into from
Mar 21, 2022
Merged
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
116 changes: 100 additions & 16 deletions thirdparty/dill/dill/.github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,115 @@
on:
push:
branches:
- master
pull_request:
branches:
- master
name: Build and Test

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
ci:
runs-on: ${{ matrix.os-image }}
linux:
# The jobs should run pretty quick; anything over 30m essentially means
# someting is stuck somewhere
timeout-minutes: 30
runs-on: ubuntu-latest
container: ${{ matrix.container }}
env:
GH_YML_JOBNAME: ${{ matrix.os }}-${{ matrix.compiler }}
GH_YML_BUILDTYPE: ${{ matrix.buildtype }}
GH_YML_SHA: ${{ github.event.pull_request.head.sha || github.sha }}

strategy:
fail-fast: false
matrix:
os-image: [ubuntu-latest, macos-latest]
buildtype: [ release, debug ]
os: [ centos7, centos8, ubuntu1604, ubuntu1804, ubuntu2004 ]
compiler: [ clang, gcc, nvhpc ]
exclude:
- { os: centos8, compiler: nvhpc }
- { os: ubuntu1604, compiler: nvhpc }
- { os: ubuntu1804, compiler: nvhpc }
include:
- os: centos7
container: centos:7
- os: centos8
container: centos:8
- os: ubuntu1604
container: ubuntu:16.04
- os: ubuntu1804
container: ubuntu:18.04
- os: ubuntu2004
container: ubuntu:20.04
- os: centos7
compiler: nvhpc
container: nvcr.io/nvidia/nvhpc:21.2-devel-cuda11.2-centos7
- os: ubuntu2004
compiler: nvhpc
container: nvcr.io/nvidia/nvhpc:21.2-devel-cuda11.2-ubuntu20.04

steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
path: source
- name: Setup
run: source/scripts/ci/setup/linux.sh
- name: Update
run: source/scripts/ci/gh-actions/run.sh update
- name: Configure
run: source/scripts/ci/gh-actions/run.sh configure
- name: Build
run: source/scripts/ci/gh-actions/run.sh build
- name: Test
run: source/scripts/ci/gh-actions/run.sh test

mac_and_windows:
# The jobs should run pretty quick; anything over 30m essentially means
# someting is stuck somewhere
timeout-minutes: 30
runs-on: ${{ matrix.vm }}
env:
GH_YML_JOBNAME: ${{ matrix.jobname }}
GH_YML_BUILDTYPE: ${{ matrix.buildtype }}
GH_YML_SHA: ${{ github.event.pull_request.head.sha || github.sha }}

strategy:
fail-fast: false
matrix:
buildtype: [ release, debug ]
jobname: [
# windows-vs2019-msvc,
windows-vs2019-clang,
macos-clang ]
include:
#- jobname: windows-vs2019-msvc
# vm: windows-latest
- jobname: windows-vs2019-clang
vm: windows-latest
- jobname: macos-clang
vm: macos-latest

defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
path: source
- name: Setup
if: ${{ runner.os == 'Windows' }}
run: source/scripts/ci/setup/windows.sh
- name: Setup
run: ci/gh-actions/setup.sh
if: ${{ runner.os == 'macOS' }}
run: source/scripts/ci/setup/macos.sh
- name: Update
run: source/scripts/ci/gh-actions/run.sh update
- name: Configure
run: ci/gh-actions/run.sh configure
run: source/scripts/ci/gh-actions/run.sh configure
- name: Build
run: ci/gh-actions/run.sh build
run: source/scripts/ci/gh-actions/run.sh build
- name: Test
run: ci/gh-actions/run.sh test
- name: Install
run: ci/gh-actions/run.sh install
run: source/scripts/ci/gh-actions/run.sh test
15 changes: 15 additions & 0 deletions thirdparty/dill/dill/.github/workflows/triggers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Triggers

on:
workflow_run:
workflows: ["Build and Test"]
types: [requested]

jobs:
all_triggers:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Post CDash Status
run: scripts/ci/scripts/post-cdash-status.sh ${{ github.event.repository.full_name }} ${{ github.event.workflow_run.head_sha }} ${{ secrets.GITHUB_TOKEN }}
38 changes: 36 additions & 2 deletions thirdparty/dill/dill/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
cmake_minimum_required(VERSION 3.0)

# The directory label is used for CDash to treat DILL as a subproject of GTKorvo
set(CMAKE_DIRECTORY_LABELS DILL)

project(DILL VERSION 2.4.1 LANGUAGES C CXX)

# Some boilerplate to setup nice output directories
Expand Down Expand Up @@ -36,6 +39,23 @@ if(NOT DEFINED DILL_HEADER_COMPONENT)
set(DILL_HEADER_COMPONENT dev)
endif()

if(WIN32)
# Automagic to do the DLL / LIB song and dance
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)

# Silence MSVC warnings
if(CMAKE_C_COMPILER_ID MATCHES "MSVC" OR
CMAKE_C_SIMULATE_ID MATCHES "MSVC")
add_definitions(
-D_CRT_SECURE_NO_DEPRECATE
-D_CRT_SECURE_NO_WARNINGS
-D_SCL_SECURE_NO_DEPRECATE
-D_WINSOCK_DEPRECATED_NO_WARNINGS
-D_CRT_NONSTDC_NO_DEPRECATE)
set (MSVC_PERL_FLAGS "-msvc-long")
endif()
endif()

# Setup shared library defaults. If explicitly specified somehow, then default
# to that. Otherwise base the default on whether or not shared libs are even
# supported.
Expand Down Expand Up @@ -84,6 +104,9 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "i.86|x86_64|AMD64")
set(TEST_PERL_FLAGS -no_float -max_arg=2)
set(ARCH_FILE x86)
endif()
if(NOT (CMAKE_SIZEOF_VOID_P EQUAL SIZEOF_LONG))
set(BASE_OPS_ARG "-msvc_long")
endif()
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm.5.*")
set(NATIVE_ARCH arm5)
set(HOST_ARM5 1)
Expand Down Expand Up @@ -119,6 +142,8 @@ endif()

if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux")
set(USE_MMAP_CODE_SEG 1)
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows")
set(USE_VIRTUAL_PROTECT 1)
endif()

include(TestBigEndian)
Expand Down Expand Up @@ -221,14 +246,16 @@ else()
set(EMULATION_POSSIBLE FALSE)
endif()

find_package(Perl REQUIRED)

option(DILL_ENABLE_DISASSEMBLY
"enable binutils-based disassembly (default is OFF)" OFF)

set(ARCHITECTURES sparc ppc64le virtual x86 x86_64 ia64 arm5 arm6 arm8)
foreach(_arch ${ARCHITECTURES})
add_custom_command(
OUTPUT dill_${_arch}.c
COMMAND perl ${CMAKE_CURRENT_SOURCE_DIR}/${_arch}.ops
COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${_arch}.ops
DEPENDS ${_arch}.ops
)
list(APPEND arch_files dill_${_arch}.c ${_arch}.c)
Expand All @@ -239,7 +266,7 @@ endforeach()

add_custom_command(
OUTPUT dill.h dill.c
COMMAND perl ${CMAKE_CURRENT_SOURCE_DIR}/base.ops
COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/base.ops ${BASE_OPS_ARG}
DEPENDS base.ops
)

Expand Down Expand Up @@ -293,6 +320,7 @@ check_include_files(unistd.h HAVE_UNISTD_H)
check_include_files(stdarg.h STDC_HEADERS)
check_include_files(malloc.h HAVE_MALLOC_H)
check_include_files(memory.h HAVE_MEMORY_H)
check_include_files(sys/mman.h HAVE_SYS_MMAN_H)
include(CheckSymbolExists)
check_symbol_exists(__clear_cache "" CLEAR_CACHE_DEFINED)
message(STATUS "Clear cache defined is ${CLEAR_CACHE_DEFINED}")
Expand Down Expand Up @@ -473,6 +501,12 @@ if(BUILD_TESTING)
add_subdirectory(vtests)
endif()

configure_file(
${PROJECT_SOURCE_DIR}/CTestCustom.cmake.in
${PROJECT_BINARY_DIR}/CTestCustom.cmake
@ONLY
)

option(DILL_QUIET "Suppress summary output" OFF)
if(NOT DILL_QUIET)
message(STATUS)
Expand Down
9 changes: 9 additions & 0 deletions thirdparty/dill/dill/CTestConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set(CTEST_PROJECT_NAME "GTKorvo")
set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")

set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "open.cdash.org")
set(CTEST_DROP_LOCATION "/submit.php?project=GTKorvo")
set(CTEST_DROP_SITE_CDASH TRUE)

set(CTEST_LABELS_FOR_SUBPROJECTS DILL)
13 changes: 13 additions & 0 deletions thirdparty/dill/dill/CTestCustom.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 1000)
set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1000)
set(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 1048576)
set(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 1048576)

list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
)

list(APPEND CTEST_CUSTOM_COVERAGE_EXCLUDE
)

list(APPEND CTEST_CUSTOM_TESTS_IGNORE
)
6 changes: 0 additions & 6 deletions thirdparty/dill/dill/CTestCustom.ctest.in

This file was deleted.

Loading