Another update #3
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: Testing package on arm64 | |
on: | |
push: | |
branches: | |
- devel | |
workflow_dispatch: | |
env: | |
PKG: 'Rarr' | |
jobs: | |
install-depdendencies: | |
name: Install package dependencies | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: arm64 | |
- 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-ARM64-${{ hashFiles('**/DESCRIPTION') }} | |
restore-keys: | | |
R_lib-ARM64-${{ hashFiles('**/DESCRIPTION') }} | |
R_lib-ARM64- | |
- name: Run the build process with Docker | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: ghcr.io/grimbough/bioc-with-tinytex:devel-arm64 | |
options: | | |
--platform linux/arm64 | |
-v ${{ runner.temp }}/R-lib:/R-lib | |
-v ${{ github.workspace }}/../:/build | |
--env R_LIBS_USER=/R-lib | |
--env PKG=${{ env.PKG }} | |
run: | | |
echo "options(Ncpus=4L, timeout = 300)" >> ~/.Rprofile | |
## remotes comes pre-installed in the Docker images | |
Rscript -e "library(remotes)" \ | |
-e "dev_package_deps('/build/${PKG}', dependencies = TRUE) |> update(upgrade = 'always')" | |
check-arm64: | |
name: Test package on ARM64 | |
runs-on: ubuntu-24.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@v2 | |
with: | |
platforms: arm64 | |
- name: Cache Dependencies | |
id: cache-deps | |
uses: actions/cache@v4 | |
with: | |
path: ${{ runner.temp }}/R-lib | |
key: R_lib-ARM64-${{ hashFiles('**/DESCRIPTION') }} | |
restore-keys: | | |
R_lib-ARM64-${{ hashFiles('**/DESCRIPTION') }} | |
R_lib-ARM64- | |
- name: R CMD INSTALL | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: ghcr.io/grimbough/bioc-with-tinytex:devel-arm64 | |
options: | | |
--platform linux/arm64 | |
-v ${{ runner.temp }}/R-lib:/R-lib | |
-v ${{ github.workspace }}/../:/build | |
--env R_LIBS_USER=/R-lib | |
--env PKG=${{ env.PKG }} | |
--workdir /build | |
run: | | |
R CMD INSTALL ${PKG} > ${PKG}.install-out.txt 2>&1 | |
if [ $? -eq 1 ]; then | |
cat ${PKG}.install-out.txt | |
exit 1; | |
fi | |
- name: R CMD build | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: ghcr.io/grimbough/bioc-with-tinytex:devel-arm64 | |
options: | | |
--platform linux/arm64 | |
-v ${{ runner.temp }}/R-lib:/R-lib | |
-v ${{ github.workspace }}/../:/build | |
--env R_LIBS_USER=/R-lib | |
--env PKG=${{ env.PKG }} | |
--workdir /build | |
run: | | |
R CMD build --keep-empty-dirs --no-resave-data ${PKG} | |
if [ $? -eq 1 ]; then exit 1; fi | |
- name: R CMD check | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: ghcr.io/grimbough/bioc-with-tinytex:devel-arm64 | |
options: | | |
--platform linux/arm64 | |
-v ${{ runner.temp }}/R-lib:/R-lib | |
-v ${{ github.workspace }}/../:/build | |
--env R_LIBS_USER=/R-lib | |
--env PKG=${{ env.PKG }} | |
--workdir /build | |
run: | | |
R CMD check --install=check:${PKG}.install-out.txt --library="${R_LIBS_USER}" --no-vignettes --timings ${PKG}*.tar.gz | |
if [ $? -eq 1 ]; then exit 1; fi | |
- name: Build Package Binary | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: ghcr.io/grimbough/bioc-with-tinytex:devel-arm64 | |
options: | | |
--platform linux/arm64 | |
-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 | |
if [ $? -eq 1 ]; then exit 1; fi | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: my-artifact | |
path: | | |
~/**/*.tar.gz | |
~/**/*.install-out.txt | |
~/**/*.Rcheck | |
if-no-files-found: warn | |