Switch to parry2d #2078
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
name: RustBCA Compile check | |
on: | |
push: | |
branches: [ main, dev ] | |
pull_request: | |
branches: [ main, dev ] | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: udpate | |
run: | | |
sudo apt-get update | |
- name: Install curl | |
run: | | |
sudo apt-get install curl | |
- name: Install rust | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf -y https://sh.rustup.rs | sh | |
sudo apt-get install rustc cargo | |
- name: Install pip for Python-3 | |
run: | | |
sudo apt-get install python3-pip python3-dev | |
- name: Install Python libraries | |
run: | | |
python3 -m pip install numpy shapely scipy matplotlib toml | |
- name: Install HDF5 Libraries | |
run: | | |
sudo apt install libhdf5-dev | |
- name: test Python Bindings | |
run: | | |
python3 -m pip install setuptools_rust testresources setuptools wheel | |
python3 -m pip install --upgrade pip setuptools wheel | |
python3 -m pip install . | |
python3 -c "from libRustBCA import *;" | |
python3 examples/test_rustbca.py | |
- name: Test Fortran and C bindings | |
run : | | |
cargo build --release --lib --features parry3d | |
cp examples/test_rustbca.f90 . | |
gfortran -c rustbca.f90 target/release/liblibRustBCA.so | |
gfortran test_rustbca.f90 rustbca.f90 target/release/liblibRustBCA.so | |
./a.out | |
cp examples/RustBCA.c . | |
g++ RustBCA.c RustBCA.h target/release/liblibRustBCA.so -Iexamples/ -I/usr/include/python3.8 | |
./a.out | |
- name: Test RustBCA | |
run: | | |
cargo test --features cpr_rootfinder,hdf5_input,distributions,parry3d | |
- name: Run Examples | |
run: | | |
cargo run --release 0D examples/boron_nitride_0D.toml | |
./target/release/RustBCA 0D examples/titanium_dioxide_0D.toml | |
./target/release/RustBCA 1D examples/layered_geometry_1D.toml | |
cat 2000.0eV_0.0001deg_He_TiO2_Al_Sisummary.output | |
./target/release/RustBCA examples/layered_geometry.toml | |
cat 2000.0eV_0.0001deg_He_TiO2_Al_Sisummary.output | |
./target/release/RustBCA SPHERE examples/boron_nitride_sphere.toml | |
cargo run --release --features parry3d TRIMESH examples/tungsten_twist_trimesh.toml | |
./target/release/RustBCA examples/boron_nitride_wire.toml | |
cat boron_nitride_summary.output | |
./target/release/RustBCA HOMOGENEOUS2D examples/boron_nitride_wire_homogeneous.toml | |
cat boron_nitride_h_summary.output |