Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
- name: Check number of cores
run: |
lscpu
lscpu | grep "CPU(s): " | awk '{print $2}' > num_cores
lscpu | grep "CPU(s): " | awk '{print $2}' > num_cores
echo "NUM_CORES=$(cat num_cores)" >> $GITHUB_ENV

- uses: actions/checkout@v4
Expand Down Expand Up @@ -81,7 +81,7 @@
- name: Check number of cores
run: |
lscpu
lscpu | grep "CPU(s): " | awk '{print $2}' > num_cores
lscpu | grep "CPU(s): " | awk '{print $2}' > num_cores
echo "NUM_CORES=$(cat num_cores)" >> $GITHUB_ENV

- uses: actions/checkout@v4
Expand Down Expand Up @@ -141,7 +141,7 @@
- name: Check number of cores
run: |
lscpu
lscpu | grep "CPU(s): " | awk '{print $2}' > num_cores
lscpu | grep "CPU(s): " | awk '{print $2}' > num_cores
echo "NUM_CORES=$(cat num_cores)" >> $GITHUB_ENV

- uses: actions/checkout@v4
Expand Down Expand Up @@ -229,118 +229,118 @@
path: build/mopac-*-linux.*

mac-build:
# macos-latest is now ARM-based, MOPAC is being distributed for Intel-based Macs right now, so using latest free Intel-based standard runner
runs-on: macos-13
# probably last Intel-based MacOS runner, will need to build on ARM soon
runs-on: macos-15-intel
timeout-minutes: 30

steps:
- name: Check number of cores
run: |
system_profiler SPHardwareDataType
system_profiler SPHardwareDataType | grep "Total Number of Cores" | awk '{print $5}' > num_cores
echo "NUM_CORES=$(cat num_cores)" >> $GITHUB_ENV

- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.x'

# Set up the QT installer framework
- uses: jmarrec/setup-qtifw@v1
with:
qtifw-version: '4.6.x'

- name: Fix permissions for cache restore
run: |
sudo mkdir -p /opt/intel
sudo chown $USER /opt/intel

- name: Cache Intel Fortran compiler
id: cache-intel
uses: actions/cache@v4
with:
path: /opt/intel
key: cache-${{ env.IFORT_MAC_URL }}-${{ env.MKL_MAC_URL }}-macos-13

- name: Download & install Intel Fortran compiler
if: steps.cache-intel.outputs.cache-hit != 'true'
run: |
curl $MKL_MAC_URL --output mkl_download.dmg
hdiutil attach mkl_download.dmg
sudo /Volumes/m_onemkl*/bootstrapper.app/Contents/MacOS/install.sh --silent --eula accept
curl $IFORT_MAC_URL --output ifort_download.dmg
hdiutil attach ifort_download.dmg
sudo /Volumes/m_fortran-compiler*/bootstrapper.app/Contents/MacOS/install.sh --silent --eula accept

- name: Install dependencies with PyPI
run: pip3 install numpy

# AUTO_BLAS=OFF because find_package(BLAS) has a bug with static BLAS libraries on Mac
- name: Configure MOPAC with CMake
run: |
source /opt/intel/oneapi/setvars.sh
cmake -B build \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.8 \
-DCMAKE_Fortran_COMPILER=ifort \
-DCMAKE_Fortran_FLAGS="-static-intel" \
-DCMAKE_C_COMPILER=gcc \
-DAUTO_BLAS=OFF \
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,-ld_classic" \
-DCMAKE_EXE_LINKER_FLAGS="-Wl,-ld_classic" \
-DMOPAC_LINK="${MKLROOT}/lib/libmkl_intel_lp64.a ${MKLROOT}/lib/libmkl_intel_thread.a ${MKLROOT}/lib/libmkl_core.a -liomp5 -lpthread -lm -ldl"

# an Intel-suggested hack is temporarily circumventing excessively slow calls to xcodebuild hidden in ifort, taken from:
# https://community.intel.com/t5/Intel-oneAPI-HPC-Toolkit/slow-execution-of-ifort-icpc-on-MacOSX-catalina/m-p/1203190
- name: Build MOPAC with Make
run: |
source /opt/intel/oneapi/setvars.sh
mkdir xcode_hack
echo -ne '#!/bin/bash\ncase "$4" in\n "")\n echo $INTEL_OSXSDK_VER;;\n *)\n echo $INTEL_OSXSDK_PATH;;\nesac\n' > xcode_hack/xcodebuild
chmod 755 xcode_hack/xcodebuild
export INTEL_OSXSDK_VER=`xcodebuild -sdk macosx -version | grep SDKVersion`
export INTEL_OSXSDK_PATH=`xcodebuild -sdk macosx -version Path`
export PATH=$GITHUB_WORKSPACE/xcode_hack:${PATH}
cmake --build build -- -j$NUM_CORES

- name: Test MOPAC with CTest
run: |
source /opt/intel/oneapi/setvars.sh
cd build
ctest -V -j $NUM_CORES

- name: Save test results as an artifact (on failure)
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: mac-test-output
path: build/tests

- name: Local installation test
run: |
cd build
make install

- name: Package MOPAC with CPack
run: |
source /opt/intel/oneapi/setvars.sh
cd build
cpack -G IFW
ls -l

- name: Local installation test & minimal packaging
run: |
cd build
sudo make install
sudo cpack -G ZIP

- name: Save executable as an artifact
uses: actions/upload-artifact@v4
with:
name: mac-dist
path: build/mopac-*-mac.*

windows-build:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
# NOTE: windows-latest has been switched to Visual Studio 2022, which is not yet supported by Intel development tools
runs-on: windows-2019
timeout-minutes: 30
Expand Down