Skip to content

Commit

Permalink
Merge branch 'develop' into apple-silicon
Browse files Browse the repository at this point in the history
  • Loading branch information
rhinoella committed Jan 16, 2024
2 parents c56d9d8 + cf9b34c commit 00f7360
Show file tree
Hide file tree
Showing 1,416 changed files with 2,385 additions and 1,836 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/build/osx/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ runs:
python-version: ${{ env.pythonVersion }}

- name: Install Homebrew Dependencies for Intel
if: ${{ inputs.cacheOnly == 'false' && env.CMAKE_TARGET == 'x86_64' }}

if: ${{ inputs.cacheOnly == 'false' && env.OSX_CMAKE_TARGET == 'x86_64' }}
shell: bash
run: |
Expand Down Expand Up @@ -56,6 +57,17 @@ runs:
# Main Build
#


# - name: Retrieve Conan Cache
# id: cache-conan
# uses: actions/cache@v3
# with:
# key: osx-conan-${{ env.conanHash }}
# path: |
# ~/.conan
# ~/.conancache


- name: Install Conan Dependencies
shell: bash
run: |
Expand All @@ -66,7 +78,9 @@ runs:
mkdir build && cd build
conan config set storage.download_cache="${GITHUB_WORKSPACE}/.conancache"
conan install .. --build missing -s arch=x86_64
conan install .. --build missing -s arch=${{ env.OSX_CONAN_TARGET }}

