This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |