forked from OpenSees/OpenSees
-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (92 loc) · 2.63 KB
/
build_cmake.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: CMake Build
env:
CMAKE_VERSION: 3.20.1
BUILD_TYPE: Debug
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
jobs:
build-ubuntu:
name: Ubuntu bundled build
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install conan
run: python3 -m pip install conan==1.60.0
- name: Detect Conan Defaults
run: |
conan --version
- name: Build
run: |
mkdir build
cd build
conan install .. --build missing
cmake ..
cmake --build . -j8
#- name: Verification
# run: |
# cd ./EXAMPLES/verification/ && ../../build/OpenSeesTcl runVerificationSuite.tcl
- name: Build OpenSeesPy
run: |
cd ./build
cmake ..
make -j 4
make OpenSeesPy
mkdir fake_folder
- name: Rename OpenSeesPy
run: |
cd ./build
mv lib/OpenSeesPy.so lib/opensees.so
# Simple sanity test
- name: Verification OpenSeesPySP
run: |
cd ./build
cd ../EXAMPLES/ExamplePython/
export PYTHONPATH="../../build/lib/"
python3 -c "import sys; print(sys.path)"
python3 example_variable_analysis.py
# # Simple MP sanity test
# - name: Verification OpenSeesPyMP
# run: |
# mpiexec -np 2 python ../EXAMPLES/ExamplePython/example_mpi_paralleltruss_explicit.py
build-mac:
name: Mac Build
runs-on: macos-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Library
run: |
ln -s /opt/homebrew/bin/gcc-13 /usr/local/bin/gcc
ln -s /opt/homebrew/bin/gfortran-13 /usr/local/bin/gfortran
brew install eigen
brew install hdf5
brew install open-mpi
brew install scalapack
sudo ln -sf /opt/homebrew/include/eigen3/Eigen /opt/homebrew/include/Eigen
- name: Build
run: |
mkdir build
cd build
cmake .. -DMUMPS_DIR=$PWD/../../mumps/build
cmake --build . --target OpenSees -j8
cmake --build . --target OpenSeesPy -j8
mv ./OpenSeesPy.dylib ./opensees.so
- name: Verification OpenSeesPySP
run: |
cd ./EXAMPLES/ExamplePython/
export PYTHONPATH="../../build/"
python3 -c "import sys; print(sys.path)"
python3 example_variable_analysis.py