-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (85 loc) · 2.78 KB
/
Fedora_setup_pak.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Workflow is triggered on label and check installation on various operating systems
# This action is adapted from https://github.com/t4d-gmbh/stubbed_versioning
name: Fedora Install
on:
push:
branches:
- "main"
- "117-elaborate-if-inla-jags-and-gsl-can-be-installed-via-systemrequirements"
env:
JAGS: '4.3.2'
BUILD_LOC: "./build"
BRANCH: ${{ github.head_ref || github.ref_name }}
permissions:
packages: read
contents: write
pull-requests: write
repository-projects: write
jobs:
setup-and-install:
runs-on: ubuntu-latest
container:
image: "fedora:latest"
name: fedora-latest R release
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- name: prepare fedora
run: |
dnf -y install wget
dnf -y install gcc
dnf -y install gcc-c++
dnf -y install gfortran
dnf -y install lapack* # is needed on fedora server
dnf -y install blas*
dnf -y install atlas*
- name: install R
run: |
dnf -y install R
- name: install config and build dependencies
run: |
dnf -y install libcurl-devel # needef for pak
- name: install pak
run: |
install.packages('pak', repos=c(CRAN="https://cran.r-project.org"))
shell: Rscript {0}
- name: install JAGS
run: |
wget -O /tmp/jags.tar.gz https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Source/JAGS-${{ env.JAGS }}.tar.gz/download
cd /tmp
tar -xf jags.tar.gz
cd /tmp/JAGS-${{ env.JAGS }}
./configure --libdir=/usr/local/lib64
make
make install
- name: assert runtime linkage
run: |
echo "/usr/local/lib64" > /etc/ld.so.conf.d/jags.conf
/sbin/ldconfig
- name: install rjags
run: |
install.packages("rjags", configure.args="--enable-rpath", repos=c(CRAN="https://cran.r-project.org"))
library("rjags")
shell: Rscript {0}
- name: pak install from GitHub
run: |
pak::repo_add(INLA = "https://inla.r-inla-download.org/R/stable/")
pak::pkg_install("furrer-lab/abn@${{ env.BRANCH }}", dependencies=TRUE)
library('abn')
shell: Rscript {0}
- name: fetch the repository from GitHub
uses: actions/checkout@v4
- name: deactivate the renv
run: |
renv::deactivate()
shell: Rscript {0}
- name: install from source
run: |
pak::local_install(dependencies=TRUE)
shell: Rscript {0}
- name: run the tests
run: |
pak::pak('r-lib/testthat')
testthat::test_local(path='tests', load_package='none')
shell: Rscript {0}