diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml new file mode 100644 index 00000000..d80b769c --- /dev/null +++ b/.github/workflows/build_test.yml @@ -0,0 +1,67 @@ +name: building test for each PR +on: + push: + pull_request: + +jobs: + build_test: + runs-on: ubuntu-latest + container: + image: ubuntu:20.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: initialize + env: + DEBIAN_FRONTEND: noninteractive + run: | + apt install -y --no-install-recommends + apt-get update + apt-get install -y sudo + apt-get install -y wget + apt-get install -y unzip + apt-get install -y git + apt-get install -y software-properties-common + + + - name: openfoam7 + env: + DEBIAN_FRONTEND: noninteractive + run: | + sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key | apt-key add -" + sudo add-apt-repository http://dl.openfoam.org/ubuntu + sudo apt-get update + export DEBIAN_FRONTEND=noninteractive + apt-get -y install openfoam7 + + + + - name: libtorch + run: | + wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.11.0%2Bcpu.zip + unzip libtorch-cxx11-abi-shared-with-deps-1.11.0+cpu.zip -d thirdParty + rm libtorch-cxx11-abi-shared-with-deps-1.11.0+cpu.zip + + + - name: clone + run: | + git clone https://github.com/deepmodeling/deepflame-dev.git + cd deepflame-dev + + + + + - name: cantera and build + run: + /bin/bash -c "wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && sh Miniconda3-latest-Linux-x86_64.sh -b && source ~/miniconda3/etc/profile.d/conda.sh && conda create -n libcantera && conda activate libcantera && conda install -c cantera libcantera-devel && source /opt/openfoam7/etc/bashrc && . install.sh " + + + + + + + + + + +