Skip to content

Commit dced792

Browse files
committed
separate win msvc
1 parent 415f885 commit dced792

File tree

1 file changed

+62
-36
lines changed

1 file changed

+62
-36
lines changed

.github/workflows/main.yml

Lines changed: 62 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -721,11 +721,52 @@ jobs:
721721
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
722722
-D USE_SEQ=ON -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STL=ON
723723
-D USE_FUNC_TESTS=ON -D USE_PERF_TESTS=ON
724-
-D CMAKE_BUILD_TYPE=RELEASE
724+
-D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=install
725725
- name: Build project
726726
shell: bash
727727
run: |
728728
cmake --build build --config Release --parallel
729+
- name: Install project
730+
run: |
731+
cmake --build build --target install
732+
- name: Archive installed package
733+
run: Compress-Archive -Path install -DestinationPath windows-msvc-install.zip
734+
shell: pwsh
735+
- name: Upload installed package
736+
uses: actions/upload-artifact@v4
737+
with:
738+
name: windows-msvc-install
739+
path: windows-msvc-install.zip
740+
windows-msvc-test:
741+
needs:
742+
- windows-msvc-build
743+
runs-on: windows-latest
744+
defaults:
745+
run:
746+
shell: bash
747+
steps:
748+
- uses: actions/checkout@v4
749+
- name: Add msbuild to PATH
750+
uses: microsoft/setup-msbuild@v2
751+
with:
752+
vs-version: 'latest'
753+
- name: Setup MPI
754+
uses: mpi4py/setup-mpi@v1
755+
with:
756+
mpi: msmpi
757+
- name: Download dependencies
758+
uses: nick-fields/retry@v3
759+
with:
760+
timeout_minutes: 60
761+
max_attempts: 3
762+
command: choco install openssl --execution-timeout 3600
763+
- name: Download installed package
764+
uses: actions/download-artifact@v4
765+
with:
766+
name: windows-msvc-install
767+
- name: Extract installed package
768+
run: Expand-Archive -Path .\windows-msvc-install.zip -DestinationPath . -Force
769+
shell: pwsh
729770
- name: Run func tests (MPI, num_proc=1)
730771
run: python3 scripts/run_tests.py --running-type="processes"
731772
env:
@@ -762,17 +803,15 @@ jobs:
762803
run: python3 scripts/run_tests.py --running-type="threads"
763804
env:
764805
OMP_NUM_THREADS: 4
765-
windows-msvc-build-extended:
806+
windows-msvc-test-extended:
766807
needs:
767-
- windows-msvc-build
808+
- windows-msvc-test
768809
runs-on: windows-latest
769810
defaults:
770811
run:
771812
shell: bash
772813
steps:
773814
- uses: actions/checkout@v4
774-
with:
775-
submodules: recursive
776815
- name: Add msbuild to PATH
777816
uses: microsoft/setup-msbuild@v2
778817
with:
@@ -787,26 +826,13 @@ jobs:
787826
timeout_minutes: 60
788827
max_attempts: 3
789828
command: choco install openssl --execution-timeout 3600
790-
- name: Setup ccache
791-
uses: Chocobo1/setup-ccache-action@v1
829+
- name: Download installed package
830+
uses: actions/download-artifact@v4
792831
with:
793-
windows_compile_environment: msvc
794-
- name: Setup ninja
795-
uses: seanmiddleditch/gha-setup-ninja@v6
796-
- name: Setup MSVC for Ninja again
797-
uses: ilammy/msvc-dev-cmd@v1
798-
- name: CMake configure
799-
shell: bash
800-
run: >
801-
cmake -S . -B build -G Ninja -D CMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl
802-
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
803-
-D USE_SEQ=ON -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STL=ON
804-
-D USE_FUNC_TESTS=ON -D USE_PERF_TESTS=ON
805-
-D CMAKE_BUILD_TYPE=RELEASE
806-
- name: Build project
807-
shell: bash
808-
run: |
809-
cmake --build build --config Release --parallel
832+
name: windows-msvc-install
833+
- name: Extract installed package
834+
run: Expand-Archive -Path .\windows-msvc-install.zip -DestinationPath . -Force
835+
shell: pwsh
810836
- name: Run tests (threads, num_threads=5)
811837
run: python3 scripts/run_tests.py --running-type="threads"
812838
env:
@@ -875,22 +901,22 @@ jobs:
875901
CC: clang-cl
876902
CXX: clang-cl
877903
- name: Run tests (threads, num_threads=1)
878-
run: scripts/run.bat
904+
run: python3 scripts/run_tests.py --running-type="threads"
879905
env:
880906
OMP_NUM_THREADS: 1
881907
CLANG_BUILD: 1
882908
- name: Run tests (threads, num_threads=2)
883-
run: scripts/run.bat
909+
run: python3 scripts/run_tests.py --running-type="threads"
884910
env:
885911
OMP_NUM_THREADS: 2
886912
CLANG_BUILD: 1
887913
- name: Run tests (threads, num_threads=3)
888-
run: scripts/run.bat
914+
run: python3 scripts/run_tests.py --running-type="threads"
889915
env:
890916
OMP_NUM_THREADS: 3
891917
CLANG_BUILD: 1
892918
- name: Run tests (threads, num_threads=4)
893-
run: scripts/run.bat
919+
run: python3 scripts/run_tests.py --running-type="threads"
894920
env:
895921
OMP_NUM_THREADS: 4
896922
CLANG_BUILD: 1
@@ -929,42 +955,42 @@ jobs:
929955
CC: clang-cl
930956
CXX: clang-cl
931957
- name: Run tests (threads, num_threads=5)
932-
run: scripts/run.bat
958+
run: python3 scripts/run_tests.py --running-type="threads"
933959
env:
934960
OMP_NUM_THREADS: 5
935961
CLANG_BUILD: 1
936962
- name: Run tests (threads, num_threads=6)
937-
run: scripts/run.bat
963+
run: python3 scripts/run_tests.py --running-type="threads"
938964
env:
939965
OMP_NUM_THREADS: 6
940966
CLANG_BUILD: 1
941967
- name: Run tests (threads, num_threads=7)
942-
run: scripts/run.bat
968+
run: python3 scripts/run_tests.py --running-type="threads"
943969
env:
944970
OMP_NUM_THREADS: 7
945971
CLANG_BUILD: 1
946972
- name: Run tests (threads, num_threads=8)
947-
run: scripts/run.bat
973+
run: python3 scripts/run_tests.py --running-type="threads"
948974
env:
949975
OMP_NUM_THREADS: 8
950976
CLANG_BUILD: 1
951977
- name: Run tests (threads, num_threads=11)
952-
run: scripts/run.bat
978+
run: python3 scripts/run_tests.py --running-type="threads"
953979
env:
954980
OMP_NUM_THREADS: 11
955981
CLANG_BUILD: 1
956982
- name: Run tests (threads, num_threads=13)
957-
run: scripts/run.bat
983+
run: python3 scripts/run_tests.py --running-type="threads"
958984
env:
959985
OMP_NUM_THREADS: 13
960986
CLANG_BUILD: 1
961987
- name: Run tests (threads, num_threads=15)
962-
run: scripts/run.bat
988+
run: python3 scripts/run_tests.py --running-type="threads"
963989
env:
964990
OMP_NUM_THREADS: 15
965991
CLANG_BUILD: 1
966992
- name: Run tests (threads, num_threads=16)
967-
run: scripts/run.bat
993+
run: python3 scripts/run_tests.py --running-type="threads"
968994
env:
969995
OMP_NUM_THREADS: 16
970996
CLANG_BUILD: 1

0 commit comments

Comments
 (0)