Skip to content

update actions/checkout to v3 to suppress warning #244

update actions/checkout to v3 to suppress warning

update actions/checkout to v3 to suppress warning #244

Workflow file for this run

# This file is based on examples in
# https://docs.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions
# Note that all the "sudo" commands here appear to cause a warning message
# "sudo: setrlimit(RLIMIT_CORE): operation not permitted"
# This appears to be a known harmless annoyance:
# https://gitlab.alpinelinux.org/alpine/aports/-/issues/11122
name: CI
on: [push, pull_request]
jobs:
CI:
strategy:
fail-fast: false
matrix:
precision: ['single', 'double']
os: [ubuntu-latest, macos-latest]
exclude:
# macos with single has strange errors on github actions, even though it works on my laptop
- precision: 'single'
os: macos-latest
runs-on: ${{ matrix.os }}
name: ${{ matrix.os}}, ${{ matrix.precision }} precision
env:
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
steps:
# First print out lots of information. We do this in separate
# "name" blocks because otherwise the output gets mixed together
# in the github actions log.
- name: Print user and group id
run: |
set -ex
id
- name: PWD
run: |
set -ex
pwd
- name: ls -l
run: |
set -ex
ls -l
- name: apt-get any needed packages
if: "contains(matrix.os, 'ubuntu')"
run: |
sudo apt-get update
sudo apt-get install -y build-essential openmpi-bin libopenmpi-dev liblapack-dev git cmake libnetcdf-dev libgsl-dev
# If at some point we need the C++ wrapper for netcdf, it is libnetcdf-c++4-dev
- name: Get any needed packages from homebrew
if: "contains(matrix.os, 'macos')"
run: |
brew install netcdf
brew install open-mpi
brew install gsl
- name: Print versions
run: |
which mpicc
which mpiexec
cmake --version
- uses: actions/checkout@v3
# If we want submodules downloaded, uncomment the next 2 lines:
#with:
# submodules: true
- name: Print CMake version
run: cmake --version
- name: which python3 after python setup
run: which python3
- name: which pip after python setup
run: pip --version
- name: which pip using sudo
run: sudo pip --version
- name: which pip using sudo -E
run: sudo -E pip --version
- name: which python using sudo
run: sudo which python3
- name: which python using sudo -E
run: sudo -E which python3
- name: env after adding python
run: env
- name: CMake configure, double precision
run: cmake .
if: matrix.precision == 'double'
- name: CMake configure, single precision
run: cmake -DSINGLE=1 .
if: matrix.precision == 'single'
- name: Compile
run: make
- name: Run unit tests
run: make test
- name: Run examples, double precision
run: |
cd examples
./run_examples
if: matrix.precision == 'double'
- name: Run examples, single precision
run: |
cd examples
./run_examples_single
if: matrix.precision == 'single'