-
Notifications
You must be signed in to change notification settings - Fork 22
163 lines (141 loc) · 4.63 KB
/
s390x.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
name: Test package on s390x
on:
push:
branches:
- main
- s390x-testing
workflow_dispatch:
env:
PKG: 'rhdf5'
jobs:
install-depdendencies:
name: Install package dependencies
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: s390x
- name: Make R library
run: mkdir -p ${RUNNER_TEMP}/R-lib
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/R-lib
key: R_lib-s390x-${{ hashFiles('**/DESCRIPTION') }}
restore-keys: |
R_lib-s390x-${{ hashFiles('**/DESCRIPTION') }}
R_lib-s390x-
- name: Run the build process with Docker
uses: addnab/docker-run-action@v3
with:
image: s390x/r-base:latest
options: |
--platform linux/s390x
-v ${{ runner.temp }}/R-lib:/R-lib
-v ${{ github.workspace }}/../:/build
--env R_LIBS_USER=/R-lib
--env PKG=${{ env.PKG }}
run: |
uname -a
echo "options(Ncpus=4L, timeout = 300)" >> ~/.Rprofile
Rscript -e "install.packages(c('remotes', 'BiocManager'))" \
-e "library(remotes)" \
-e "pkgs <- remotes::dev_package_deps('/build/${PKG}', dependencies = TRUE)" \
-e 'BiocManager::install(pkgs$package, update = TRUE, ask = FALSE)'
check-s390x:
name: Test package on s390x
runs-on: ubuntu-22.04
needs: install-depdendencies
steps:
- name: checkout
uses: actions/checkout@v4
- name: Make R library
run: mkdir -p ${RUNNER_TEMP}/R-lib
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: s390x
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/R-lib
key: R_lib-s390x-${{ hashFiles('**/DESCRIPTION') }}
restore-keys: |
R_lib-s390x-${{ hashFiles('**/DESCRIPTION') }}
R_lib-s390x-
- name: R CMD INSTALL
uses: addnab/docker-run-action@v3
with:
image: s390x/r-base:latest
options: |
--platform linux/s390x
-v ${{ runner.temp }}/R-lib:/R-lib
-v ${{ github.workspace }}/../:/build
--env R_LIBS_USER=/R-lib
--env PKG=${{ env.PKG }}
--workdir /build
run: |
ls -l
R CMD INSTALL ${PKG} &> ${PKG}.install-out.txt
ls -l
shell: bash
- name: R CMD build
uses: addnab/docker-run-action@v3
with:
image: s390x/r-base:latest
options: |
--platform linux/s390x
-v ${{ runner.temp }}/R-lib:/R-lib
-v ${{ github.workspace }}/../:/build
--env R_LIBS_USER=/R-lib
--env PKG=${{ env.PKG }}
--workdir /build
run: |
ls -l "${R_LIBS_USER}"
R CMD build --keep-empty-dirs --no-resave-data ${PKG}
ls -l
- name: R CMD check
uses: addnab/docker-run-action@v3
with:
image: s390x/r-base:latest4
options: |
--platform linux/s390x
-v ${{ runner.temp }}/R-lib:/R-lib
-v ${{ github.workspace }}/../:/build
--env R_LIBS_USER=/R-lib
--env PKG=${{ env.PKG }}
--workdir /build
run: |
ls -l
R CMD check --install=check:${PKG}.install-out.txt --library="${R_LIBS_USER}" --no-vignettes --timings ${PKG}*.tar.gz
cat ${PKG}.install-out.txt
ls -l
- name: Build Package Binary
uses: addnab/docker-run-action@v3
with:
image: s390x/r-base:latest
options: |
--platform linux/s390x
-v ${{ runner.temp }}/R-lib:/R-lib
-v ${{ github.workspace }}/../:/build
--env R_LIBS_USER=/R-lib
--env PKG=${{ env.PKG }}
--workdir /build
run: |
mkdir -p ${PKG}.buildbin-libdir
R CMD INSTALL --build --library=${PKG}.buildbin-libdir ${PKG}*.tar.gz
ls -l
- uses: actions/upload-artifact@v4
if: always()
with:
name: my-artifact
path: |
~/**/*.tar.gz
~/**/*.install-out.txt
~/**/*.Rcheck
if-no-files-found: warn