diff --git a/.github/workflows/master-all.yml b/.github/workflows/master-all.yml index f9d9d1f17..08422001a 100644 --- a/.github/workflows/master-all.yml +++ b/.github/workflows/master-all.yml @@ -158,20 +158,32 @@ jobs: run: | C:/msys64/usr/bin/wget.exe -q https://github.com/TLCFEM/prebuilds/releases/download/latest/VTK-9.2.6-win.7z 7z x VTK-9.2.6-win.7z - - name: MKL + - name: Cache + id: cache-win + uses: actions/cache@v3 if: matrix.mkl == 'ON' + with: + path: C:/Program Files (x86)/Intel/oneAPI/ + key: w_onemkl_p_2023.2.0.49500_offline-w_fortran-compiler_p_2023.2.1.7_offline + - name: MKL + if: matrix.mkl == 'ON' && steps.cache-win.outputs.cache-hit != 'true' shell: cmd run: | C:/msys64/usr/bin/wget.exe -q https://registrationcenter-download.intel.com/akdlm/IRC_NAS/2b9cdf66-5291-418e-a7e8-f90515cc9098/w_onemkl_p_2023.2.0.49500_offline.exe C:/msys64/usr/bin/wget.exe -q https://registrationcenter-download.intel.com/akdlm/IRC_NAS/1720594b-b12c-4aca-b7fb-a7d317bac5cb/w_fortran-compiler_p_2023.2.1.7_offline.exe start /b /wait w_onemkl_p_2023.2.0.49500_offline.exe -s -x -f extracted --log extract.log - extracted\bootstrapper.exe -s --action install --eula=accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=1 --log-dir=. + extracted\bootstrapper.exe -s --action install --eula=accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 --log-dir=. rd /s/q "extracted" start /b /wait w_fortran-compiler_p_2023.2.1.7_offline.exe -s -x -f extracted --log extract.log - extracted\bootstrapper.exe -s --action install --eula=accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=1 --log-dir=. + extracted\bootstrapper.exe -s --action install --eula=accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 --log-dir=. rd /s/q "extracted" - name: Compile + shell: bash run: | + if [ "${{ matrix.mkl }}" == "ON" ]; then + "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 vs2022 + "C:\Program Files (x86)\Intel\oneAPI\compiler\latest\env\vars.bat" + fi go build Checker/updater.go mkdir build && cd build cmake -DCMAKE_BUILD_TYPE=Release -DUSE_AVX=${{ matrix.avx }} -DBUILD_MULTITHREAD=ON -DUSE_EXTERNAL_VTK=${{ matrix.vtk }} -DVTK_DIR=D:/a/suanPan/suanPan/lib/cmake/vtk-9.2/ -DUSE_MKL=${{ matrix.mkl }} -DMKLROOT="C:/Program Files (x86)/Intel/oneAPI/mkl/latest" -DLINK_DYNAMIC_MKL=OFF -DCMAKE_INSTALL_PREFIX=dist ..