Commit f6735d45 authored by dill Upstream's avatar dill Upstream Committed by Atkins, Charles Vernon
Browse files

dill 2022-03-21 (4ea1b7ad)

Code extracted from:

    https://github.com/GTkorvo/dill.git

at commit 4ea1b7ad1d7e93dcfb360996822ebec157261a1d (master).

Upstream Shortlog
-----------------

Chuck Atkins (2):
      00c7145c ci: Update CI infrastructure
      00a28127 ci: Drop Windows and nvhpc builds until issues can be addressed

Greg Eisenhauer (9):
      b0bbddf9 Enable nvhpc compiler, code mods to pass
      22dee7f4 Enable Windows build
      6b0a8744 A shot at memory protection
      e200a974 diag
      5180bea2 diag
      a7f5d413 diag
      f790fd15 semi
      a84dd085 nvc warning fix
      4c26b29e Compile for universal binary

eisen (6):
      6f6b3413 Find Perl
      e73f72b9 kill warnings
      9c3a069c Find Perl
      ca9a8ab1 different flush call
      cafebbae New flush
      a9540fe4 warnings
parent fa2c2d94
Loading
Loading
Loading
Loading
+100 −16
Original line number Diff line number Diff line
name: Build and Test

on: 
  push: 
    branches: 
@@ -7,25 +9,107 @@ on:
    - 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 −0
Original line number Diff line number Diff line
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 }}
+36 −2
Original line number Diff line number Diff line
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
@@ -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.
@@ -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)
@@ -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)
@@ -221,6 +246,8 @@ else()
  set(EMULATION_POSSIBLE FALSE)
endif()

find_package(Perl REQUIRED)

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

@@ -228,7 +255,7 @@ 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)
@@ -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
) 

@@ -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}")
@@ -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)

CTestConfig.cmake

0 → 100644
+9 −0
Original line number Diff line number Diff line
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)

CTestCustom.cmake.in

0 → 100644
+13 −0
Original line number Diff line number Diff line
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
)
Loading