forked from GeomScale/Rvolesti
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (65 loc) · 2.66 KB
/
R-CMD-check-macOS.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
##############################################################################
# GitHub Actions Workflow to test the R interface of volesti
#
# Copyright (c) 2020 Vissarion Fisikopoulos
#
# Licensed under GNU LGPL.3, see LICENCE file
##############################################################################
on: [push, pull_request]
name: R-CMD-check-macOS
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: '4.1.2'}
- {os: macOS-latest, r: 'release'}
- {os: macOS-13, r: '4.1.2'}
- {os: macOS-13, r: 'release'}
- {os: macOS-12, r: '4.1.2'}
- {os: macOS-12, r: 'release'}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
- uses: r-lib/actions/setup-pandoc@v2
- name: Check runner.os
run: echo "Operating System: ${{ runner.os }}"
- name: Check matrix.os
run: echo "Operating System: ${{ matrix.config.os }}
- name: Symlink gfortran (macOS 12 or 13)
if: runner.os == 'macOS-12' || runner.os == 'macOS-13'
run: |
# make sure gfortran is available
sudo ln -s /usr/local/bin/gfortran-12 /usr/local/bin/gfortran
sudo mkdir -p /usr/local/gfortran
sudo ln -s /usr/local/Cellar/gcc@12/*/lib/gcc/12 /usr/local/gfortran/lib
gfortran --version
- name: Symlink gfortran (macOS 14)
if: runner.os == 'macOS-14'
run: |
# make sure gfortran is available
sudo ln -s /usr/local/bin/gfortran-13 /usr/local/bin/gfortran
sudo mkdir -p /usr/local/gfortran
sudo ln -s /usr/local/Cellar/gcc@13/*/lib/gcc/13 /usr/local/gfortran/lib
gfortran --version
- name: Install dependencies
run: Rscript -e "install.packages(c('devtools', dependencies=TRUE))" -e "install.packages(c('rcmdcheck', 'devtools', 'Rcpp', 'RcppEigen', 'BH', 'testthat', 'downloader', 'xfun'))";
- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: Rscript -e "library(rcmdcheck)" -e "rcmdcheck::rcmdcheck(args = c('--no-manual'), error_on = 'warning', check_dir = 'check')"
- name: Upload check results
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check