Skip to content

Commit

Permalink
Try to fix Windows workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ennoruijters committed Feb 19, 2024
1 parent cff64b2 commit 0fdedc3
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@ jobs:
- name: Compile yaml-cpp if not cached
if: steps.cache-yaml-cpp.outputs.cache-hit != 'true'
run: |
& "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1"
mkdir yaml-cpp/build | Out-Null
cd yaml-cpp/build
cmake -G Ninja -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DYAML_BUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release ..
ninja yaml-cpp.dll
copy yaml-cpp.dll,yaml-cpp.lib ..
cd yaml-cpp
cmake -B build -DYAML_BUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel --verbose --config Release
copy build\Release\yaml-cpp.dll .
copy build\Release\yaml-cpp.lib .
- name: Cache DFTRES
id: cache-dftres
uses: actions/cache@v4
Expand Down Expand Up @@ -93,20 +92,18 @@ jobs:
- name: Compile IMRMC
if: steps.cache-imrmc.outputs.cache-hit != 'true'
run: |
& "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1"
& "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1" -SkipAutomaticLocation
cd imrmc
nmake /F makefile.win imrmc.exe
- name: Build DFTCalc
run: |
& "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1"
mkdir dftcalc\build | Out-Null
cd dftcalc\build
cmake -G Ninja -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_PREFIX_PATH="$Env:GITHUB_WORKSPACE\yaml-cpp" -DCMAKE_INCLUDE_PATH="$Env:GITHUB_WORKSPACE\yaml-cpp" -DDFTROOT="$Env:GITHUB_WORKSPACE\dftcalc" ..
ninja
cd dftcalc
cmake -B build -DCMAKE_PREFIX_PATH="$Env:GITHUB_WORKSPACE\yaml-cpp" -DCMAKE_INCLUDE_PATH="$Env:GITHUB_WORKSPACE\yaml-cpp" -DDFTROOT="$Env:GITHUB_WORKSPACE\dftcalc"
cmake --build build --parallel --verbose --config Release
- name: Set PATH
run: |
"$Env:GITHUB_WORKSPACE\imrmc" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
"$Env:GITHUB_WORKSPACE\dftcalc\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
"$Env:GITHUB_WORKSPACE\dftcalc\bin\Release" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
"$Env:GITHUB_WORKSPACE\yaml-cpp" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Run tests
env:
Expand Down

0 comments on commit 0fdedc3

Please sign in to comment.