Skip to content

Commit

Permalink
Merge branch 'master' of github.com:openchemistry/avogadrolibs into a…
Browse files Browse the repository at this point in the history
…dd-msgpack

Signed-off-by: Geoff Hutchison <[email protected]>
  • Loading branch information
ghutchis committed Nov 13, 2023
2 parents a1e2790 + 13bb1e5 commit a2d876c
Show file tree
Hide file tree
Showing 245 changed files with 46,514 additions and 21,635 deletions.
5 changes: 5 additions & 0 deletions .github/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
query-filters:
- exclude:
id: cpp/integer-multiplication-cast-to-long
paths-ignore:
- '**/moc_*.*'
- '**/ui_*.h'
- 'thirdparty/**/*.*'
- 'utilities/**/*.*'
72 changes: 40 additions & 32 deletions .github/workflows/build_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ env:
# this is different from MACOSX_DEPLOYMENT_TARGET to prevent build problems
# we set MACOSX_DEPLOYMENT_TARGET later
MACOS_TARGET: 10.12
FEATURES: -DBUILD_GPL_PLUGINS=ON -DWITH_COORDGEN=OFF -DUSE_VTK=ON
FEATURES: -DBUILD_GPL_PLUGINS=ON -DWITH_COORDGEN=OFF -DUSE_VTK=ON -DUSE_3DCONNEXION=ON
CACHE: -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
SCCACHE_GHA_ENABLED: "true"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: ${{ matrix.config.name }}
Expand Down Expand Up @@ -64,22 +68,6 @@ jobs:
cmake_flags: "-G Ninja -DENABLE_TESTING=ON -DTEST_QTGL=OFF -USE_SYSTEM_ZLIB=ON",
cpack: "",
}
- {
name: "Ubuntu Leak Sanitizer", artifact: "",
os: ubuntu-20.04,
cc: "gcc", cxx: "g++",
build_type: "lsan",
cmake_flags: "-G Ninja -DENABLE_TESTING=ON -DTEST_QTGL=OFF -USE_SYSTEM_ZLIB=ON",
cpack: "",
}
- {
name: "Ubuntu Thread Sanitizer", artifact: "",
os: ubuntu-20.04,
cc: "gcc", cxx: "g++",
build_type: "tsan",
cmake_flags: "-G Ninja -DENABLE_TESTING=ON -DTEST_QTGL=OFF -USE_SYSTEM_ZLIB=ON",
cpack: "",
}
- {
name: "Ubuntu Undefined Behavior Sanitizer", artifact: "",
os: ubuntu-20.04,
Expand All @@ -97,6 +85,7 @@ jobs:
sudo apt-get -qq update
sudo apt-get -qq install ninja-build libeigen3-dev libboost-all-dev libglew-dev libxml2-dev
sudo apt-get -qq install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5x11extras5-dev libqt5svg5-dev
sudo apt-get -qq install libgcc-10-dev libgcc-9-dev
- name: Install Dependencies (macOS)
if: runner.os == 'macOS'
run: |
Expand All @@ -110,19 +99,31 @@ jobs:
run: choco install ninja

- name: Checkout openchemistry
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: openchemistry/openchemistry
submodules: recursive

- name: Checkout avogadroapp
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: openchemistry/avogadroapp
path: avogadroapp

- name: Checkout molecules
uses: actions/checkout@v4
with:
repository: openchemistry/molecules
path: molecules

- name: Checkout i18n
uses: actions/checkout@v4
with:
repository: openchemistry/avogadro-i18n
path: avogadro-i18n

- name: Checkout avogadrolibs
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: avogadrolibs

Expand All @@ -137,7 +138,7 @@ jobs:
uses: jurplel/install-qt-action@v3
with:
cache: True
tools: 'tools_openssl_x64'
tools: 'tools_opensslv3_x64'
version: ${{ env.QT_VERSION }}
host: 'windows'
target: 'desktop'
Expand Down Expand Up @@ -196,6 +197,15 @@ jobs:
done
otool -L libinchi.?.?.?.dylib
cp -p libinchi* ../Avogadro2.app/Contents/Frameworks/
# finally, fixup the binaries
#cd ../bin
#for exe in obabel obmm eht_bind genXrdPattern; do
# for libpath in `otool -L ${exe} | grep '/Users/runner/work' | awk '{print $1}'`; do
# export lib=`echo $libpath | cut -d '/' -f 9`;
# echo "Fixing $exe $lib $libpath"
# install_name_tool -change $libpath @executable_path/../Frameworks/$lib $exe
# done
#done
- name: Run tests
if: matrix.config.os == 'ubuntu-20.04'
Expand Down Expand Up @@ -249,21 +259,22 @@ jobs:
fi # certificate exists
fi # password exists
- name: Pack
if: matrix.config.artifact != 0
- name: Create Mac and Windows Packages
if: matrix.config.os == 'windows-latest' || matrix.config.os == 'macos-latest'
shell: bash
run: |
if [ -z "${P12_PASSWORD}" ]; then
unset CODESIGN_IDENTITY # to prevent cpack failing when trying to sign
fi
[[ ! "${GITHUB_REF}" =~ "tags" ]] && export SNAPSHOT_DATE=`date -j "+%d-%m-%y"`
cpack ${{ matrix.config.cpack_flags }}
working-directory: ${{ runner.workspace }}/build/avogadroapp
env:
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
CODESIGN_IDENTITY: ${{ secrets.CODESIGN_ID }}
working-directory: ${{ runner.workspace }}/build/avogadroapp

- name: AppImage
if: matrix.config.os == 'ubuntu-18.04'
if: matrix.config.os == 'ubuntu-20.04' && matrix.config.build_type == 'Release'
shell: bash
run: |
mkdir appdir
Expand All @@ -278,27 +289,24 @@ jobs:
chmod a+x appdir/AppRun
./appimagetool-x86_64.AppImage appdir
mv Avogadro2*.AppImage avogadroapp # for upload
# remove the cpack files
rm avogadroapp/Avogadro2*Linux.*
working-directory: ${{ runner.workspace }}/build

- name: Notarize Mac DMG
if: runner.os == 'macOS'
run: |
# check current directory (failing signing)
echo `pwd`
ls -ld
# check if we have the password and the username
if [ -n "${NOTARIZE_PASSWORD}" ] && [ -n "${NOTARIZE_USERNAME}" ]; then
codesign -s "$CODESIGN_IDENTITY" --timestamp Avogadro2*.dmg
npx notarize-cli --file Avogadro2*.dmg
xcrun notarytool submit Avogadro2*.dmg --apple-id "$NOTARIZE_USERNAME" --team-id "$NOTARIZE_TEAM" --password "$NOTARIZE_PASSWORD" --verbose --wait
xcrun stapler staple -v Avogadro2*.dmg
fi
working-directory: ${{ runner.workspace }}/build/avogadroapp
env:
NOTARIZE_TEAM: ${{ secrets.AC_TEAM }}
NOTARIZE_USERNAME: ${{ secrets.AC_USERNAME }}
NOTARIZE_PASSWORD: ${{ secrets.AC_PASSWORD }}
CODESIGN_IDENTITY: ${{ secrets.CODESIGN_ID }}
PRODUCT_BUNDLE_IDENTIFIER: cc.avogadro
continue-on-error: true

- name: Setup tmate session
if: ${{ failure() }}
Expand Down
66 changes: 38 additions & 28 deletions .github/workflows/build_m1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ env:
# this is different from MACOSX_DEPLOYMENT_TARGET to prevent build problems
# we set MACOSX_DEPLOYMENT_TARGET later
MACOS_TARGET: 10.12
FEATURES: -DUSE_VTK=ON -DBUILD_GPL_PLUGINS=ON -DWITH_COORDGEN=OFF
FEATURES: -DUSE_VTK=ON -DBUILD_GPL_PLUGINS=ON -DWITH_COORDGEN=OFF -DUSE_3DCONNEXION=ON

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
Expand Down Expand Up @@ -37,41 +41,38 @@ jobs:
fi
- name: Checkout openchemistry
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: openchemistry/openchemistry
submodules: recursive

- name: Checkout avogadroapp
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: openchemistry/avogadroapp
path: avogadroapp

- name: Checkout molecules
uses: actions/checkout@v4
with:
repository: openchemistry/molecules
path: molecules

- name: Checkout avogadrolibs
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: avogadrolibs

- name: Checkout i18n
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: openchemistry/avogadro-i18n
path: avogadro-i18n

- name: Grab cache files
uses: actions/cache@v3
with:
path: |
${{ runner.workspace }}/build/thirdparty
${{ runner.workspace }}/build/Downloads
key: ${{ matrix.config.name }}-thirdparty

- name: Configure
run: |
if [ ! -d "${{ runner.workspace }}/build" ]; then mkdir "${{ runner.workspace }}/build"; fi
cd "${{ runner.workspace }}/build"
# won't have any effect except on Mac
echo "MACOSX_DEPLOYMENT_TARGET=${{ env.MACOS_TARGET }}" >> $GITHUB_ENV
CC=${{matrix.config.cc}} CXX=${{matrix.config.cxx}} cmake $GITHUB_WORKSPACE ${{env.FEATURES}} -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} ${{matrix.config.cmake_flags}}
shell: bash
Expand All @@ -87,22 +88,32 @@ jobs:
working-directory: ${{ runner.workspace }}/build/prefix/lib/openbabel
run: |
for plugin in *.so; do
for libpath in `otool -L ${plugin} | grep '/Users/runner/work' | awk '{print $1}'`; do
export lib=`echo $libpath | cut -d '/' -f 9`;
for libpath in `otool -L ${plugin} | grep '/Users/runner' | awk '{print $1}'`; do
export lib=`echo $libpath | cut -d '/' -f 10`;
echo "Fixing $plugin $lib $libpath"
install_name_tool -change $libpath @executable_path/../Frameworks/$lib $plugin
done
done
cd .. # build/prefix/lib
for plugin in libinchi.?.?.?.dylib; do
for libpath in `otool -L ${plugin} | grep '/Users/runner/work' | awk '{print $1}'`; do
export lib=`echo $libpath | cut -d '/' -f 9`;
for libpath in `otool -L ${plugin} | grep '/Users/runner' | awk '{print $1}'`; do
export lib=`echo $libpath | cut -d '/' -f 10`;
echo "Fixing $plugin $lib $libpath"
install_name_tool -change $libpath @executable_path/../Frameworks/$lib $plugin
done
done
otool -L libinchi.?.?.?.dylib
cp -p libinchi* ../Avogadro2.app/Contents/Frameworks/
# finally, fixup the binaries
#cd ../bin
#for exe in obabel obmm eht_bind genXrdPattern; do
# for libpath in `otool -L ${exe} | grep '/Users/runner' | awk '{print $1}'`; do
# export lib=`echo $libpath | cut -d '/' -f 10`;
# echo "Fixing $exe $lib $libpath"
# install_name_tool -change $libpath @executable_path/../Frameworks/$lib $exe
# done
#done
- name: Install the Apple certificate
# From GitHub docs: https://docs.github.com/en/actions/guides/installing-an-apple-certificate-on-macos-runners-for-xcode-development
Expand Down Expand Up @@ -138,39 +149,38 @@ jobs:
# signing occurs via avogadroapp cpack instructions
fi # certificate exists
fi # password exists
# remove any previous DMG in case they're still around
rm -f avogadroapp/*.dmg
- name: Pack
if: matrix.config.artifact != 0
- name: Create Mac and Windows Packages
shell: bash
run: |
if [ -z "${P12_PASSWORD}" ]; then
unset CODESIGN_IDENTITY # to prevent cpack failing when trying to sign
fi
[[ ! "${GITHUB_REF}" =~ "tags" ]] && export SNAPSHOT_DATE=`date -j "+%d-%m-%y"`
cpack ${{ matrix.config.cpack_flags }}
working-directory: ${{ runner.workspace }}/build/avogadroapp
env:
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
CODESIGN_IDENTITY: ${{ secrets.CODESIGN_ID }}
working-directory: ${{ runner.workspace }}/build/avogadroapp

- name: Notarize Mac DMG
if: runner.os == 'macOS'
run: |
pwd
ls -l
# check if we have the password and the username
if [ -n "${NOTARIZE_PASSWORD}" ] && [ -n "${NOTARIZE_USERNAME}" ]; then
echo "codesign DMG"
codesign -s "$CODESIGN_IDENTITY" --timestamp Avogadro2*.dmg
echo "notarizing"
npx notarize-cli --file Avogadro2*.dmg
xcrun notarytool submit Avogadro2*.dmg --apple-id "$NOTARIZE_USERNAME" --team-id "$NOTARIZE_TEAM" --password "$NOTARIZE_PASSWORD" --verbose --wait
xcrun stapler staple -v Avogadro2*.dmg
fi
working-directory: ${{ runner.workspace }}/build/avogadroapp
env:
NOTARIZE_TEAM: ${{ secrets.AC_TEAM }}
NOTARIZE_USERNAME: ${{ secrets.AC_USERNAME }}
NOTARIZE_PASSWORD: ${{ secrets.AC_PASSWORD }}
CODESIGN_IDENTITY: ${{ secrets.CODESIGN_ID }}
PRODUCT_BUNDLE_IDENTIFIER: cc.avogadro
continue-on-error: true
working-directory: ${{ runner.workspace }}/build/avogadroapp

- name: Upload
if: matrix.config.artifact != 0
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Build Wheels

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
# Don't build python 2.7, pypy, or 32-bit wheels or Mac arm64 on Py3.8
CIBW_SKIP: "cp36-* cp37-* cp311-* cp38-macosx_arm64 pp* *-musllinux_* *-manylinux_i686 *-win32"
Expand Down Expand Up @@ -42,7 +46,7 @@ jobs:
os: [ubuntu-20.04, macos-latest, windows-2019]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# Grab the whole history so that setuptools-scm can see the tags and
# give it a correct version even on non-tag push.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: 'Install clang-format'
run: sudo apt-get -qq install clang-format-13

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: 'Run clang-format-diff'
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@ jobs:
version: ${{ env.QT_VERSION }}

- name: Checkout openchemistry
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: openchemistry/openchemistry
submodules: recursive

- name: Checkout avogadroapp
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: openchemistry/avogadroapp
path: avogadroapp

- name: Checkout avogadrolibs
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: avogadrolibs
fetch-depth: 2
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,18 @@ permissions:

jobs:
codacy-security-scan:
name: Codacy Security Scan
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
name: Codacy Security Scan
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
Expand Down
Loading

0 comments on commit a2d876c

Please sign in to comment.