Skip to content

Commit e49a269

Browse files
committed
Make openmp a matrix variable
1 parent e3bd773 commit e49a269

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

.github/workflows/ci.yaml

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ jobs:
1515
matrix:
1616
include:
1717
- { name: container, os: ubuntu-latest, container: rocker/r2u4ci }
18-
- { name: macos, os: macos-latest }
18+
- { name: macos, os: macos-latest, openmp: yes }
19+
- { name: macos, os: macos-latest, openmp: no }
1920
#- { name: ubuntu, os: ubuntu-latest }
2021

2122

@@ -31,25 +32,25 @@ jobs:
3132
with:
3233
dev_version: 'TRUE'
3334

34-
# - name: OpenMP for macOS
35-
# if: ${{ matrix.os == 'macos-latest' }}
36-
# run: |
37-
# curl -fsSL https://raw.githubusercontent.com/coatless-shell/openmp/main/install-openmp.sh | bash -s -- --yes
38-
# mkdir -p ~/.R
39-
# cat <<EOF > ~/.R/Makevars
40-
# CPPFLAGS += -Xclang -fopenmp
41-
# LDFLAGS += -lomp
42-
# EOF
35+
- name: OpenMP for macOS
36+
if: ${{ matrix.os == 'macos-latest' && matrix.openmp == 'yes' }}
37+
run: |
38+
curl -fsSL https://raw.githubusercontent.com/coatless-shell/openmp/main/install-openmp.sh | bash -s -- --yes
39+
mkdir -p ~/.R
40+
cat <<EOF > ~/.R/Makevars
41+
CPPFLAGS += -Xclang -fopenmp
42+
LDFLAGS += -lomp
43+
EOF
4344
44-
# - name: Show config on macOS
45-
# if: ${{ matrix.os == 'macos-latest' }}
46-
# run: |
47-
# cat ~/.R/Makevars
48-
# echo -n "R CMD config CXX: "; R CMD config CXX
49-
# echo -n "R CMD config CPPFLAGS: "; R CMD config CPPFLAGS
50-
# echo -n "R CMD config LDFLAGS: "; R CMD config LDFLAGS
51-
# echo -n "R CMD config SHLIB_CXXLD: "; R CMD config SHLIB_CXXLD
52-
# echo -n "R CMD config SHLIB_CXXLDFLAGS: "; R CMD config SHLIB_CXXLDFLAGS
45+
- name: Show config on macOS
46+
if: ${{ matrix.os == 'macos-latest' && matrix.openmp == 'yes' }}
47+
run: |
48+
cat ~/.R/Makevars
49+
echo -n "R CMD config CXX: "; R CMD config CXX
50+
echo -n "R CMD config CPPFLAGS: "; R CMD config CPPFLAGS
51+
echo -n "R CMD config LDFLAGS: "; R CMD config LDFLAGS
52+
echo -n "R CMD config SHLIB_CXXLD: "; R CMD config SHLIB_CXXLD
53+
echo -n "R CMD config SHLIB_CXXLDFLAGS: "; R CMD config SHLIB_CXXLDFLAGS
5354
5455
- name: Run configure
5556
run: ./configure; cat src/Makevars

0 commit comments

Comments
 (0)