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
2 changes: 1 addition & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -347,111 +347,111 @@
path: build/mopac-*-mac.*

windows-build:
runs-on: windows-latest
runs-on: windows-2022
timeout-minutes: 30

steps:
- name: Check number of cores
shell: pwsh
run: |
$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/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: 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_FLAGS="/libs:static" ^
-DBLA_STATIC=ON ^
-DBLA_VENDOR=Intel10_64lp

- 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%

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

- name: Local installation test
shell: cmd
run: |
cd build
cmake --install .

- 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

- 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

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

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}
Loading