Cleaned up the CI configuration and remove CircleCI and TravisCI

This commit is contained in:
Jorrit Wronski
2022-12-06 21:54:58 +01:00
parent 522e810574
commit b36940e144
11 changed files with 184 additions and 411 deletions

View File

@@ -1,8 +0,0 @@
version: 2
jobs:
build:
docker:
- image: circleci/ruby:2.4.1
steps:
- checkout
- run: echo "A first hello"

View File

@@ -1,8 +1,13 @@
name: Development Clang Format
on:
push:
branches: [ 'master', 'main', 'develop', 'dev_checks' ]
# tags: [ 'v*' ]
pull_request:
branches: [ master, develop ]
branches: [ 'master', 'main', 'develop' ]
#schedule:
# - cron: '15 8 * * 3' # Run weekly
jobs:
build:

68
.github/workflows/dev_codeql.yml vendored Normal file
View File

@@ -0,0 +1,68 @@
name: Development CodeQL
on:
push:
branches: [ 'dev_checks' ]
# branches: [ 'master', 'main', 'develop', 'dev_checks' ]
# tags: [ 'v*' ]
#pull_request:
# branches: [ 'master', 'main', 'develop' ]
schedule:
- cron: '15 8 * * 0,4' # Run twice a week
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ cpp, python ]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
- name: Autobuild Python
if: ${{ matrix.language == 'python' }}
uses: github/codeql-action/autobuild@v2
- name: Configure CPP
if: ${{ matrix.language == 'cpp' }}
run: cmake
-DCOOLPROP_MY_MAIN=dev/ci/main.cpp
-B ${{github.workspace}}/build
-S .
- name: Build CPP
if: ${{ matrix.language == 'cpp' }}
run: cmake
--build ${{github.workspace}}/build
--config Release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"

31
.github/workflows/dev_coverity.yml vendored Normal file
View File

@@ -0,0 +1,31 @@
name: Development Coverity scan
on:
push:
branches: [ 'dev_checks' ]
# branches: [ 'master', 'main', 'develop', 'dev_checks' ]
# tags: [ 'v*' ]
#pull_request:
# branches: [ 'master', 'main', 'develop' ]
schedule:
- cron: '15 8 * * 0,4' # Run twice a week
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure build
run: cmake
-DCOOLPROP_MY_MAIN=dev/ci/main.cpp
-B ${{github.workspace}}/build
-S .
- uses: vapier/coverity-scan-action@v1
with:
email: ${{ secrets.COVERITY_SCAN_EMAIL }}
token: ${{ secrets.COVERITY_SCAN_TOKEN }}
command: cmake --build ${{github.workspace}}/build --config Release

View File

@@ -2,9 +2,12 @@ name: Development cppcheck
on:
push:
branches: [ master, develop, cppcheck_clang_format ]
branches: [ 'master', 'main', 'develop', 'dev_checks' ]
# tags: [ 'v*' ]
pull_request:
branches: [ master, develop ]
branches: [ 'master', 'main', 'develop' ]
#schedule:
# - cron: '15 8 * * 3' # Run weekly
jobs:
build:

71
.github/workflows/dev_msvc.yml vendored Normal file
View File

@@ -0,0 +1,71 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
#
# Find more information at:
# https://github.com/microsoft/msvc-code-analysis-action
name: Development Microsoft C++ Code Analysis
on:
push:
branches: [ 'dev_checks' ]
# branches: [ 'master', 'main', 'develop', 'dev_checks' ]
# tags: [ 'v*' ]
#pull_request:
# branches: [ 'master', 'main', 'develop' ]
schedule:
- cron: '15 8 * * 0,4' # Run twice a week
permissions:
contents: read
jobs:
analyze:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
name: Analyze
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure CMake
run: cmake
-DCOOLPROP_MY_MAIN=dev/ci/main.cpp
-B ${{github.workspace}}/build
-S .
# Build is not required unless generated source files are used
- name: Build CMake
run: cmake
--build ${{github.workspace}}/build
--config Release
- name: Initialize MSVC Code Analysis
uses: microsoft/msvc-code-analysis-action@04825f6d9e00f87422d6bf04e1a38b1f3ed60d99
# Provide a unique ID to access the sarif output path
id: run-analysis
with:
cmakeBuildDirectory: ${{github.workspace}}/build
# Ruleset file that will determine what checks will be run
ruleset: NativeRecommendedRules.ruleset
# Upload SARIF file to GitHub Code Scanning Alerts
- name: Upload SARIF to GitHub
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ steps.run-analysis.outputs.sarif }}
# Upload SARIF file as an Artifact to download and view
# - name: Upload SARIF as an Artifact
# uses: actions/upload-artifact@v3
# with:
# name: sarif-file
# path: ${{ steps.run-analysis.outputs.sarif }}

View File

