Skip to content

Commit 7b0cde4

Browse files
committed
Install custom OpenMP runtime for Apple clang 17
1 parent 354b8d3 commit 7b0cde4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,18 @@ jobs:
7070
with:
7171
type: 'minimal'
7272

73+
- name: Intall and configure OpenMP runtime
74+
if: runner.os == 'macOS'
75+
run: |
76+
if clang --version | grep 'clang version 17'; then
77+
curl -O https://mac.r-project.org/openmp/openmp-19.1.0-darwin20-Release.tar.gz
78+
sudo tar fvvxz openmp-19.1.0-darwin20-Release.tar.gz -C /
79+
rm -f openmp-19.1.0-darwin20-Release.tar.gz
80+
echo 'PKG_CFLAGS=-Xclang -fopenmp' >> $GITHUB_ENV
81+
# Not the R-bundled -lomp, but our custom file installed just now
82+
echo 'PKG_LIBS=/usr/local/lib/libomp.dylib' >> $GITHUB_ENV
83+
fi # otherwise R-bundled runtime is fine
84+
7385
- name: Install dependencies
7486
run: |
7587
remotes::install_deps(dependencies = TRUE)

0 commit comments

Comments
 (0)