-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from Noam-Elisha/master
Adding testing on every commit.
- Loading branch information
Showing
6 changed files
with
203 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Run quoFEM tests | ||
|
||
on: push | ||
# workflow_dispatch: | ||
# schedule: | ||
# - cron: "0 5 * * *" | ||
|
||
jobs: | ||
setup_and_test: | ||
name: Setup and run tests | ||
runs-on: ubuntu-latest | ||
environment: quoFEM | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Bootstrap | ||
run: | | ||
chmod +x bootstrap.sh | ||
sh ./bootstrap.sh | ||
- name: Build SimCenter Applications | ||
run: | | ||
chmod +x build_backend_apps.sh | ||
sh ./build_backend_apps.sh | ||
- name: Run Examples | ||
run: | | ||
chmod +x run_examples.sh | ||
sh ./run_examples.sh |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
|
||
# Updates the package lists for upgrades and new package installations | ||
sudo apt-get update | ||
|
||
# Installs the 'sudo' package. The '-y' flag automatically answers yes to prompts. | ||
apt-get install -y sudo python3.9 | ||
|
||
# Install the needed packages | ||
sudo apt install -y software-properties-common cmake python3-pip git | ||
|
||
# Upgrades pip (Python package installer) to the latest version | ||
sudo python3 -m pip install -U pip | ||
|
||
# Installs the Conan package manager | ||
pip3 install conan==1.60.1 | ||
pip3 install nheri-simcenter | ||
|
||
python3 --version | ||
|
||
which python3 | ||
|
||
which conan | ||
|
||
wget https://github.com/snl-dakota/dakota/releases/download/v6.15.0/dakota-6.15.0-public-src-cli.tar.gz | ||
sudo apt-get install -y libboost-dev libboost-all-dev libopenmpi-dev openmpi-bin xorg-dev libmotif-dev | ||
tar zxBf dakota-6.15.0-public-src-cli.tar.gz | ||
mv dakota-6.15.0-public-src-cli dakota-6.15.0 | ||
cd dakota-6.15.0 | ||
mkdir build; cd build | ||
cmake .. | ||
cmake --build . --config Release | ||
cmake --install . | ||
cd ../..; rm -fr dakot* | ||
|
||
sudo apt-get install -y cmake liblapack-dev libomp-dev libssl-dev apt-transport-https ca-certificates wget | ||
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null | ||
sudo apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" | ||
sudo apt-get update | ||
sudo apt-get install -y cmake gfortran gcc g++ | ||
git clone -b $versionOpenSees --single-branch https://github.com/OpenSees/OpenSees.git | ||
cd OpenSees | ||
mkdir build; cd build | ||
conan install .. --build missing | ||
cmake .. | ||
cmake --build . --config Release | ||
cmake --install . | ||
sudo mv ./lib/* /usr/local/lib | ||
cd ../..; rm -fr OpenSees |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
git clone --branch master --depth 1 https://github.com/NHERI-SimCenter/SimCenterBackendApplications.git | ||
|
||
cp ./SimCenterBackendApplications/modules/performUQ/SimCenterUQ/nataf_gsa/CMakeLists.txt.UBUNTU ./SimCenterBackendApplications/modules/performUQ/SimCenterUQ/nataf_gsa/CMakeLists.txt | ||
|
||
rm -fr ~/.conan | ||
|
||
sudo apt-get install -y liblapack-dev libomp-dev libssl-dev apt-transport-https ca-certificates \ | ||
|
||
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | ||
|
||
sudo apt-get update | ||
|
||
sudo apt-get install -y gcc-10 g++-10 gfortran-10 | ||
|
||
export CC=gcc-10 | ||
|
||
export CXX=g++-10 | ||
|
||
export FC=gfortran-10 | ||
|
||
conan remote add simcenter https://nherisimcenter.jfrog.io/artifactory/api/conan/simcenter | ||
|
||
cd SimCenterBackendApplications | ||
|
||
mkdir build | ||
|
||
cd build | ||
|
||
conan install .. --build missing | ||
|
||
cmake .. | ||
|
||
cmake --build . --config Release | ||
|
||
cmake --install . | ||
|
||
cd ../.. |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Run quoFEM tests | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 5 * * *" | ||
|
||
jobs: | ||
setup_and_test: | ||
name: Setup and run tests | ||
runs-on: ubuntu-latest | ||
environment: quoFEM | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Bootstrap | ||
run: | | ||
chmod +x bootstrap.sh | ||
sh ./bootstrap.sh | ||
- name: Build SimCenter Applications | ||
run: | | ||
chmod +x build_backend_apps.sh | ||
sh ./build_backend_apps.sh | ||
- name: Test Examples | ||
run: | | ||
chmod +x run_examples.sh | ||
sh ./run_examples.sh | ||
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
|
||
echo In folder $PWD | ||
|
||
# Clone the examples | ||
git clone --branch master --depth 1 https://github.com/NHERI-SimCenter/quoFEM.git | ||
|
||
# Create the working directoy | ||
mkdir tmp.SimCenter | ||
mkdir tmp.SimCenter/templatedir | ||
cp -a $PWD/Examples/qfem-0001/src/. $PWD/tmp.SimCenter/templatedir/ | ||
|
||
sudo apt-get install jq | ||
|
||
inputfile=$PWD/Examples/qfem-0001/src/input.json | ||
|
||
echo "doing jq =================" | ||
echo $(cat $inputfile | jq '. + { "runDir": "'"$PWD/tmp.SimCenter"'" }') > $inputfile | ||
echo $(cat $inputfile | jq '. + { "localAppDir": "'"$PWD/SimCenterBackendApplications"'" }') > $inputfile | ||
echo $(cat $inputfile | jq '. + { "remoteAppDir": "'"$PWD/SimCenterBackendApplications"'" }') > $inputfile | ||
echo $(cat $inputfile | jq '. + { "runType": "runningLocal" }') > $inputfile | ||
echo "did jq ===================" | ||
|
||
echo "catting the thing now ===================" | ||
cat $inputfile | ||
|
||
ls $PWD/tmp.SimCenter/templatedir | ||
|
||
# Run the example in the backend | ||
python $PWD/SimCenterBackendApplications/applications/Workflow/qWHALE.py "runningLocal" $inputfile $PWD/SimCenterBackendApplications/applications/Workflow/WorkflowApplications.json | ||
|