@@ -1,4 +1,4 @@
name: Catch2 Testing
name: Testing Catch2
on:
push:
@@ -6,6 +6,8 @@ on:
tags: [ 'v*' ]
pull_request:
branches: [ 'master', 'main', 'develop' ]
#schedule:
# - cron: '15 8 * * 3' # Run weekly
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)

View File

@@ -1,144 +0,0 @@
notifications:
email:
on_success: never
on_failure: change
git:
depth: 5
#submodules_depth: 100
language:
- cpp
#os: linux
#dist: trusty
#
#compiler:
# - clang
# - gcc
#
#addons:
# apt:
# sources:
# - ubuntu-toolchain-r-test
# - llvm-toolchain-trusty
# packages:
# - cmake
# - gcc-6
# - g++-6
# - clang-3.7
matrix:
include:
# Use this code to enable certain debug builds - for example for pull requests
#- compiler: clang
# branches:
# only:
# - issues/1820
# before_script:
# - cmake --version
# - echo "$CXX" && "$CXX" -v
# - mkdir -p build && pushd build
# - cmake .. -DCMAKE_BUILD_TYPE=Release -DCOOLPROP_MY_MAIN=dev/Tickets/1820.cpp -DCMAKE_CXX_STANDARD=11
# - popd
# script:
# - cmake --build build --config Release
# - ./build/Main
- os: linux
dist: bionic
compiler: gcc
branches:
except:
- coverity_scan
before_script:
- cmake --version
- echo "$CXX" && "$CXX" -v
- mkdir -p build && pushd build
- cmake .. -DCMAKE_BUILD_TYPE=Release -DCOOLPROP_SHARED_LIBRARY=ON
- popd
script:
- cmake --build build --config Release
- os: linux
dist: bionic
compiler: clang
branches:
except:
- coverity_scan
before_script:
- cmake --version
- echo "$CXX" && "$CXX" -v
- mkdir -p build && pushd build
- cmake .. -DCMAKE_BUILD_TYPE=Release -DCOOLPROP_SHARED_LIBRARY=ON
- popd
script:
- cmake --build build --config Release
- os: osx
#osx_image: xcode8.3 # Xcode 8.3 OS X 10.12
branches:
except:
- coverity_scan
before_script:
- cmake --version
- echo "$CXX" && "$CXX" -v
- mkdir -p build && pushd build
- cmake .. -DCMAKE_BUILD_TYPE=Release -DCOOLPROP_SHARED_LIBRARY=ON
- popd
script:
- cmake --build build --config Release
- os: linux
dist: bionic
branches:
only:
- coverity_scan
# before_install:
# - echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
addons:
coverity_scan:
project:
name: "CoolProp/CoolProp"
description: "Build submitted via Travis CI"
notification_email: jowr@ipu.dk
build_command_prepend: "cmake . -DCMAKE_BUILD_TYPE=Release -DCOOLPROP_SHARED_LIBRARY=ON"
build_command: "cmake --build . --config Release"
branch_pattern: coverity_scan
before_script: cmake . -DCMAKE_BUILD_TYPE=Release -DCOOLPROP_SHARED_LIBRARY=ON
script: cmake --build . --config Release
# build_command_prepend: "cmake . -DCOOLPROP_MY_MAIN=dev/coverity/main.cxx"
# build_command: "cmake --build . --target Main"
# branch_pattern: coverity_scan
# before_script: cmake . -DCOOLPROP_MY_MAIN=dev/coverity/main.cxx
# script: cmake --build . --target Main
#branches:
# only:
# - master
# - release
# - coverity_scan
# - travis_integration
# # Build all branches
# # - /.*/
env:
global:
- secure: "XGfICTnfFv9xpVDBbNwJIkXV0OZCAcOT46aeFYmODm3jl+ya60k0C91G9zlZ9fEYiQwAEBTO2Y/Ge0AMaoFqtu3H3vu7S5JjAbpMV3ZRDJqampScy550yPpziOuxvB6h23PZRfLOBVEsUGHnCO5rLb20iPM94XsHSBL3Smn2o9c="
#install:
# - if [ "$CXX" = "g++" ]; then export CXX="g++-6" CC="gcc-6"; fi
# - if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.7" CC="clang-3.7"; fi
# before_script:
# # Check compiler and cmake versions
# - cmake --version; gcc -v; clang -v
# - echo "$CXX" && "$CXX" -v
# # Run your build commands next
# - mkdir build && pushd build
# - echo "${TRAVIS_BUILD_DIR}"
# - cmake .. -DCMAKE_BUILD_TYPE=Release # Same as "${TRAVIS_BUILD_DIR}"
# - popd
# script:
# - cmake --build build --config Release

View File

