Update [31/01/2022] #14
This file contains hidden or 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
| # This is a basic workflow to help you get started with Actions | |
| name: Build and Test | |
| # Controls when the action will run. Triggers the workflow on push or pull request | |
| # events but only for the master branch | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
| jobs: | |
| # This workflow contains a single job called "build" | |
| Build: | |
| # The type of runner that the job will run on | |
| runs-on: ubuntu-latest | |
| # Steps represent a sequence of tasks that will be executed as part of the job | |
| steps: | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| - uses: actions/checkout@v2 | |
| # Compilation | |
| - name: Compile case - Theoretical | |
| run : make | |
| # Default run | |
| - name: Run TRACMASS (default configuration) | |
| run : ./runtracmass | |
| # Netcdf library | |
| - name: Install netcdf | |
| run : | | |
| sudo apt-get update | |
| sudo apt-get install libnetcdf-dev libnetcdff-dev | |
| # Compilation of other projects | |
| - name: Compile 2D dataset - AVISO | |
| run : | | |
| cp Makefile Makefile_original | |
| sed '7s/.*/CASE = AVISO/' Makefile_original > dum1 | |
| sed '6s/.*/PROJECT = AVISO/' dum1 > dum2 | |
| sed '10s/.*/NETCDFLIB = automatic-44 /' dum2 > Makefile | |
| make clean | |
| make | |
| - name: Compile 3D dataset - NEMO | |
| run : | | |
| sed '7s/.*/CASE = ORCA1/' Makefile_original > dum1 | |
| sed '6s/.*/PROJECT = NEMO/' dum1 > dum2 | |
| sed '10s/.*/NETCDFLIB = automatic-44 /' dum2 > Makefile | |
| make clean | |
| make | |
| - name: Compile 3D dataset - IFS | |
| run : | | |
| sed '7s/.*/CASE = IFS/' Makefile_original > dum1 | |
| sed '6s/.*/PROJECT = IFS/' dum1 > dum2 | |
| sed '10s/.*/NETCDFLIB = automatic-44 /' dum2 > Makefile | |
| make clean | |
| make | |
| - name: Compile 3D dataset - ROMS | |
| run : | | |
| sed '7s/.*/CASE = ROMS/' Makefile_original > dum1 | |
| sed '6s/.*/PROJECT = ROMS/' dum1 > dum2 | |
| sed '10s/.*/NETCDFLIB = automatic-44 /' dum2 > Makefile | |
| make clean | |
| make | |
| # This workflow contains a single job called "build" | |
| Test: | |
| # The type of runner that the job will run on | |
| runs-on: ubuntu-latest | |
| # Steps represent a sequence of tasks that will be executed as part of the job | |
| steps: | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| - uses: actions/checkout@v2 | |
| # Install funit | |
| - name: Install and setup funit | |
| run : sudo gem install funit | |
| - name: Test mod_calendar.F90 | |
| run : | | |
| cd src/ | |
| cp _funit/*.fun . | |
| export FC="gfortran" | |
| export CXX="g++" | |
| export CC="gcc" | |
| export FSFLAG=-I | |
| funit mod_calendar | |
| funit --clean | |
| - name: Test mod_clock.F90 | |
| run : | | |
| cd src/ | |
| cp _funit/*.fun . | |
| export FC="gfortran" | |
| export CXX="g++" | |
| export CC="gcc" | |
| export FSFLAG=-I | |
| funit mod_clock | |
| funit --clean | |
| - name: Test mod_error.F90 | |
| run : | | |
| cd src/ | |
| cp _funit/*.fun . | |
| export FC="gfortran" | |
| export CXX="g++" | |
| export CC="gcc" | |
| export FSFLAG=-I | |
| funit mod_error | |
| funit --clean | |
| - name: Test mod_pos.F90 | |
| run : | | |
| cd src/ | |
| cp _funit/mod_pos_tstep.fun mod_pos.fun | |
| export FC="gfortran" | |
| export CXX="g++" | |
| export CC="gcc" | |
| export FSFLAG=-I | |
| sed '1 s/#ifndef time_analytical/!#ifndef time_analytical/' mod_pos_tstep.F90 > temp1.F90 | |
| sed '608 s/#endif/!#endif /' temp1.F90 > temp2.F90 | |
| mv temp2.F90 mod_pos.F90 | |
| rm temp1.F90 mod_pos_tstep.F90 mod_pos_tanalytical.F90 | |
| funit mod_pos | |
| funit --clean | |
| - name: Test mod_seed.F90 | |
| run : | | |
| cd src/ | |
| cp _funit/*.fun . | |
| cat <<EOF > seedTime | |
| 1 | |
| 3 | |
| 5 | |
| 11 | |
| 12 | |
| 24 | |
| EOF | |
| cat <<EOF > seedFile | |
| 1 2 3 1 -1 | |
| 4 5 10 1 -1 | |
| 6 7 8 1 1 | |
| 12 14 7 1 1 | |
| EOF | |
| export FC="gfortran" | |
| export CXX="g++" | |
| export CC="gcc" | |
| export FSFLAG=-I | |
| funit mod_seed | |
| funit --clean | |
| - name: Test mod_subdomain.F90 | |
| run : | | |
| cd src/ | |
| cp _funit/*.fun . | |
| export FC="gfortran" | |
| export CXX="g++" | |
| export CC="gcc" | |
| export FSFLAG=-I | |
| funit mod_subdomain | |
| funit --clean | |
| - name: Test mod_swap.F90 | |
| run : | | |
| cd src/ | |
| cp _funit/*.fun . | |
| export FC="gfortran" | |
| export CXX="g++" | |
| export CC="gcc" | |
| export FSFLAG=-I | |
| funit mod_swap | |
| funit --clean | |
| - name: Test mod_tracers.F90 | |
| run : | | |
| cd src/ | |
| cp _funit/*.fun . | |
| export FC="gfortran" | |
| export CXX="g++" | |
| export CC="gcc" | |
| export FSFLAG=-I | |
| funit mod_tracers | |
| funit --clean | |
| - name: Test mod_vertvel.F90 | |
| run : | | |
| cd src/ | |
| cp _funit/*.fun . | |
| export FC="gfortran" | |
| export CXX="g++" | |
| export CC="gcc" | |
| export FSFLAG=-I | |
| funit mod_vertvel | |
| funit --clean |