Skip to content

Ues SCALE library v5.5.1 in Github Actions #15

Ues SCALE library v5.5.1 in Github Actions

Ues SCALE library v5.5.1 in Github Actions #15

Workflow file for this run

name: build_scalelib
on:
push:
branches:
- feature/scalelib_build
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Install Fortran compiler & NetCDF & OpenMPI & openssh
run: |
sudo apt-get update
echo "Install Fortran compiler .."
sudo apt-get install -y gfortran
echo "Install NetCDF library .."
sudo apt-get install -y libnetcdf-dev libnetcdff-dev
echo "Install OpenMPI library .."
sudo apt-get install -y openmpi-bin libopenmpi-dev
echo "Install openssh .."
sudo apt-get install -y openssh-client rsync
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_KEY }}
name: id_rsa
known_hosts: ${{ secrets.KNOWN_HOSTS }}
config: |
Host scalelib_host
HostName ${{ secrets.SCALELIB_SERVER_HOST }}
User ${{ secrets.SCALELIB_SERVER_USER }}
IdentityFile ~/.ssh/id_rsa
- name: Build SCALE library & send it to a server
run: |
export SCALE_INST_DIR=${GITHUB_WORKSPACE}/../scale
mkdir -p ${SCALE_INST_DIR} && cd ${SCALE_INST_DIR}
echo "Download SCALE library .."
wget -q https://scale.riken.jp/archives/scale-5.5.1.tar.gz
tar xzf scale-5.5.1.tar.gz --strip-components 1
echo "Build SCALE library .."
export SCALE_SYS=Linux64-gnu-ompi
make -j 2 -C dc_utils
make -j 2 -C scalelib/src
echo "Package .. & rsync"
export tmp_dir=scalelib_ubuntu_latest
mkdir ${tmp_dir}
mkdir -p ${tmp_dir}/scalelib/include
cp -r ./include ${tmp_dir}
cp -r ./lib ${tmp_dir}
cp -r scalelib/include/*.h ${tmp_dir}/scalelib/include/
zip -r ${tmp_dir}.zip ${tmp_dir}
rsync ${tmp_dir}.zip scalelib_host:FE-Project_GitActions/