-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #901 from GMLC-TDC/master_merge
Master merge for HELICS 2.3 release
- Loading branch information
Showing
834 changed files
with
29,922 additions
and
14,796 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
brew "ccache" | ||
brew "cmake" | ||
brew "zeromq" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
brew "pcre" | ||
brew "ccache" | ||
brew "cmake" | ||
brew "swig" | ||
brew "zeromq" | ||
brew "[email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
jobs: | ||
- job: Windows | ||
strategy: | ||
matrix: | ||
VS2015-64bit: | ||
imageName: "vs2015-win2012r2" | ||
langArch: "x64" | ||
vsArch: "x64" | ||
VS2017-32bit: | ||
imageName: "vs2017-win2016" | ||
langArch: "x86" | ||
vsArch: "Win32" | ||
VS2017-64bit: | ||
imageName: "vs2017-win2016" | ||
langArch: "x64" | ||
vsArch: "x64" | ||
VS2019-64bit: | ||
imageName: "windows-2019" | ||
langArch: "x64" | ||
vsArch: "x64" | ||
pool: | ||
vmImage: $(imageName) | ||
|
||
steps: | ||
# ----------------------- | ||
# Install dependencies | ||
# ----------------------- | ||
- powershell: | | ||
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | ||
echo "##vso[task.prependpath]C:\\ProgramData\\chocolatey\\bin" | ||
choco install boost-msvc-14.1 cmake --yes --limit-output | ||
echo "##vso[task.prependpath]C:\\Program Files\\CMake\\bin" | ||
condition: eq( variables['imageName'], 'vs2015-win2012r2' ) | ||
displayName: Install chocolatey, boost, and newer cmake | ||
- bash: choco install swig --yes --limit-output | ||
condition: eq( variables['Agent.OS'], 'Windows_NT' ) | ||
displayName: Install swig | ||
|
||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: '3.4' | ||
architecture: $(langArch) | ||
condition: ne( variables['imageName'], 'vs2015-win2012r2' ) | ||
|
||
- bash: pip3 install pytest | ||
condition: ne( variables['imageName'], 'vs2015-win2012r2' ) | ||
displayName: Install pytest | ||
|
||
# ----------------------- | ||
# Configure HELICS | ||
# ----------------------- | ||
- task: CMake@1 | ||
inputs: | ||
cmakeArgs: -A $(vsArch) -DHELICS_ENABLE_SWIG=ON -DHELICS_BUILD_CXX_SHARED_LIB=ON -DHELICS_ENABLE_PACKAGE_BUILD=ON -DHELICS_BUILD_TESTS=ON -DHELICS_BUILD_EXAMPLES=ON .. | ||
displayName: 'Configure HELICS' | ||
condition: eq( variables['Agent.OS'], 'Windows_NT' ) | ||
|
||
# - task: CMake@1 | ||
# inputs: | ||
# cmakeArgs: -DBUILD_PYTHON_INTERFACE=ON . | ||
# displayName: 'Configure Python interface' | ||
# condition: and(ne( variables['imageName'], 'vs2015-win2012r2' ), eq( variables['langArch'], 'x64' )) | ||
|
||
- task: CMake@1 | ||
inputs: | ||
cmakeArgs: -DBUILD_JAVA_INTERFACE=ON . | ||
displayName: 'Configure Java interface' | ||
condition: and(ne( variables['imageName'], 'vs2015-win2012r2' ), eq( variables['langArch'], 'x64' )) | ||
|
||
# ----------------------- | ||
# Build HELICS | ||
# ----------------------- | ||
- bash: cmake --build . --config Release | ||
displayName: 'Build HELICS' | ||
workingDirectory: build | ||
|
||
# ----------------------- | ||
# Package HELICS | ||
# ----------------------- | ||
- bash: | | ||
cpack_dir="$(which cmake)" | ||
cpack_dir="${cpack_dir%/cmake}" | ||
"${cpack_dir}/cpack" -G "NSIS" -C Release -B "$PWD/installer-output" | ||
displayName: 'Package HELICS' | ||
workingDirectory: build | ||
condition: ne( variables['imageName'], 'vs2015-win2012r2' ) | ||
- task: CopyFiles@2 | ||
inputs: | ||
sourceFolder: '$(Build.SourcesDirectory)/build/installer-output' | ||
contents: '*.exe' | ||
TargetFolder: '$(Build.ArtifactStagingDirectory)' | ||
condition: ne( variables['imageName'], 'vs2015-win2012r2' ) | ||
|
||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
pathtoPublish: '$(Build.ArtifactStagingDirectory)' | ||
artifactName: installer | ||
condition: ne( variables['imageName'], 'vs2015-win2012r2' ) | ||
|
||
# ----------------------- | ||
# Test HELICS | ||
# ----------------------- | ||
- bash: ctest --output-on-failure --timeout 480 -C Release -L "Continuous" | ||
displayName: 'Test HELICS' | ||
workingDirectory: build | ||
|
||
# Packaging tests | ||
- bash: ctest --output-on-failure --timeout 480 -C Release -L "PackagingFast" | ||
displayName: 'Test HELICS packaging' | ||
workingDirectory: build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
src:*/libzmq/* | ||
src:*/badInputTests.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# This is a known purposeful leak and possible resulting race condition detection on closing of shared libraries | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM alpine:latest | ||
|
||
RUN apk add --no-cache \ | ||
bash \ | ||
jq \ | ||
git \ | ||
ca-certificates \ | ||
curl | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
name: 'Create File Update PR' | ||
description: 'Pushes a new branch with changed files and opens a PR for updating the changed files in the base branch' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
PR_URL=$(jq --raw-output .repository.pulls_url "$GITHUB_EVENT_PATH") | ||
PR_URL=${PR_URL%\{*} | ||
API_VERSION=v3 | ||
API_HEADER="Accept: application/vnd.github.${API_VERSION}+json; application/vnd.github.shadow-cat-preview+json; application/vnd.github.symmetra-preview+json; application/vnd.github.sailor-v-preview+json" | ||
AUTH_HEADER="Authorization: token ${GITHUB_TOKEN}" | ||
|
||
# Only commit and open a PR if files have changed | ||
files_changed=$(git diff --staged --name-only) | ||
if [[ "$files_changed" != "" ]]; | ||
then | ||
hash=$(sha256sum ${files_changed} | sha256sum | cut -c 1-12 -) | ||
current_branch=${GITHUB_REF#refs/heads/} | ||
|
||
# Set the git origin url for committing using a GITHUB_TOKEN | ||
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}" | ||
git config user.name "${INPUT_GIT_NAME}" | ||
git config user.email "${INPUT_GIT_EMAIL}" | ||
|
||
# Make sure a branch with the same name (hash + base branch) doesn't already exist | ||
pr_branch="${INPUT_BRANCH_PREFIX}update-${current_branch}-${hash}" | ||
git ls-remote --exit-code . "origin/${pr_branch}" | ||
rv=$? | ||
if [[ "$rv" != "0" ]]; | ||
then | ||
# Commit the changed files and push the branch to GitHub | ||
git checkout -b "${pr_branch}" | ||
git commit -m "${INPUT_COMMIT_MSG}" | ||
git push -u origin "${pr_branch}" | ||
|
||
# Format string values for GitHub API JSON payload | ||
PR_TITLE="$(echo -n "${INPUT_PR_TITLE}" | jq --raw-input --slurp ".")" | ||
PR_BODY="$(echo -n "${INPUT_PR_BODY}" | jq --raw-input --slurp ".")" | ||
PR_BASE="$(echo -n "${current_branch}" | jq --raw-input --slurp ".")" | ||
PR_HEAD="$(echo -n "${pr_branch}" | jq --raw-input --slurp ".")" | ||
pr_api_data="{\"title\":${PR_TITLE}, \"body\":${PR_BODY}, \"base\":${PR_BASE}, \"head\":${PR_HEAD}, \"draft\":false}" | ||
|
||
# Open up the GitHub PR | ||
curl -XPOST -fsSL \ | ||
-H "${AUTH_HEADER}" \ | ||
-H "${API_HEADER}" \ | ||
--data "${pr_api_data}" \ | ||
"${PR_URL}" | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/sh | ||
|
||
# Generate Matlab interface using swig matlab | ||
mkdir build_matlab | ||
pushd build_matlab | ||
cmake -DBUILD_MATLAB_INTERFACE=ON -DHELICS_SWIG_GENERATE_INTERFACE_FILES_ONLY=ON -DHELICS_OVERWRITE_INTERFACE_FILES=ON -DHELICS_BUILD_EXAMPLES=OFF -DENABLE_ZMQ_CORE=OFF -DHELICS_BUILD_TESTS=OFF -DHELICS_BUILD_APP_EXECUTABLES=OFF -DHELICS_DISABLE_BOOST=ON -DHELICS_ENABLE_SWIG=ON -DSWIG_EXECUTABLE=/root/swig-matlab/bin/swig .. | ||
make -j2 mfile_overwrite | ||
popd | ||
|
||
# Generate Python and Java interfaces | ||
mkdir build_interface | ||
pushd build_interface | ||
cmake -DBUILD_PYTHON_INTERFACE=ON -DBUILD_JAVA_INTERFACE=ON -DHELICS_SWIG_GENERATE_INTERFACE_FILES_ONLY=ON -DHELICS_OVERWRITE_INTERFACE_FILES=ON -DHELICS_BUILD_EXAMPLES=OFF -DENABLE_ZMQ_CORE=OFF -DHELICS_BUILD_TESTS=OFF -DHELICS_BUILD_APP_EXECUTABLES=OFF -DHELICS_DISABLE_BOOST=ON -DHELICS_ENABLE_SWIG=ON .. | ||
make -j2 pyfile_overwrite | ||
make -j2 javafile_overwrite | ||
popd |
Oops, something went wrong.