- name: Build
if: ${{ inputs.cacheOnly == 'false' }}
Expand All @@ -78,19 +92,22 @@ runs:
export PATH="$(python3 -m site --user-base)/bin:$PATH"
Qt6_DIR=${{ runner.temp }}/qt/${{ env.qtVersion }}/macos/lib/cmake/Qt6
QT_BASE_DIR=${{ runner.temp }}/qt/${{ env.qtVersion }}/macos
ANTLR_EXE=/usr/local/Cellar/antlr/4.13.1/antlr-4.13.1-complete.jar
ANTLR_EXE=/usr/local/Cellar/antlr/${{ env.antlrVersion }}/antlr-${{ env.antlrVersion }}-complete.jar
echo "Detected ANTLR exe as [$ANTLR_EXE]"
echo "JAVA HOME: $JAVA_HOME_21_X64"
# Build
cd build
cmake -G Ninja -DGUI:bool=true -DMULTI_THREADING:bool=${{ inputs.threading }} -DJava_JAVA_EXECUTABLE:path=$JAVA_HOME_21_X64/bin/java -DANTLR_EXECUTABLE:string=$ANTLR_EXE -DFTGL_INCLUDE_DIR:path=/usr/local/Cellar/ftgl/2.1.3-rc5/include -DFTGL_LIBRARY:path=/usr/local/Cellar/ftgl/2.1.3-rc5/lib -DCMAKE_OSX_ARCHITECTURES:string="x86_64" ${{ inputs.extraCMakeFlags }} -DQT_BASE_DIR=$QT_BASE_DIR ../
cmake -G Ninja -DGUI:bool=true -DMULTI_THREADING:bool=${{ inputs.threading }} -DJava_JAVA_EXECUTABLE:path=$JAVA_HOME_21_X64/bin/java -DANTLR_EXECUTABLE:string=$ANTLR_EXE -DCMAKE_OSX_ARCHITECTURES:string="${{ env.OSX_CMAKE_TARGET }}" ${{ inputs.extraCMakeFlags }} -DQT_BASE_DIR=$QT_BASE_DIR ../
cmake --build . --config Release
cd ../
# Deploy Conan dependencies for ease
mkdir deploy && cd deploy
conan install .. -g deploy -s arch=x86_64
conan install .. -g deploy -s arch=${{ env.OSX_CONAN_TARGET }}
- name: Upload Raw Build Artifacts
if: ${{ inputs.cacheOnly == 'false' }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build/windows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ runs:
shell: bash
run: |
set -ex
wget https://www.antlr.org/download/antlr-4.13.1-complete.jar -Oantlr-4.13.1-complete.jar
wget https://www.antlr.org/download/antlr-${{ env.antlrVersion }}-complete.jar -Oantlr-${{ env.antlrVersion }}-complete.jar
wget https://download.oracle.com/java/21/latest/jdk-21_windows-x64_bin.zip -Ojava.zip
unzip java.zip
Expand Down Expand Up @@ -167,7 +168,7 @@ runs:
run: |
# Setup environment
Qt6_DIR="${RUNNER_TEMP}\qt\${{ env.qtVersion }}\msvc2019_64"
ANTLR_EXE="${RUNNER_TEMP}\antlr-4.13.1-complete.jar"
ANTLR_EXE="${RUNNER_TEMP}\antlr-${{ env.antlrVersion }}-complete.jar"
export PATH="${Qt6_DIR}\bin;$PATH"
INCLUDE="${RUNNER_TEMP}\freetype-latest;$INCLUDE"
LIB="${RUNNER_TEMP}\freetype-install\lib;${RUNNER_TEMP}\freetype-install\bin;$LIB"
Expand Down
28 changes: 15 additions & 13 deletions .github/workflows/continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ jobs:
- os: macos-latest
cmake_target: arm64
conan_target: armv8
- os: macos-latest
cmake_target: x86_64
conan_target: x86_64
- os: windows-latest
#- os: macos-latest
# cmake_target: x86_64
# conan_target: x86_64
#- os: windows-latest
runs-on: ${{ matrix.os }}
env:
CMAKE_TARGET: ${{ matrix.cmake_target }}
CONAN_TARGET: ${{ matrix.conan_target }}
OSX_CMAKE_TARGET: ${{ matrix.osx_cmake_target }}
OSX_CONAN_TARGET: ${{ matrix.osx_conan_target }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -57,6 +57,7 @@ jobs:

BuildLinux:
needs: QC
if: false
strategy:
fail-fast: false
matrix:
Expand All @@ -75,22 +76,23 @@ jobs:
target: ${{ matrix.target }}

Package:
needs: [ Build, BuildLinux ]
#needs: [ Build, BuildLinux ]
needs: [ Build ]
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
cmake_target: arm64
conan_target: armv8
- os: macos-latest
cmake_target: x86_64
conan_target: x86_64
- os: windows-latest
#- os: macos-latest
# cmake_target: x86_64
# conan_target: x86_64
#- os: windows-latest
runs-on: ${{ matrix.os }}
env:
CMAKE_TARGET: ${{ matrix.cmake_target }}
CONAN_TARGET: ${{ matrix.conan_target }}
OSX_CMAKE_TARGET: ${{ matrix.osx_cmake_target }}
OSX_CONAN_TARGET: ${{ matrix.osx_conan_target }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/package/osx/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ runs:
export PATH="$(python3 -m site --user-base)/bin:$PATH"
# Handle ANTLR & TBB
cp ./deploy/antlr4-cppruntime/lib/libantlr4-runtime.4.13.1.dylib /usr/local/lib/libantlr4-runtime.4.13.1.dylib
cp ./deploy/antlr4-cppruntime/lib/libantlr4-runtime.*.dylib /usr/local/lib
cp ./deploy/antlr4-cppruntime/lib/libantlr4-runtime.dylib /usr/local/lib/libantlr4-runtime.dylib
for FILE in ./deploy/onetbb/lib/*.dylib; do
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,17 @@ jobs:
fail-fast: false
matrix:
include:
- os: macos-latest
target: 'arm64'
- os: macos-latest
osx_cmake_target: arm64
osx_conan_target: armv8
#- os: macos-latest
# target: 'x86_64'
# cmake_target: x86_64
# conan_target: x86_64
#- os: windows-latest
runs-on: ${{ matrix.os }}
env:
OSX_TARGET: ${{ matrix.target }}
OSX_CMAKE_TARGET: ${{ matrix.osx_cmake_target }}
OSX_CONAN_TARGET: ${{ matrix.osx_conan_target }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -80,6 +83,9 @@ jobs:
os: [ macos-latest]
#os: [ macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
env:
OSX_CMAKE_TARGET: ${{ matrix.osx_cmake_target }}
OSX_CONAN_TARGET: ${{ matrix.osx_conan_target }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
30 changes: 18 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,17 @@ jobs:
fail-fast: false
matrix:
include:
- os: macos-latest
cmake_target: x86_64
conan_target: x86_64
- os: windows-latest
- os: macos-latest
osx_cmake_target: arm64
osx_conan_target: armv8
#- os: macos-latest
# cmake_target: x86_64
# conan_target: x86_64
#- os: windows-latest
runs-on: ${{ matrix.os }}
env:
CMAKE_TARGET: ${{ matrix.cmake_target }}
CONAN_TARGET: ${{ matrix.conan_target }}
OSX_CMAKE_TARGET: ${{ matrix.osx_cmake_target }}
OSX_CONAN_TARGET: ${{ matrix.osx_conan_target }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -75,14 +78,17 @@ jobs:
fail-fast: false
matrix:
include:
- os: macos-latest
cmake_target: x86_64
conan_target: x86_64
- os: windows-latest
- os: macos-latest
osx_cmake_target: arm64
osx_conan_target: armv8
#- os: macos-latest
# cmake_target: x86_64
# conan_target: x86_64
#- os: windows-latest
runs-on: ${{ matrix.os }}
env:
CMAKE_TARGET: ${{ matrix.cmake_target }}
CONAN_TARGET: ${{ matrix.conan_target }}
OSX_CMAKE_TARGET: ${{ matrix.osx_cmake_target }}
OSX_CONAN_TARGET: ${{ matrix.osx_conan_target }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ runs:
echo "dissolveMajorVersion=${DISSOLVE_MAJOR}" >> ${GITHUB_ENV}
echo "dissolveMinorVersion=${DISSOLVE_MINOR}" >> ${GITHUB_ENV}
echo "dissolvePatchVersion=${DISSOLVE_PATCH}" >> ${GITHUB_ENV}
- name: Get package versions
shell: bash
run: |
ANTLR_VERSION=$(cat conanfile.txt | sed -n -e 's%^.*antlr4-cppruntime/%%p')
echo "antlrVersion=${ANTLR_VERSION}" >> ${GITHUB_ENV}
- name: Install Dependencies (OSX)
if: ${{ runner.os == 'macos' }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ build-*/
*swp
changes
*.tokens
.gdb_history

# Example files
*.beat
Expand Down
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ option(MULTI_THREADING "Enable threading using tbb" ON)
if(MULTI_THREADING)
add_definitions("-DMULTITHREADING")
if(CONAN)
include_directories(${CONAN_INCLUDE_DIRS_ONETBB})
include_directories(${CONAN_INCLUDE_DIRS_ONEDPL})
include_directories(CONAN_INCLUDE_DIRS_ONETBB)
include_directories(CONAN_INCLUDE_DIRS_ONEDPL)
set(THREADING_LINK_LIBS ${THREADING_LINK_LIBS} CONAN_PKG::onetbb)
if(WIN32 OR APPLE)
if(WIN32)
set(THREADING_LINK_LIBS ${THREADING_LINK_LIBS} CONAN_PKG::onedpl)
endif()
endif(WIN32)
else(CONAN)
set(THREADING_LINK_LIBS ${THREADING_LINK_LIBS} $ENV{THREADING_LINK_LIBS})
endif(CONAN)
Expand Down Expand Up @@ -104,6 +104,7 @@ if(GUI)
# Add extra functions
include(FindFTGL)
find_package(FTGL REQUIRED)
find_package(Freetype REQUIRED)
endif()
add_definitions(-DQT_NO_KEYWORDS)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![Dissolve's Logo](icon/logo.png)

_Last Release: 1.3.3, Tuesday 15th August 2023_
_Last Release: 1.4.0, Friday 12th January 2024_

_Release Build::_ [![Release Build Status](https://github.com/disorderedmaterials/dissolve/actions/workflows/release.yml/badge.svg)](https://github.com/disorderedmaterials/dissolve/actions/workflows/release.yml)
_Development Build::_ [![Development Build Status](https://github.com/disorderedmaterials/dissolve/actions/workflows/continuous.yml/badge.svg)](https://github.com/disorderedmaterials/dissolve/actions/workflows/continuous.yml)
Expand Down
2 changes: 1 addition & 1 deletion benchmark/array/array_benchmark.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (c) 2023 Team Dissolve and contributors
// Copyright (c) 2024 Team Dissolve and contributors

#include "benchmark/benchmark.h"
#include "math/data1D.h"
Expand Down
2 changes: 1 addition & 1 deletion benchmark/benchmarks.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (c) 2023 Team Dissolve and contributors
// Copyright (c) 2024 Team Dissolve and contributors

#include "benchmark/benchmark.h"

Expand Down
2 changes: 1 addition & 1 deletion benchmark/box/box_benchmark.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (c) 2023 Team Dissolve and contributors
// Copyright (c) 2024 Team Dissolve and contributors

#include "benchmark/benchmark.h"
#include "classes/box.h"
Expand Down
2 changes: 1 addition & 1 deletion benchmark/calculate_gr/calculate_gr_benchmark.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (c) 2023 Team Dissolve and contributors
// Copyright (c) 2024 Team Dissolve and contributors

#include "benchmark/benchmark.h"
#include "common/problems.h"
Expand Down
2 changes: 1 addition & 1 deletion benchmark/common/problems.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (c) 2023 Team Dissolve and contributors
// Copyright (c) 2024 Team Dissolve and contributors

#pragma once

Expand Down
2 changes: 1 addition & 1 deletion benchmark/energy/energy_benchmark.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (c) 2023 Team Dissolve and contributors
// Copyright (c) 2024 Team Dissolve and contributors

#include "benchmark/benchmark.h"
#include "classes/cell.h"
Expand Down
2 changes: 1 addition & 1 deletion benchmark/forces/forces_benchmark.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (c) 2023 Team Dissolve and contributors
// Copyright (c) 2024 Team Dissolve and contributors

#include "benchmark/benchmark.h"
#include "classes/cell.h"
Expand Down
2 changes: 1 addition & 1 deletion benchmark/histogram/histogram_benchmark.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (c) 2023 Team Dissolve and contributors
// Copyright (c) 2024 Team Dissolve and contributors

#include "benchmark/benchmark.h"
#include "math/histogram1D.h"
Expand Down
2 changes: 1 addition & 1 deletion benchmark/math/math_benchmark.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (c) 2023 Team Dissolve and contributors
// Copyright (c) 2024 Team Dissolve and contributors

#include "benchmark/benchmark.h"
#include "math/interpolator.h"
Expand Down
2 changes: 1 addition & 1 deletion benchmark/region/region_benchmark.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (c) 2023 Team Dissolve and contributors
// Copyright (c) 2024 Team Dissolve and contributors

#include "benchmark/benchmark.h"
#include "classes/box.h"
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/FindANTLR.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ find_package(Java 11 QUIET COMPONENTS Runtime)

if(NOT ANTLR_EXECUTABLE)
find_program(ANTLR_EXECUTABLE
NAMES antlr4 antlr.jar antlr4.jar antlr-4.jar antlr-4.13.1-complete.jar)
NAMES antlr4 antlr.jar antlr4.jar antlr-4.jar)
endif()

# Set command to run
Expand Down
2 changes: 1 addition & 1 deletion conanfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ cmake
[options]
fmt:header_only=True
pugixml:header_only=False
antlr4-cppruntime:shared=True
antlr4-cppruntime:shared=True

0 comments on commit 00f7360

Please sign in to comment.