Skip to content

Commit

Permalink
Merge branch 'master' into flying-edges
Browse files Browse the repository at this point in the history
Signed-off-by: Geoff Hutchison <[email protected]>
  • Loading branch information
ghutchis authored Nov 16, 2024
2 parents 77d870e + a0ca28b commit e06bbc8
Show file tree
Hide file tree
Showing 355 changed files with 36,216 additions and 30,469 deletions.
50 changes: 37 additions & 13 deletions .github/workflows/build_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,26 @@ jobs:
}
- {
name: "Ubuntu AppImage", artifact: "Avogadro2.AppImage",
os: ubuntu-20.04,
os: ubuntu-22.04,
cc: "gcc", cxx: "g++",
build_type: "Release",
cmake_flags: "-G Ninja -DINSTALL_BUNDLE_FILES=ON -USE_SYSTEM_ZLIB=ON",
cmake_flags: "-G Ninja -DBUILD_MOLEQUEUE=OFF -DINSTALL_BUNDLE_FILES=ON -USE_SYSTEM_ZLIB=ON",
cpack: "",
}
- {
name: "macOS Latest Clang", artifact: "macOS.dmg",
os: macos-latest,
name: "macOS Clang", artifact: "macOS.dmg",
os: macos-13,
cc: "clang", cxx: "clang++",
build_type: "Release",
cmake_flags: "-G Ninja",
cmake_flags: "-G Ninja -DBUILD_MOLEQUEUE=OFF",
cpack_flags: "-G DragNDrop",
}
- {
name: "Windows Latest MSVC", artifact: "Win64.exe",
os: windows-latest,
cc: "cl", cxx: "cl",
build_type: "Release",
cmake_flags: "",
cmake_flags: "-DBUILD_MOLEQUEUE=OFF",
build_flags: "-j 2",
cpack_flags: "-G NSIS",
}
Expand All @@ -82,10 +82,12 @@ jobs:
- name: Install Dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo add-apt-repository -y universe
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
sudo apt install libfuse2
- name: Install Dependencies (macOS)
if: runner.os == 'macOS'
run: |
Expand Down Expand Up @@ -116,6 +118,18 @@ jobs:
repository: openchemistry/molecules
path: molecules

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

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

- name: Checkout i18n
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -229,13 +243,18 @@ jobs:
CODESIGN_IDENTITY: ${{ secrets.CODESIGN_ID }}
PRODUCT_BUNDLE_IDENTIFIER: cc.avogadro
run: |
# be sure the DMG can be created easily
# https://github.com/actions/runner-images/issues/7522#issuecomment-1556766641
echo killing...; sudo pkill -9 XProtect >/dev/null || true;
echo waiting...; while pgrep XProtect; do sleep 3; done;
# create variables
if [ -n "${P12_PASSWORD}" ]; then
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate and provisioning profile from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 -d -o $CERTIFICATE_PATH
# create temporary keychain if the cert is non-zero
if [ -s $CERTIFICATE_PATH ]; then
Expand All @@ -252,7 +271,7 @@ jobs:
fi # password exists
- name: Create Mac and Windows Packages
if: matrix.config.os == 'windows-latest' || matrix.config.os == 'macos-latest'
if: matrix.config.os == 'windows-latest' || runner.os == 'macOS'
shell: bash
run: |
if [ -z "${P12_PASSWORD}" ]; then
Expand All @@ -270,21 +289,26 @@ jobs:
OPENSSL_ROOT_DIR: ${{ matrix.config.ssl_env }}

