From 8fc57538da1346adf32cfa3b2bf95192904417ce Mon Sep 17 00:00:00 2001 From: JX278 <113102069+JX278@users.noreply.github.com> Date: Wed, 14 Sep 2022 21:57:05 +0800 Subject: [PATCH 1/2] Create build_test.yml --- .github/workflows/build_test.yml | 68 ++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/build_test.yml diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml new file mode 100644 index 00000000..c46fcc37 --- /dev/null +++ b/.github/workflows/build_test.yml @@ -0,0 +1,68 @@ +name: building test for each PR +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] +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 " + + + + + + + + + + + From 81d3ddca2914dd2fdf0637e43fa279855763f5b3 Mon Sep 17 00:00:00 2001 From: JX278 <113102069+JX278@users.noreply.github.com> Date: Fri, 16 Sep 2022 15:34:00 +0800 Subject: [PATCH 2/2] Update build_test.yml --- .github/workflows/build_test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index c46fcc37..d80b769c 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -1,9 +1,8 @@ name: building test for each PR on: push: - branches: [ "master" ] pull_request: - branches: [ "master" ] + jobs: build_test: runs-on: ubuntu-latest