Skip to content

Commit

Permalink
GitHub actions (#4)
Browse files Browse the repository at this point in the history
* Split master and master_dev into separate workflows. Fix linux runner names.

* Update ci_test.yaml

Fix merge conflicts
  • Loading branch information
cianciosa committed Jan 25, 2023
1 parent 9b19bee commit 2a1adbc
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/ci_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ jobs:
ci_test:
strategy:
matrix:
os: [macos-latest, unbuntu-latest]
os: [macos-latest, ubuntu-latest]
mode: [Release, Debug]
branch: [master, master_dev]
runs-on: ${{matrix.os}}
steps:
- name: CPU Info Mac
Expand All @@ -18,7 +17,7 @@ jobs:
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 == 'unbuntu-latest'}}
if: ${{matrix.os == 'ubuntu-latest'}}
run: awk '{if ($0=="") exit; print $0}' /proc/cpuinfo
- name: Clone Repo
shell: bash
Expand All @@ -36,7 +35,7 @@ jobs:
brew install open-mpi
brew install scalapack
- name: Install Libraries Linux
if: ${{matrix.os == 'unbuntu-latest'}}
if: ${{matrix.os == 'ubuntu-latest'}}
shell: bash
run: |
sudo apt update
Expand All @@ -48,12 +47,12 @@ jobs:
if: ${{matrix.os == 'macos-latest'}}
shell: bash
working-directory: ${{runner.workspace}}/Stellarator-Tools/build
run: cmake -DCMAKE_BUILD_TYPE=${{matrix.mode}} -DCMAKE_Fortran_COMPILER=/usr/local/opt/gfortran/bin/gfortran -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_BOOZ_XFORM=${{matrix.branch}} -DBUILD_TAG_V3FIT=${{matrix.branch}} -DBUILD_TAG_V3RFUN=${{matrix.branch}} -DBUILD_TAG_SIESTA=${{matrix.branch}} -DBUILD_TAG_LGRID=${{github.ref_name}} -DBUILD_TAG_SURFACE=${{matrix.branch}} -DBUILD_TAG_BMW=${{matrix.branch}} -DBUILD_TAG_LIBSTELL=${{matrix.branch}} -DBUILD_TAG_MAKEGRID=${{matrix.branch}} -DBUILD_TAG_PARVMEC=${{matrix.branch}} -DBUILD_TAG_DESCUR=${{matrix.branch}} -DUSE_FAST_COPY=ON -DUSE_PROFILER=ON ${{runner.workspace}}/Stellarator-Tools/
run: cmake -DCMAKE_BUILD_TYPE=${{matrix.mode}} -DCMAKE_Fortran_COMPILER=/usr/local/opt/gfortran/bin/gfortran -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_BOOZ_XFORM=master_dev -DBUILD_TAG_V3FIT=master_dev -DBUILD_TAG_V3RFUN=master_dev -DBUILD_TAG_SIESTA=master_dev -DBUILD_TAG_LGRID=${{github.ref_name}} -DBUILD_TAG_SURFACE=master_dev -DBUILD_TAG_BMW=master_dev -DBUILD_TAG_LIBSTELL=master_dev -DBUILD_TAG_MAKEGRID=master_dev -DBUILD_TAG_PARVMEC=master_dev -DBUILD_TAG_DESCUR=master_dev -DUSE_FAST_COPY=ON -DUSE_PROFILER=ON ${{runner.workspace}}/Stellarator-Tools/
- name: Configure CMake Linux
if: ${{matrix.os == 'unbuntu-latest'}}
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_BOOZ_XFORM=${{matrix.branch}} -DBUILD_TAG_V3FIT=${{matrix.branch}} -DBUILD_TAG_V3RFUN=${{matrix.branch}} -DBUILD_TAG_SIESTA=${{matrix.branch}} -DBUILD_TAG_LGRID=${{github.ref_name}} -DBUILD_TAG_SURFACE=${{matrix.branch}} -DBUILD_TAG_BMW=${{matrix.branch}} -DBUILD_TAG_LIBSTELL=${{matrix.branch}} -DBUILD_TAG_MAKEGRID=${{matrix.branch}} -DBUILD_TAG_PARVMEC=${{matrix.branch}} -DBUILD_TAG_DESCUR=${{matrix.branch}} -DUSE_FAST_COPY=ON -DUSE_PROFILER=ON ${{runner.workspace}}/Stellarator-Tools/
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_BOOZ_XFORM=master_dev -DBUILD_TAG_V3FIT=master_dev -DBUILD_TAG_V3RFUN=master_dev -DBUILD_TAG_SIESTA=master_dev -DBUILD_TAG_LGRID=${{github.ref_name}} -DBUILD_TAG_SURFACE=master_dev -DBUILD_TAG_BMW=master_dev -DBUILD_TAG_LIBSTELL=master_dev -DBUILD_TAG_MAKEGRID=master_dev -DBUILD_TAG_PARVMEC=master_dev -DBUILD_TAG_DESCUR=master_dev -DUSE_FAST_COPY=ON -DUSE_PROFILER=ON ${{runner.workspace}}/Stellarator-Tools/
- name: Build
shell: bash
working-directory: ${{runner.workspace}}/Stellarator-Tools/build
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/ci_test_master.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
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
brew install netcdf-fortran
brew install open-mpi
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=/usr/local/opt/gfortran/bin/gfortran -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_LGRID=${{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_LGRID=${{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 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

0 comments on commit 2a1adbc

Please sign in to comment.