Skip to content

Make openmp a matrix variable #588

Make openmp a matrix variable

Make openmp a matrix variable #588

Workflow file for this run

# Run CI for R using https://eddelbuettel.github.io/r-ci/
name: ci
on:
push:
pull_request:
env:
_R_CHECK_FORCE_SUGGESTS_: "false"
jobs:
ci:
strategy:
matrix:
include:
- { name: container, os: ubuntu-latest, container: rocker/r2u4ci }
- { name: macos, os: macos-latest, openmp: yes }
- { name: macos, os: macos-latest, openmp: no }
#- { name: ubuntu, os: ubuntu-latest }
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: eddelbuettel/github-actions/r-ci@master
with:
dev_version: 'TRUE'
- name: OpenMP for macOS
if: ${{ matrix.os == 'macos-latest' && matrix.openmp == 'yes' }}
run: |
curl -fsSL https://raw.githubusercontent.com/coatless-shell/openmp/main/install-openmp.sh | bash -s -- --yes
mkdir -p ~/.R
cat <<EOF > ~/.R/Makevars
CPPFLAGS += -Xclang -fopenmp
LDFLAGS += -lomp
EOF
- name: Show config on macOS
if: ${{ matrix.os == 'macos-latest' && matrix.openmp == 'yes' }}
run: |
cat ~/.R/Makevars
echo -n "R CMD config CXX: "; R CMD config CXX
echo -n "R CMD config CPPFLAGS: "; R CMD config CPPFLAGS
echo -n "R CMD config LDFLAGS: "; R CMD config LDFLAGS
echo -n "R CMD config SHLIB_CXXLD: "; R CMD config SHLIB_CXXLD
echo -n "R CMD config SHLIB_CXXLDFLAGS: "; R CMD config SHLIB_CXXLDFLAGS
- name: Run configure
run: ./configure; cat src/Makevars
- name: Dependencies
run: ./run.sh install_deps
- name: Test
run: ./run.sh run_tests
- name: Coverage
if: ${{ matrix.os == 'ubuntu-latest' }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: ./run.sh coverage