@@ -1,192 +0,0 @@
notifications:
email:
on_success: never
on_failure: change
language: python
#os:
# - linux
# - osx
matrix:
include:
- os: linux
dist: trusty
sudo: required # false or required, use required to get docker
env: BUILD_TARGET="PYTHON_LINUX"
# - os: linux
# dist: precise
# sudo: required # false or required
# env: BUILD_TARGET="PYTHON_LINUX"
# - os: linux
# dist: trusty
# sudo: false # false or required
# env: BUILD_TARGET="PYTHON_LINUX"
# - os: linux
# dist: precise
# sudo: false # false or required
# env: BUILD_TARGET="PYTHON_LINUX"
# - os: osx
# language: generic
# osx_image: xcode8.3 # Xcode 8.3 OS X 10.12
# env: BUILD_TARGET="PYTHON_APPLE"
# - os: osx
# language: generic
# osx_image: xcode8.2 # Xcode 8.2 OS X 10.12
# env: BUILD_TARGET="PYTHON_APPLE"
# - os: osx
# language: generic
# osx_image: xcode8.1 # Xcode 8.1 OS X 10.12
# env: BUILD_TARGET="PYTHON_APPLE"
# - os: osx
# language: generic
# osx_image: xcode8 # Xcode 8gm OS X 10.11
# env: BUILD_TARGET="PYTHON_APPLE"
# - os: osx
# language: generic
# osx_image: xcode7.3 # Default Xcode 7.3.1 OS X 10.11
# env: BUILD_TARGET="PYTHON_APPLE"
# The old image does not have pip available ...
# - os: osx
# language: generic
# osx_image: xcode6.4 # Xcode 6.4 OS X 10.10
# Build the Linux wheels based on https://github.com/pypa/python-manylinux-demo
# - os: linux
# dist: trusty
# sudo: required
# services:
# - docker
# env: BUILD_TARGET="PYTHON_LINUX_WHEELS_CUSTOM"
# BITNESS="32"
- os: linux
dist: trusty
sudo: required
services:
- docker
env: BUILD_TARGET="PYTHON_LINUX_WHEELS"
DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64
DOCKER_IMAGE=dockcross/manylinux-x64
PRE_CMD=""
SETUP_PY_ARGS="cmake=default,64"
- os: linux
dist: trusty
sudo: required
services:
- docker
env: BUILD_TARGET="PYTHON_LINUX_WHEELS"
DOCKER_IMAGE=quay.io/pypa/manylinux1_i686
DOCKER_IMAGE=dockcross/manylinux-x86
PRE_CMD=linux32
SETUP_PY_ARGS="cmake=default,32"
- os: osx
language: generic
env: BUILD_TARGET="PYTHON_APPLE"
PYTHON_VERSION="2.7.13"
- os: osx
language: generic
env: BUILD_TARGET="PYTHON_APPLE"
PYTHON_VERSION="3.3.5"
- os: osx
language: generic
env: BUILD_TARGET="PYTHON_APPLE"
PYTHON_VERSION="3.4.5"
- os: osx
language: generic
env: BUILD_TARGET="PYTHON_APPLE"
PYTHON_VERSION="3.5.3"
- os: osx
language: generic
env: BUILD_TARGET="PYTHON_APPLE"
PYTHON_VERSION="3.6.1"
# - os: linux
# dist: trusty
# sudo: required
# - os: osx
# osx_image: xcode7.2
#addons:
# apt:
# packages:
# - cmake
#before_install:
# - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update ; fi
# - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install cmake; fi
# - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update ; fi
# - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install cmake; fi
#See: http://stackoverflow.com/questions/41916656/how-to-use-travis-ci-to-build-modern-c-using-modern-cmake
#dist: trusty
#sudo: required
#language:
# - cpp
#compiler:
# - gcc
#language:
# - python
install:
# Commands for building the Python packages
- if [ "$BUILD_TARGET" = "PYTHON_APPLE" ]; then git clone --recursive https://github.com/MacPython/terryfy.git; fi
- if [ "$BUILD_TARGET" = "PYTHON_APPLE" ]; then source terryfy/travis_tools.sh; fi
- if [ "$BUILD_TARGET" = "PYTHON_APPLE" ]; then get_python_environment macpython "${PYTHON_VERSION}" venv; fi
- if [ "$BUILD_TARGET" = "PYTHON_APPLE" ]; then pip install cython wheel; fi
- if [ "$BUILD_TARGET" = "PYTHON_LINUX" ]; then pip install cython wheel auditwheel; fi
# Commands for building the Python wheel
# - if [ "$DOCKER_IMAGE" == *"manylinux"* ]; then docker pull $DOCKER_IMAGE; fi
- if [ "$BUILD_TARGET" = "PYTHON_LINUX_WHEELS" ]; then docker pull $DOCKER_IMAGE; fi
#addons:
# apt:
# sources:
# - ubuntu-toolchain-r-test
# packages:
# - gcc-6
# - g++-6
# - cmake
# Build all branches
branches:
only:
- /.*/
script:
# # Link gcc-6 and g++-6 to their standard commands
# - ln -s /usr/bin/gcc-6 /usr/local/bin/gcc
# - ln -s /usr/bin/g++-6 /usr/local/bin/g++
# # Export CC and CXX to tell cmake which compiler to use
# - export CC=/usr/bin/gcc-6
# - export CXX=/usr/bin/g++-6
# # Check versions of gcc, g++ and cmake
# - gcc -v && g++ -v && cmake --version
# # Run your build commands next
# - git clone --recursive https://github.com/CoolProp/CoolProp.git
# - cd CoolProp
# - mkdir build
# - cd build
# - cmake .. -DCOOLPROP_SHARED_LIBRARY=ON
# - cmake --build . --config Release
- |
if [ "$BUILD_TARGET" = "PYTHON_LINUX" -o "$BUILD_TARGET" = "PYTHON_APPLE" ]; then
cd wrappers/Python
python setup.py bdist_wheel
pip install dist/*.whl
if [ "$BUILD_TARGET" = "PYTHON_LINUX" ]; then mkdir -p dist_audit; auditwheel repair dist/*.whl -w dist_audit/; fi
cd ../..
python -c 'from CoolProp.CoolProp import get_global_param_string; print("CoolProp gitrevision:", get_global_param_string("gitrevision"))'
fi
# Commands for building the Python wheels
- |
if [ "$BUILD_TARGET" = "PYTHON_LINUX_WHEELS_CUSTOM" ]; then
pushd wrappers/Python/manylinux/
chmod +x 00_prepare_docker.sh
./00_prepare_docker.sh "${BITNESS}"
fi
- |
if [ "$BUILD_TARGET" = "PYTHON_LINUX_WHEELS" ]; then
chmod +x .travis/build_wheels.sh
docker run --rm -v `pwd`:/io $DOCKER_IMAGE $PRE_CMD /io/.travis/build_wheels.sh "${SETUP_PY_ARGS}"
fi
# - if [ "$BUILD_TARGET" = *"PYTHON_LINUX_WHEELS"* ]; then ls wheelhouse/; fi

View File

@@ -1,63 +0,0 @@
#!/bin/bash
SETUP_PY_ARGS="$1"
# https://github.com/pypa/python-manylinux-demo/blob/master/travis/build-wheels.sh
set -e -x
# Get the directory containing this script
# see http://stackoverflow.com/a/246128/1360263
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Install a system package required by our library
#yum install -y atlas-devel
#yum install -y cmake
#if [ "$SETUP_PY_ARGS" = *"32" ]; then
# CMAKE_URL="https://cmake.org/files/v3.6/cmake-3.6.3-Linux-i386.tar.gz"
#else
# CMAKE_URL="https://cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.tar.gz"
#fi
#mkdir cmake && wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
#export PATH=${DIR}/cmake/bin:${PATH}
mkdir -p /io/wheelhouse_tmp
mkdir -p /io/wheelhouse
OLD_PATH=${PATH}
# Compile wheels
for PYBIN in /opt/python/*/bin; do
PYV_MAJOR=`"${PYBIN}/python" -c "import sys;print(list(sys.version_info[:2])[0])";`
PYV_MINOR=`"${PYBIN}/python" -c "import sys;print(list(sys.version_info[:2])[1])";`
echo Detected Python ${PYV_MAJOR}.${PYV_MINOR}
if [ "${PYV_MAJOR}" -le "2" -a "${PYV_MINOR}" -lt "7" ]; then
continue
fi
export PATH="${PYBIN}:$OLD_PATH"
#ls -lh "${PYBIN}"
pip install cython wheel
#"${PYBIN}/pip" install scikit-build cmake
pushd /io/wrappers/Python
python setup.py bdist_wheel ${SETUP_PY_ARGS}
cp dist/*.whl /io/wheelhouse_tmp/
popd
#deactivate
#"${PYBIN}/pip" install cython wheel
#"${PYBIN}/pip" wheel /io/wrappers/Python --wheel-dir /io/wheelhouse_tmp/ --build-options ${SETUP_PY_ARGS}
#"${PYBIN}/pip" wheel /io/wrappers/Python -w /io/wheelhouse_tmp/
done
export PATH="$OLD_PATH"
# Bundle external shared libraries into the wheels
for whl in /io/wheelhouse_tmp/*.whl; do
auditwheel repair "$whl" -w /io/wheelhouse/
done
## Install packages and test
#for PYBIN in /opt/python/*/bin/; do
# "${PYBIN}/pip" install python-manylinux-demo --no-index -f /io/wheelhouse
# (cd "$HOME"; "${PYBIN}/nosetests" pymanylinuxdemo)
#done