From 6313d691ce25f48ccd106b30edb51f80688a24bb Mon Sep 17 00:00:00 2001 From: Jonathan Moussa Date: Sun, 9 Aug 2026 15:20:46 -0600 Subject: [PATCH 01/12] Switch Intel toolchain on Windows GHA to conda-forge --- .github/workflows/CI.yaml | 48 ++++++++------------------------------- 1 file changed, 9 insertions(+), 39 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index b674d6219..20c095dd5 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -18,10 +18,6 @@ env: MKL_LINUX_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/adb8a02c-4ee7-4882-97d6-a524150da358/l_onemkl_p_2023.2.0.49497_offline.sh IFORT_MAC_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/2fbce033-15f4-4e13-8d14-f5a2016541ce/m_fortran-compiler-classic_p_2023.2.0.49001_offline.dmg MKL_MAC_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/9399bece-76fb-4b1c-b15c-8ac295448513/m_onemkl_p_2023.2.0.49501_offline.dmg - IFORT_WINDOWS_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/1720594b-b12c-4aca-b7fb-a7d317bac5cb/w_fortran-compiler_p_2023.2.1.7_offline.exe - MKL_WINDOWS_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/2b9cdf66-5291-418e-a7e8-f90515cc9098/w_onemkl_p_2023.2.0.49500_offline.exe - IFORT_WINDOWS_VERSION: 2023.2.1 - MKL_WINDOWS_VERSION: 2023.2.0 jobs: linux-static: @@ -359,47 +355,29 @@ jobs: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: conda-incubator/setup-miniconda@v4 with: - python-version: '3.x' + activate-environment: mopac + + - name: Install compilers & dependencies with conda + run: | + conda install numpy + conda install -c https://software.repos.intel.com/python/conda/ -c conda-forge ifx_win-64 + conda install -c https://software.repos.intel.com/python/conda/ -c conda-forge mkl-static # Set up the QT installer framework - uses: jmarrec/setup-qtifw@v1 with: qtifw-version: '4.6.x' - - name: Cache Intel Fortran compiler - id: cache-intel - uses: actions/cache@v4 - with: - path: C:\Program Files (x86)\Intel - key: cache-${{ env.IFORT_WINDOWS_URL }}-${{ env.MKL_WINDOWS_URL }} - - - name: Download & install Intel Fortran compiler - if: steps.cache-intel.outputs.cache-hit != 'true' - shell: cmd - run: | - curl ${{ env.IFORT_WINDOWS_URL }} --output ifort_download.exe - ifort_download -s -x -f ifort_unpack - ifort_unpack\bootstrapper --silent --eula accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 - curl ${{ env.MKL_WINDOWS_URL }} --output mkl_download.exe - mkl_download -s -x -f mkl_unpack - mkl_unpack\bootstrapper --silent --eula accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 - - - name: Install dependencies with PyPI - run: pip3 install numpy - - # The main Intel\oneAPI\setvars.bat script is not setting up the correct version of ifort, so using component-level scripts - name: Configure MOPAC with CMake shell: cmd run: | - call "C:\Program Files (x86)\Intel\oneAPI\compiler\${{ env.IFORT_WINDOWS_VERSION }}\env\vars.bat" - call "C:\Program Files (x86)\Intel\oneAPI\mkl\${{ env.MKL_WINDOWS_VERSION }}\env\vars.bat" echo %PATH% cmake -Bbuild ^ -GNinja ^ -DBUILD_BZ=ON ^ - -DCMAKE_Fortran_COMPILER=ifort ^ + -DCMAKE_Fortran_COMPILER=ifx ^ -DCMAKE_Fortran_FLAGS="/libs:static" ^ -DBLA_STATIC=ON ^ -DBLA_VENDOR=Intel10_64lp @@ -407,15 +385,11 @@ jobs: - name: Build MOPAC with Ninja shell: cmd run: | - call "C:\Program Files (x86)\Intel\oneAPI\compiler\${{ env.IFORT_WINDOWS_VERSION }}\env\vars.bat" - call "C:\Program Files (x86)\Intel\oneAPI\mkl\${{ env.MKL_WINDOWS_VERSION }}\env\vars.bat" cmake --build build -- -v - name: Test MOPAC with CTest shell: cmd run: | - call "C:\Program Files (x86)\Intel\oneAPI\compiler\${{ env.IFORT_WINDOWS_VERSION }}\env\vars.bat" - call "C:\Program Files (x86)\Intel\oneAPI\mkl\${{ env.MKL_WINDOWS_VERSION }}\env\vars.bat" cd build ctest -V -j %NUM_CORES% @@ -435,8 +409,6 @@ jobs: - name: Package MOPAC with CPack (in development) shell: cmd run: | - call "C:\Program Files (x86)\Intel\oneAPI\compiler\${{ env.IFORT_WINDOWS_VERSION }}\env\vars.bat" - call "C:\Program Files (x86)\Intel\oneAPI\mkl\${{ env.MKL_WINDOWS_VERSION }}\env\vars.bat" cd build cpack -G IFW dir @@ -444,8 +416,6 @@ jobs: - name: Local installation test & minimal packaging shell: cmd run: | - call "C:\Program Files (x86)\Intel\oneAPI\compiler\${{ env.IFORT_WINDOWS_VERSION }}\env\vars.bat" - call "C:\Program Files (x86)\Intel\oneAPI\mkl\${{ env.MKL_WINDOWS_VERSION }}\env\vars.bat" cd build make install cpack -G ZIP From 476a4c2753e123967991f273db5b2bd1fa5ada99 Mon Sep 17 00:00:00 2001 From: Jonathan Moussa Date: Sun, 9 Aug 2026 19:01:54 -0600 Subject: [PATCH 02/12] Cache the conda environment on Windows GHA runner --- .github/workflows/CI.yaml | 44 +++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 20c095dd5..c723c6f1a 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -344,6 +344,9 @@ jobs: windows-build: runs-on: windows-latest + defaults: + run: + shell: bash -el {0} timeout-minutes: 30 steps: @@ -353,11 +356,24 @@ jobs: $ncores = (Get-CimInstance -ClassName Win32_Processor | Measure-Object -Property NumberOfLogicalProcessors -Sum).Sum echo "num_cores=$ncores" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 + - name: Cache conda + uses: actions/cache@v5 + env: + # Increase this value to reset cache if etc/example-environment.yml has not changed + CACHE_NUMBER: 0 + with: + # Use faster GNU tar + enableCrossOsArchive: true + path: D:\conda_pkgs_dir + key: + ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }} - uses: conda-incubator/setup-miniconda@v4 with: activate-environment: mopac + channel-priority: strict + pkgs-dirs: D:\conda_pkgs_dir - name: Install compilers & dependencies with conda run: | @@ -371,27 +387,22 @@ jobs: qtifw-version: '4.6.x' - name: Configure MOPAC with CMake - shell: cmd run: | - echo %PATH% - cmake -Bbuild ^ - -GNinja ^ - -DBUILD_BZ=ON ^ - -DCMAKE_Fortran_COMPILER=ifx ^ - -DCMAKE_Fortran_FLAGS="/libs:static" ^ - -DBLA_STATIC=ON ^ + cmake -Bbuild \ + -GNinja \ + -DBUILD_BZ=ON \ + -DCMAKE_Fortran_COMPILER=ifx \ + -DCMAKE_Fortran_FLAGS="/libs:static" \ + -DBLA_STATIC=ON \ -DBLA_VENDOR=Intel10_64lp - name: Build MOPAC with Ninja - shell: cmd - run: | - cmake --build build -- -v + run: cmake --build build -- -v - name: Test MOPAC with CTest - shell: cmd run: | cd build - ctest -V -j %NUM_CORES% + ctest -V -j $NUM_CORES - name: Save test results as an artifact (on failure) if: ${{ failure() }} @@ -401,20 +412,17 @@ jobs: path: build/tests - name: Local installation test - shell: cmd run: | cd build cmake --install . - name: Package MOPAC with CPack (in development) - shell: cmd run: | cd build cpack -G IFW - dir + ls - name: Local installation test & minimal packaging - shell: cmd run: | cd build make install From 3044441c005450b31234378a0db436f4a25808cf Mon Sep 17 00:00:00 2001 From: Jonathan Moussa Date: Mon, 10 Aug 2026 00:00:07 -0600 Subject: [PATCH 03/12] Switch to setup-fortran-conda Action --- .github/workflows/CI.yaml | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index c723c6f1a..c1d682210 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -358,27 +358,31 @@ jobs: - uses: actions/checkout@v6 - - name: Cache conda - uses: actions/cache@v5 - env: - # Increase this value to reset cache if etc/example-environment.yml has not changed - CACHE_NUMBER: 0 + - uses: gha3mi/setup-fortran-conda@latest with: - # Use faster GNU tar - enableCrossOsArchive: true - path: D:\conda_pkgs_dir - key: - ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }} - - uses: conda-incubator/setup-miniconda@v4 - with: - activate-environment: mopac - channel-priority: strict - pkgs-dirs: D:\conda_pkgs_dir + compiler: ifx + +# - name: Cache conda +# uses: actions/cache@v5 +# env: +# # Increase this value to reset cache if etc/example-environment.yml has not changed +# CACHE_NUMBER: 0 +# with: +# # Use faster GNU tar +# enableCrossOsArchive: true +# path: D:\conda_pkgs_dir +# key: +# ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }} +# - uses: conda-incubator/setup-miniconda@v4 +# with: +# activate-environment: mopac +# channel-priority: strict +# pkgs-dirs: D:\conda_pkgs_dir - name: Install compilers & dependencies with conda run: | conda install numpy - conda install -c https://software.repos.intel.com/python/conda/ -c conda-forge ifx_win-64 +# conda install -c https://software.repos.intel.com/python/conda/ -c conda-forge ifx_win-64 conda install -c https://software.repos.intel.com/python/conda/ -c conda-forge mkl-static # Set up the QT installer framework From c751864dabf9cad4af33bac8896d07705109694f Mon Sep 17 00:00:00 2001 From: Jonathan Moussa Date: Mon, 10 Aug 2026 00:08:18 -0600 Subject: [PATCH 04/12] Fix action syntax --- .github/workflows/CI.yaml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index c1d682210..d6145c249 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -362,23 +362,6 @@ jobs: with: compiler: ifx -# - name: Cache conda -# uses: actions/cache@v5 -# env: -# # Increase this value to reset cache if etc/example-environment.yml has not changed -# CACHE_NUMBER: 0 -# with: -# # Use faster GNU tar -# enableCrossOsArchive: true -# path: D:\conda_pkgs_dir -# key: -# ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }} -# - uses: conda-incubator/setup-miniconda@v4 -# with: -# activate-environment: mopac -# channel-priority: strict -# pkgs-dirs: D:\conda_pkgs_dir - - name: Install compilers & dependencies with conda run: | conda install numpy From f6d6427ecac02afbb6c4d0bb5d37d03545f0f628 Mon Sep 17 00:00:00 2001 From: Jonathan Moussa Date: Mon, 10 Aug 2026 00:19:59 -0600 Subject: [PATCH 05/12] Fix action version --- .github/workflows/CI.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index d6145c249..99533e737 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -358,7 +358,7 @@ jobs: - uses: actions/checkout@v6 - - uses: gha3mi/setup-fortran-conda@latest + - uses: gha3mi/setup-fortran-conda@v0.18.1 with: compiler: ifx From 5f45c3b9811be81d9be100028e9b5c148552aae3 Mon Sep 17 00:00:00 2001 From: Jonathan Moussa Date: Mon, 10 Aug 2026 00:25:17 -0600 Subject: [PATCH 06/12] Move other conda packages to Fortran action --- .github/workflows/CI.yaml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 99533e737..36fb831e5 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -358,15 +358,11 @@ jobs: - uses: actions/checkout@v6 - - uses: gha3mi/setup-fortran-conda@v0.18.1 + - name: Setup Fortran + uses: gha3mi/setup-fortran-conda@latest with: compiler: ifx - - - name: Install compilers & dependencies with conda - run: | - conda install numpy -# conda install -c https://software.repos.intel.com/python/conda/ -c conda-forge ifx_win-64 - conda install -c https://software.repos.intel.com/python/conda/ -c conda-forge mkl-static + extra-packages: "numpy mkl-static" # Set up the QT installer framework - uses: jmarrec/setup-qtifw@v1 From d367930815370ee3b666cfdb21617a79775bb269 Mon Sep 17 00:00:00 2001 From: Jonathan Moussa Date: Mon, 10 Aug 2026 00:41:21 -0600 Subject: [PATCH 07/12] Revert change to default Windows shell --- .github/workflows/CI.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 36fb831e5..837fce348 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -344,9 +344,6 @@ jobs: windows-build: runs-on: windows-latest - defaults: - run: - shell: bash -el {0} timeout-minutes: 30 steps: From 0b97b919bb3fa4cdf4db978b0f194b1900ba125d Mon Sep 17 00:00:00 2001 From: Jonathan Moussa Date: Mon, 10 Aug 2026 00:47:46 -0600 Subject: [PATCH 08/12] Fix CMake syntax for the change in shell --- .github/workflows/CI.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 837fce348..34d7f351d 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -368,8 +368,8 @@ jobs: - name: Configure MOPAC with CMake run: | - cmake -Bbuild \ - -GNinja \ + cmake -B build \ + -G Ninja \ -DBUILD_BZ=ON \ -DCMAKE_Fortran_COMPILER=ifx \ -DCMAKE_Fortran_FLAGS="/libs:static" \ From 2455176b8445cead8adc4f1e280af2348d3ca078 Mon Sep 17 00:00:00 2001 From: Jonathan Moussa Date: Mon, 10 Aug 2026 00:58:33 -0600 Subject: [PATCH 09/12] Fix the powershell line extender --- .github/workflows/CI.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 34d7f351d..014572977 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -368,12 +368,12 @@ jobs: - name: Configure MOPAC with CMake run: | - cmake -B build \ - -G Ninja \ - -DBUILD_BZ=ON \ - -DCMAKE_Fortran_COMPILER=ifx \ - -DCMAKE_Fortran_FLAGS="/libs:static" \ - -DBLA_STATIC=ON \ + cmake -B build ` + -G Ninja ` + -DBUILD_BZ=ON ` + -DCMAKE_Fortran_COMPILER=ifx ` + -DCMAKE_Fortran_FLAGS="/libs:static" ` + -DBLA_STATIC=ON ` -DBLA_VENDOR=Intel10_64lp - name: Build MOPAC with Ninja From aa56e6fd1a53484a90199e3998549d03b30f539b Mon Sep 17 00:00:00 2001 From: Jonathan Moussa Date: Mon, 10 Aug 2026 09:17:30 -0600 Subject: [PATCH 10/12] Let the Fortran setup action perform the repo checkout --- .github/workflows/CI.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 014572977..113678a3a 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -353,7 +353,8 @@ jobs: $ncores = (Get-CimInstance -ClassName Win32_Processor | Measure-Object -Property NumberOfLogicalProcessors -Sum).Sum echo "num_cores=$ncores" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append - - uses: actions/checkout@v6 +# Setup Fortran performs the checkout... +# - uses: actions/checkout@v6 - name: Setup Fortran uses: gha3mi/setup-fortran-conda@latest From e2d611d4f1d75df0b4da9b9269dc8e7c150ef511 Mon Sep 17 00:00:00 2001 From: Jonathan Moussa Date: Mon, 10 Aug 2026 09:24:58 -0600 Subject: [PATCH 11/12] Switch Windows to gfortran compiler --- .github/workflows/CI.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 113678a3a..8efd23164 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -359,7 +359,7 @@ jobs: - name: Setup Fortran uses: gha3mi/setup-fortran-conda@latest with: - compiler: ifx + compiler: gfortran extra-packages: "numpy mkl-static" # Set up the QT installer framework From bc6dfe00c180c623e7505af04b05b273c91ab4d9 Mon Sep 17 00:00:00 2001 From: Jonathan Moussa Date: Mon, 10 Aug 2026 09:34:42 -0600 Subject: [PATCH 12/12] Switch Windows to gfortran compiler (fix cmake command) --- .github/workflows/CI.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 8efd23164..d3cce7eca 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -372,7 +372,7 @@ jobs: cmake -B build ` -G Ninja ` -DBUILD_BZ=ON ` - -DCMAKE_Fortran_COMPILER=ifx ` + -DCMAKE_Fortran_COMPILER=gfortran ` -DCMAKE_Fortran_FLAGS="/libs:static" ` -DBLA_STATIC=ON ` -DBLA_VENDOR=Intel10_64lp