damping01 #326
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CMake Build | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| workflow_dispatch: | |
| env: | |
| PYTHONPATH: "./build/lib/:./mylib/" | |
| jobs: | |
| build-ubuntu: | |
| name: Build Ubuntu | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: 2.1. Obtaining OpenSees Source Code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| # - name: Needed Applications and Libraries are already satisfied. | |
| - name: Conan 1.x | |
| run: pip install "conan<2.0" | |
| - name: matplotlib | |
| run: pip install matplotlib | |
| - name: numpy | |
| run: pip install numpy | |
| # - name: scipy | |
| # run: pip install scipy | |
| - name: 2.4.2. Building the OpenSees Applications and Python module | |
| run: | | |
| mkdir build | |
| cd build | |
| conan install .. --build missing # conan executables location is different. | |
| cmake .. | |
| cmake --build . --target OpenSees -j8 | |
| cmake --build . --target OpenSeesPy -j8 | |
| cd lib | |
| mkdir openseespy | |
| mv OpenSeesPy.so openseespy/opensees.so | |
| - name: Verification OpenSeesPySP # Simple Sanity Test | |
| run: | | |
| xvfb-run python3 ./EXAMPLES/ExamplePython/example_ground_motion.py | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: OpenSees_Ubuntu | |
| path: | | |
| ground_motion.png | |
| disp.out |