- name: AppImage
if: matrix.config.os == 'ubuntu-20.04' && matrix.config.build_type == 'Release'
if: matrix.config.os == 'ubuntu-22.04' && matrix.config.build_type == 'Release'
shell: bash
run: |
mkdir appdir
mv prefix appdir/usr
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:appdir/usr/lib
wget -c -nv "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
wget -c -nv "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage"
wget -c -nv "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod a+x *.AppImage
./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -bundle-non-qt-libs -extra-plugins=iconengines
./linuxdeploy-x86_64.AppImage -d appdir/usr/share/applications/*.desktop --plugin qt --appdir appdir
# add the custom AppRun
rm appdir/AppRun
cp ../avogadrolibs/avogadrolibs/scripts/AppImage.sh appdir/AppRun
chmod a+x appdir/AppRun
./appimagetool-x86_64.AppImage appdir
mv Avogadro2*.AppImage avogadroapp # for upload
mv Avogadro*.AppImage avogadroapp # for upload
working-directory: ${{ runner.workspace }}/build

- name: Notarize Mac DMG
Expand Down Expand Up @@ -312,7 +336,7 @@ jobs:
if: matrix.config.artifact != 0
uses: actions/upload-artifact@v4
with:
path: ${{ runner.workspace }}/build/avogadroapp/Avogadro2*.*
path: ${{ runner.workspace }}/build/avogadroapp/Avogadro*.*
name: ${{ matrix.config.artifact }}

- name: Cleanup
Expand Down
22 changes: 17 additions & 5 deletions .github/workflows/build_m1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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 -DUSE_3DCONNEXION=ON
FEATURES: -DUSE_VTK=ON -DBUILD_GPL_PLUGINS=ON -DBUILD_MOLEQUEUE=OFF -DWITH_COORDGEN=OFF -DUSE_3DCONNEXION=ON

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -58,6 +58,18 @@ jobs:
repository: openchemistry/molecules
path: molecules

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

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

- name: Checkout avogadrolibs
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -85,18 +97,18 @@ jobs:

- name: Fix Mac plugins
if: runner.os == 'macOS'
working-directory: ${{ runner.workspace }}/build/prefix/lib/openbabel
working-directory: ${{ runner.workspace }}/build/prefix/lib/openbabel
run: |
for plugin in *.so; do
for libpath in `otool -L ${plugin} | grep '/Users/runner' | awk '{print $1}'`; do
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' | awk '{print $1}'`; do
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
Expand All @@ -107,7 +119,7 @@ jobs:
# 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
# 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
Expand Down
32 changes: 22 additions & 10 deletions .github/workflows/build_qt6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ name: Qt6 Build Matrix
on: [push, pull_request, workflow_dispatch]

env:
QT_VERSION: 6.5.3
QT_VERSION: 6.8.0
# this is different from MACOSX_DEPLOYMENT_TARGET to prevent build problems
# we set MACOSX_DEPLOYMENT_TARGET later
MACOS_TARGET: 10.15
FEATURES: -DBUILD_GPL_PLUGINS=ON -DWITH_COORDGEN=OFF -DUSE_VTK=ON -DQT_VERSION=6
FEATURES: -DBUILD_GPL_PLUGINS=ON -DBUILD_MOLEQUEUE=OFF -DWITH_COORDGEN=OFF -DUSE_VTK=ON -DQT_VERSION=6

jobs:
build:
Expand All @@ -31,7 +31,7 @@ jobs:
}
- {
name: "Ubuntu Qt6 AppImage", artifact: "",
os: ubuntu-20.04,
os: ubuntu-22.04,
cc: "gcc", cxx: "g++",
build_type: "Release",
cmake_flags: "-G Ninja -DINSTALL_BUNDLE_FILES=ON",
Expand All @@ -42,7 +42,7 @@ jobs:
os: macos-latest,
cc: "clang", cxx: "clang++",
build_type: "Release",
cmake_flags: "-G Ninja",
cmake_flags: "-G Ninja -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64'",
cpack_flags: "-G DragNDrop",
}
- {
Expand All @@ -65,11 +65,7 @@ jobs:
- name: Install Dependencies (macOS)
if: runner.os == 'macOS'
run: |
if uname -p | grep -q "arm" ; then
export PATH=/opt/homebrew/bin:$PATH
else # not self-hosted runner
brew install ninja eigen glew
fi
brew install ninja eigen glew
- name: Install Dependencies (Windows)
if: runner.os == 'Windows'
run: choco install ninja
Expand All @@ -92,11 +88,20 @@ jobs:
path: avogadrolibs

- name: Install Qt
if: runner.os != 'Windows'
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
aqtversion: '==3.1.*'
modules: 'qt5compat'

- name: Install Qt (Windows)
if: runner.os == 'Windows'
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
aqtversion: '==3.1.*'
host: windows
arch: win64_msvc2022_64

- name: Configure MSVC Command Prompt
if: runner.os == 'Windows'
Expand Down Expand Up @@ -136,6 +141,13 @@ jobs:
message(FATAL_ERROR "Running tests failed!")
endif()
- name: Upload
if: matrix.config.artifact != 0
uses: actions/upload-artifact@v4
with:
path: ${{ runner.workspace }}/build/avogadroapp/Avogadro2*.*
name: ${{ matrix.config.artifact }}

- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
4 changes: 2 additions & 2 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ concurrency:

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"
CIBW_SKIP: "cp36-* cp37-* cp311-manylinux* cp312-manylinux* cp38-macosx_arm64 pp* *-musllinux_* *-manylinux_i686 *-win32"

# Need to do some setup before repairing the wheel on linux...
CIBW_REPAIR_WHEEL_COMMAND_LINUX: bash scripts/github-actions/repair_command_linux.sh

CIBW_BEFORE_ALL_LINUX: yum install -y git eigen3-devel
CIBW_BEFORE_ALL_LINUX: bash scripts/github-actions/repair-linux.sh

# Specify eigen location for windows
CIBW_ENVIRONMENT_WINDOWS: "EXTRA_CMAKE_ARGS=-DEIGEN3_INCLUDE_DIR:PATH=/c/eigen"
Expand Down
101 changes: 101 additions & 0 deletions .github/workflows/flatpak.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Build Flatpak

on: [push, pull_request, workflow_dispatch]

jobs:
flatpak:
name: "Flatpak"
runs-on: ubuntu-latest

steps:
- name: Install dependencies
run: sudo apt update -qq && sudo apt install -y -qq flatpak flatpak-builder

- name: Configure flatpak
run: flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo

- name: Configure git
run: git config --global protocol.file.allow always
# Have to do this because for a while git's handling of submodules was broken
# See https://github.com/flatpak/flatpak-builder/issues/495

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

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

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

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

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

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

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

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

- name: Checkout Flathub shared-modules
uses: actions/checkout@v4
with:
repository: flathub/shared-modules
path: shared-modules

- name: Set up tmate session
if: failure()
uses: mxschmitt/action-tmate@v3

- name: Move manifest
run: mv openchemistry/avogadroapp/flatpak/org.openchemistry.Avogadro2.yaml ./

- name: Build with flatpak-builder
run: flatpak-builder --force-clean --user --install-deps-from=flathub --arch=x86_64 --default-branch=test --repo=repo builddir org.openchemistry.Avogadro2.yaml

- name: Create bundle
run: flatpak build-bundle repo Avogadro2.flatpak org.openchemistry.Avogadro2 test

- name: Upload bundle
uses: actions/upload-artifact@v4
with:
path: Avogadro2.flatpak

- name: Cleanup
if: ${{ always() }} # To ensure this step runs even when earlier steps fail
shell: bash
run: |
ls -la ./
rm -rf ./* || true
rm -rf ./.??* || true
ls -la ./
2 changes: 1 addition & 1 deletion .github/workflows/update-i18n-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
sh scripts/extract-messages.sh
- name: Create pull request
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
commit-message: "Automated translation updates"
signoff: true
Expand Down
Loading

1 comment on commit e06bbc8

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: clang-format-diff detected formatting issues. See the artifact for a patch or run clang-format on your branch.

Please sign in to comment.