Skip to content

Merge pull request #4 from ORNL-Fusion/master_dev #6

Merge pull request #4 from ORNL-Fusion/master_dev

Merge pull request #4 from ORNL-Fusion/master_dev #6

Workflow file for this run

name: Continuous Integration Test Master
on:
workflow_dispatch:
push:
jobs:
ci_test:
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
mode: [Release, Debug]
runs-on: ${{matrix.os}}
steps:
- name: CPU Info Mac
if: ${{matrix.os == 'macos-latest'}}
run: |
sysctl -n machdep.cpu.brand_string
sysctl -n machdep.cpu.features
(echo "Number of Cores:"; sysctl -n machdep.cpu.core_count) |tr '\n' '\t' && echo ''
- name: CPU Info Linux
if: ${{matrix.os == 'ubuntu-latest'}}
run: awk '{if ($0=="") exit; print $0}' /proc/cpuinfo
- name: Clone Repo
shell: bash
working-directory: ${{runner.workspace}}
run: git clone https://github.com/ORNL-Fusion/Stellarator-Tools.git ${{runner.workspace}}/Stellarator-Tools
- name: Create build directory.
working-directory: ${{runner.workspace}}/Stellarator-Tools
run: cmake -E make_directory build
- name: Install Libraries Mac
if: ${{matrix.os == 'macos-latest'}}
shell: bash
run: |
brew install netcdf-fortran
brew install scalapack
- name: Install Libraries Linux
if: ${{matrix.os == 'ubuntu-latest'}}
shell: bash
run: |
sudo apt update
sudo apt-get install libnetcdf-dev
sudo apt-get install libnetcdff-dev
sudo apt-get install libopenmpi-dev
sudo apt-get install libscalapack-openmpi-dev
- name: Configure CMake Mac
if: ${{matrix.os == 'macos-latest'}}
shell: bash
working-directory: ${{runner.workspace}}/Stellarator-Tools/build
run: cmake -DCMAKE_BUILD_TYPE=${{matrix.mode}} -DCMAKE_Fortran_COMPILER=gfortran-11 -DBUILD_BOOZ_XFORM=ON -DBUILD_V3FIT=ON -DBUILD_V3RFUN=ON -DBUILD_SIESTA=ON -DBUILD_LGRID=ON -DBUILD_SURFACE=ON -DBUILD_BMW=ON -DBUILD_PARVMEC=ON -DBUILD_DESCUR=ON -DBUILD_TAG_SURFACE=${{github.ref_name}} -DUSE_FAST_COPY=ON -DUSE_PROFILER=ON ${{runner.workspace}}/Stellarator-Tools/
- name: Configure CMake Linux
if: ${{matrix.os == 'ubuntu-latest'}}
shell: bash
working-directory: ${{runner.workspace}}/Stellarator-Tools/build
run: cmake -DCMAKE_BUILD_TYPE=${{matrix.mode}} -DBUILD_BOOZ_XFORM=ON -DBUILD_V3FIT=ON -DBUILD_V3RFUN=ON -DBUILD_SIESTA=ON -DBUILD_LGRID=ON -DBUILD_SURFACE=ON -DBUILD_BMW=ON -DBUILD_PARVMEC=ON -DBUILD_DESCUR=ON -DBUILD_TAG_SURFACE=${{github.ref_name}} -DUSE_FAST_COPY=ON -DUSE_PROFILER=ON ${{runner.workspace}}/Stellarator-Tools/
- name: Build
shell: bash
working-directory: ${{runner.workspace}}/Stellarator-Tools/build
run: make -j VERBOSE=1
- name: Test
shell: bash
working-directory: ${{runner.workspace}}/Stellarator-Tools/build
run: make test
- name: Show Log
if: failure()
shell: bash
working-directory: ${{runner.workspace}}/Stellarator-Tools/build/Testing/Temporary
run: cat LastTest.log