Skip to content

Commit fda91b6

Browse files
authored
Fix Visual Studio build on GitHub Actions (#24)
* Fix Visual Studio build on CI * Update main.yml * Update main.yml * Fix return codes
1 parent 4049059 commit fda91b6

File tree

1 file changed

+5
-20
lines changed

1 file changed

+5
-20
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -89,42 +89,27 @@ jobs:
8989
source scripts/run.sh
9090
windows-msvc-build:
9191
runs-on: windows-latest
92-
strategy:
93-
fail-fast: false
94-
matrix:
95-
cmake_generator:
96-
- Visual Studio 14 2015
97-
- Visual Studio 15 2017
98-
- Visual Studio 16 2019
9992
steps:
10093
- uses: actions/checkout@v1
10194
- name: Download dependencies
10295
run: |
10396
Invoke-WebRequest https://github.com/Microsoft/Microsoft-MPI/releases/download/v10.0/msmpisetup.exe -OutFile msmpisetup.exe
10497
Invoke-WebRequest https://github.com/Microsoft/Microsoft-MPI/releases/download/v10.0/msmpisdk.msi -OutFile msmpisdk.msi
105-
shell: pwsh
106-
- name: Setup environment
98+
- name: Install MPI
10799
run: |
108100
MSMpiSetup.exe -unattend
109-
set PATH=C:\Program Files\Microsoft MPI\Bin;%PATH%
110101
msmpisdk.msi /passive
111-
powershell -file "scripts\appveyor_install_miktex-latest-minimal.ps1"
112-
refreshenv
113-
pdflatex -version
114102
shell: cmd
115103
- name: Update submodules
116104
run: git submodule update --init --recursive
117105
- name: Build
118106
run: |
107+
set PATH=C:\Program Files\Microsoft MPI\Bin;%PATH%
119108
mkdir build
120-
cd build
121-
cmake -G "%CMAKE_GENERATOR%" -D USE_SEQ=ON -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STD=ON -D USE_LATEX=ON -D MPI_C_INCLUDE_PATH:PATH="%MPI_HOME%/Include" -D MPI_C_LIBRARIES:PATH="%MPI_HOME%/Lib/x86/msmpi.lib" -D MPI_CXX_INCLUDE_PATH:PATH="%MPI_HOME%/Include" -D MPI_CXX_LIBRARIES:PATH="%MPI_HOME%/Lib/x86/msmpi.lib" .. -A Win32
122-
cmake --build .
123-
cd ..
124-
set OMP_NUM_THREADS=4
125-
scripts/run.bat
109+
cd build && cmake -G "Visual Studio 16 2019" -D USE_SEQ=ON -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STD=ON -D MPI_C_INCLUDE_PATH:PATH="%MPI_HOME%/Include" -D MPI_C_LIBRARIES:PATH="%MPI_HOME%/Lib/x86/msmpi.lib" -D MPI_CXX_INCLUDE_PATH:PATH="%MPI_HOME%/Include" -D MPI_CXX_LIBRARIES:PATH="%MPI_HOME%/Lib/x86/msmpi.lib" .. -A Win32 && cmake --build .
126110
env:
127-
CMAKE_GENERATOR: ${{ matrix.cmake_generator }}
111+
MPI_HOME: C:/Program Files (x86)/Microsoft SDKs/MPI
112+
shell: cmd
128113
- name: Run tests
129114
run: |
130115
set OMP_NUM_THREADS=4

0 commit comments

Comments
 (0)