Skip to content

Update oneflow_windows_actions.ps1 #192

Update oneflow_windows_actions.ps1

Update oneflow_windows_actions.ps1 #192

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: OneFLOW_Linux_CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main, hexin ]
pull_request:
branches: [ main, hexin ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
name: "Linux OneFLOW Actions"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install GCC-10
run: |
sudo apt-get update
sudo apt install gcc-10 g++-10 -y
gcc --version
g++ --version
ls /usr/bin/gcc*
shell: bash
- name: Install Third party library
run: |
echo cd ${{ github.workspace }}
cd ${{ github.workspace }}
echo ls
ls
sudo apt-get update
sudo apt-get install libhdf5-dev libcgns-dev libmetis-dev libmpich-dev -y
shell: bash
- name: CMake Build and Install
#env:
# CC: gcc-10
# CXX: g++-10
run: |
cd ${{ github.workspace }}
ls
mkdir build
cd build
echo MPI_HOME_INC
echo MPI_HOME_LIB
export MPI_HOME_INC="/usr/include/x86_64-linux-gnu/mpich"
export MPI_HOME_LIB="/usr/lib/x86_64-linux-gnu/libmpich.so"
export CGNS_HOME_INC="/usr/include"
export CGNS_HOME_LIB="/usr/lib/x86_64-linux-gnu/libcgns.so"
export METIS_HOME_INC="/usr/include"
export METIS_HOME_LIB="/usr/lib/x86_64-linux-gnu/libmetis.so"
cmake --version
cmake -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/Run ../
make -j 4
make install
shell: bash
- name: Run OneFLOW CFD Tests
env:
prefix: ${{ github.workspace }}/Run
run: |
#echo "env.prefix= ${{env.prefix}}"
#echo "ls ${{env.prefix}}"
#ls "${{env.prefix}}"
export PATH=${{env.prefix}}/bin/:${{env.prefix}}/lib:$PATH
#echo $PATH
export LD_LIBRARY_PATH=${{env.prefix}}/lib:$LD_LIBRARY_PATH
#sudo ldconfig
#ls ${{env.prefix}}/bin
#ldd ${{env.prefix}}/bin/OneFLOW
OneFLOW
cd "${{ github.workspace }}/test"
ls
python --version
#python test.py " " " " linux
python test.py "mpirun -np 1" "OneFLOW"
shell: bash