1010 workflow_dispatch :
1111
1212jobs :
13- build-win :
14- name : Build Windows10
15- runs-on : windows-2019
13+ build-ubuntu :
14+ name : Build Ubuntu
15+ runs-on : ubuntu-latest
16+ timeout-minutes : 30
1617 steps :
1718 - name : 2.1. Obtaining OpenSees Source Code
1819 uses : actions/checkout@v4
1920 with :
2021 fetch-depth : 0
21- # - name: CMake is already installed
22- # - name: Git is already installed
23- - name : Microsoft Visual Studio
24- uses : ilammy/msvc-dev-cmd@v1
25- with :
26- vsversion : 2019
27- - name : Intel oneAPI Basic & HPC Toolkits
28- shell : pwsh
29- env :
30- WINDOWS_BASEKIT_URL : https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7dff44ba-e3af-4448-841c-0d616c8da6e7/w_BaseKit_p_2024.1.0.595_offline.exe
31- WINDOWS_BASEKIT_COMPONENTS : intel.oneapi.win.mkl.devel
32- WINDOWS_HPCKIT_URL : https://registrationcenter-download.intel.com/akdlm/IRC_NAS/c95a3b26-fc45-496c-833b-df08b10297b9/w_HPCKit_p_2024.1.0.561_offline.exe
33- WINDOWS_HPCKIT_COMPONENTS : " intel.oneapi.win.mpi.devel:intel.oneapi.win.ifort-compiler"
34- working-directory : D:\a\OpenSees\OpenSees\.github\workflows
35- run : |
36- ./install_fortran.bat $env:WINDOWS_BASEKIT_URL $env:WINDOWS_BASEKIT_COMPONENTS
37- ./install_fortran.bat $env:WINDOWS_HPCKIT_URL $env:WINDOWS_HPCKIT_COMPONENTS
3822 - name : Python 3.11
3923 uses : actions/setup-python@v5
4024 with :
4125 python-version : " 3.11"
42- - name : Conan 1.x
43- run : pip install conan<2.0
44- - name : MUMPS
45- shell : cmd
26+ - name : Install conan
4627 run : |
47- git clone https://github.com/OpenSees/mumps.git
48- cd mumps
49- mkdir build
50- cd build
51- call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 mod
52- cmake .. -Darith=d -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded" -G Ninja
53- cmake --build . --config Release --parallel 4
54- - name : 2.2.2. Building the OpenSees Applications and Python module
55- shell : cmd
28+ pip install conan
29+ conan profile detect --force
30+ - name : build OpenSees & OpenSeesPy
5631 run : |
57- mkdir build
58- cd build
59- conan install .. --build missing --settings compiler="Visual Studio" --settings compiler.runtime="MT" --settings compiler.version=16
60- call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 mod
61- cmake .. -DBLA_STATIC=ON -DMKL_LINK=static -DMKL_INTERFACE_FULL=intel_lp64 -DMUMPS_DIR="..\..\mumps\build"
62- cmake --build . --config Release --target OpenSees -j8
63- cmake --build . --config Release --target OpenSeesPy -j8
64- - name : Verification OpenSeesPySP
65- shell : pwsh
32+ conan install . --build=missing
33+ cmake -S . -B build/Release -DCMAKE_TOOLCHAIN_FILE=build/Release/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/bin
34+ cd build/Release
35+ cmake --build . --target OpenSees -j8
36+ cmake --build . --target OpenSeesPy -j8
37+ mv OpenSeesPy.so opensees.so
38+ - name : Verification OpenSeesPy # Simple Sanity Test
6639 run : |
67- mv ./build/bin/OpenSeesPy.dll ./build/bin/opensees.pyd
68- cp "C:\Program Files (x86)\Intel\oneAPI\compiler\2024.1\bin\libiomp5md.dll" ./build/bin/
69- $env:PYTHONPATH = "./build/bin/"
70- python -c "import sys; print(sys.path)"
71- python ./EXAMPLES/ExamplePython/example_variable_analysis.py
40+ export PYTHONPATH="./build/Release"
41+ python3 -c "import sys; print(sys.path)"
42+ python3 ./EXAMPLES/ExamplePython/example_variable_analysis.py
43+ - name : Run pytest in tests/ folder
44+ run : |
45+ python3 -m pip install pytest
46+ cp build/Release/opensees.so tests/
47+ cd tests
48+ pytest -v
7249 - name : Upload Artifacts
7350 uses : actions/upload-artifact@v4
7451 with :
75- name : OpenSees_Windows
52+ name : OpenSees_Ubuntu
7653 path : |
77- ./build/bin/OpenSees.exe
78- ./build/bin/opensees.pyd
79- ./build/bin/libiomp5md.dll
54+ ./build/Release/OpenSees
55+ ./build/Release/opensees.so
8056
81- build-mac :
57+ build-mac-conan :
8258 name : Build Mac OS
8359 runs-on : macos-latest
8460 timeout-minutes : 30
@@ -91,89 +67,95 @@ jobs:
9167 uses : actions/setup-python@v5
9268 with :
9369 python-version : " 3.11"
94- # - name: XCode Command Line Tools is already installed.
95- - name : Install other dependencies via Homebrew
96- run : |
97- ln -s /opt/homebrew/bin/gcc-13 /usr/local/bin/gcc
98- ln -s /opt/homebrew/bin/gfortran-13 /usr/local/bin/gfortran
99- brew install eigen
100- brew install hdf5
101- brew install open-mpi
102- brew install scalapack
103- sudo ln -sf /opt/homebrew/include/eigen3/Eigen /opt/homebrew/include/Eigen
104- - name : MUMPS
70+ - name : conan install
10571 run : |
106- git clone https://github.com/OpenSees/mumps.git
107- cd mumps
108- mkdir build
109- cd build
110- cmake .. -Darith=d
111- cmake --build . --config Release --parallel 4
72+ pip install conan
73+ conan profile detect --force
11274 - name : 2.3.2. Building the OpenSees Applications and Python module
11375 run : |
114- mkdir build
115- cd build
116- cmake .. -DMUMPS_DIR=$PWD/../../mumps/build -DCMAKE_PREFIX_PATH=/usr/local/Cellar/libaec/1.1.3/cmake
76+ export FC=/opt/homebrew/bin/gfortran-13
77+ export LDFLAGS="-L/opt/homebrew/lib/gcc/current -lgfortran"
78+ conan install . --build=missing
79+ cmake -S . -B build/Release -DCMAKE_TOOLCHAIN_FILE=build/Release/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/bin
80+ cd build/Release
11781 cmake --build . --target OpenSees -j8
11882 cmake --build . --target OpenSeesPy -j8
11983 mv ./OpenSeesPy.dylib ./opensees.so
12084 - name : Verification OpenSeesPySP
12185 run : |
122- export PYTHONPATH="./build/"
86+ export PYTHONPATH="./build/Release "
12387 python3 -c "import sys; print(sys.path)"
12488 python3 ./EXAMPLES/ExamplePython/example_variable_analysis.py
12589 - name : Upload Artifacts
12690 uses : actions/upload-artifact@v4
12791 with :
12892 name : OpenSees_Mac
12993 path : |
130- ./build/OpenSees
131- ./build/opensees.so
94+ ./build/Release/ OpenSees
95+ ./build/Release/ opensees.so
13296
133- build-ubuntu :
134- name : Build Ubuntu
135- runs-on : ubuntu-latest
136- timeout-minutes : 30
97+ build-win :
98+ name : Build Windows VS2022
99+ runs-on : windows-2022
137100 steps :
138101 - name : 2.1. Obtaining OpenSees Source Code
139102 uses : actions/checkout@v4
140103 with :
141104 fetch-depth : 0
105+ - name : Microsoft Visual Studio
106+ uses : ilammy/msvc-dev-cmd@v1
107+ with :
108+ vsversion : 2022
109+ - name : Intel oneAPI Basic & HPC Toolkits
110+ shell : pwsh
111+ env :
112+ WINDOWS_BASEKIT_URL : https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7dff44ba-e3af-4448-841c-0d616c8da6e7/w_BaseKit_p_2024.1.0.595_offline.exe
113+ WINDOWS_BASEKIT_COMPONENTS : intel.oneapi.win.mkl.devel
114+ WINDOWS_HPCKIT_URL : https://registrationcenter-download.intel.com/akdlm/IRC_NAS/c95a3b26-fc45-496c-833b-df08b10297b9/w_HPCKit_p_2024.1.0.561_offline.exe
115+ WINDOWS_HPCKIT_COMPONENTS : " intel.oneapi.win.mpi.devel:intel.oneapi.win.ifort-compiler"
116+ working-directory : D:\a\OpenSees\OpenSees\.github\workflows
117+ run : |
118+ ./install_fortran.bat $env:WINDOWS_BASEKIT_URL $env:WINDOWS_BASEKIT_COMPONENTS
119+ ./install_fortran.bat $env:WINDOWS_HPCKIT_URL $env:WINDOWS_HPCKIT_COMPONENTS
142120 - name : Python 3.11
143121 uses : actions/setup-python@v5
144122 with :
145123 python-version : " 3.11"
146- # - name: Needed Applications and Libraries are already satisfied.
147- - name : Conan 1.x
148- run : pip install "conan<2.0"
149- - name : 2.4.2. Building the OpenSees Applications and Python module
124+ - name : Install conan
125+ run : |
126+ pip install conan
127+ conan profile detect --force
128+ - name : MUMPS
129+ shell : cmd
150130 run : |
151- mkdir build
131+ git clone https://github.com/OpenSees/mumps.git
132+ cd mumps
133+ call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 mod
134+ cmake -S . -B build -G Ninja -Darith=d -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded" -DCMAKE_EXE_LINKER_FLAGS="/link /FORCE:MULTIPLE" -DCMAKE_SHARED_LINKER_FLAGS="/link /FORCE:MULTIPLE"
152135 cd build
153- conan install .. --build missing # conan executables location is different.
154- cmake ..
155- cmake --build . --target OpenSees -j8
156- cmake --build . --target OpenSeesPy -j8
157- mv lib/OpenSeesPy.so lib/opensees.so
158- - name : Verification OpenSeesPySP # Simple Sanity Test
136+ cmake --build . --config Release
137+ - name : 2.2.2. Building the OpenSees Applications and Python module
138+ shell : cmd
159139 run : |
160- export PYTHONPATH="./build/lib/"
161- python3 -c "import sys; print(sys.path)"
162- python3 ./EXAMPLES/ExamplePython/example_variable_analysis.py
163- - name : Run pytest in tests/ folder
140+ conan install . -s arch=x86_64 -s compiler.runtime=static --build=missing -c tools.cmake.cmaketoolchain:generator=Ninja
141+ call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 mod
142+ cmake.exe -S . -B build/Release -G "Ninja" -DCMAKE_TOOLCHAIN_FILE=build/Release/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded" -DCMAKE_Fortran_COMPILER="ifx" -DBLA_STATIC=ON -DMKL_LINK=static -DMKL_INTERFACE_FULL=intel_lp64 -DMUMPS_DIR="..\..\mumps\build" -DCMAKE_EXE_LINKER_FLAGS="/FORCE:MULTIPLE" -DCMAKE_SHARED_LINKER_FLAGS="/FORCE:MULTIPLE" -DCMAKE_NINJA_FORCE_RESPONSE_FILE=ON
143+ cd build/Release
144+ cmake --build . --config Release --target OpenSees -j8
145+ cmake --build . --config Release --target OpenSeesPy -j8
146+ - name : Verification OpenSeesPySP
147+ shell : pwsh
164148 run : |
165- python3 -m pip install pytest
166- cp build/lib/opensees.so tests/
167- cd tests
168- pytest -v
149+ mv ./build/Release/OpenSeesPy.dll ./build/Release/opensees.pyd
150+ cp "C:\Program Files (x86)\Intel\oneAPI\compiler\2024.1\bin\libiomp5md.dll" ./build/Release/
151+ $env:PYTHONPATH = "./build/Release/"
152+ python -c "import sys; print(sys.path)"
153+ python ./EXAMPLES/ExamplePython/example_variable_analysis.py
169154 - name : Upload Artifacts
170155 uses : actions/upload-artifact@v4
171156 with :
172- name : OpenSees_Ubuntu
157+ name : OpenSees_Windows
173158 path : |
174- ./build/bin/OpenSees
175- ./build/lib/opensees.so
176- # # Simple MP sanity test
177- # - name: Verification OpenSeesPyMP
178- # run: |
179- # mpiexec -np 2 python ../EXAMPLES/ExamplePython/example_mpi_paralleltruss_explicit.py
159+ ./build/Release/OpenSees.exe
160+ ./build/Release/opensees.pyd
161+ ./build/Release/libiomp5md.dll
0 commit comments