-
Notifications
You must be signed in to change notification settings - Fork 55
68 lines (54 loc) · 1.9 KB
/
ci.yaml
File metadata and controls
68 lines (54 loc) · 1.9 KB
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
# 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: 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