Skip to content

Prepare CRAN release v0.3.3 #254

Prepare CRAN release v0.3.3

Prepare CRAN release v0.3.3 #254

Workflow file for this run

on:
push:
branches: [main]
pull_request:
branches: [main]
name: R-CMD-check
jobs:
check-cran:
strategy:
fail-fast: false
matrix:
r: ['release', 'devel']
runs-on: ubuntu-latest
name: 'CRAN (R: ${{ matrix.r }})'
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r }}
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
needs: check
- name: Build
run: R CMD build .
- name: Check
run: R CMD check --no-manual --as-cran cuda.ml_*.tar.gz
env:
_R_CHECK_CRAN_INCOMING_: false
build-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
timeout-minutes: 120
outputs:
image: ghcr.io/${{ github.repository }}-ci:${{ github.sha }}
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: .github/docker/Dockerfile
push: true
tags: ghcr.io/${{ github.repository }}-ci:${{ github.sha }}
build-args: |
CUML_VERSION=21.12
CMAKE_CUDA_ARCHITECTURES=75
test-gpu:
needs: build-image
if: ${{ always() && needs.build-image.result == 'success' }}
concurrency:
group: gpu-tests
runs-on:
- "runs-on=${{ github.run_id }}/family=g4dn.xlarge/image=ubuntu24-gpu-x64/spot=true"
container:
image: ${{ needs.build-image.outputs.image }}
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
options: --gpus all --runtime=nvidia
timeout-minutes: 60
env:
NOT_CRAN: true
steps:
- name: Verify GPU access
run: nvidia-smi
- name: Session info
run: |
Rscript -e "sessionInfo()"
Rscript -e "library(cuda.ml)"
- name: Run tests
run: |
Rscript -e "testthat::test_package('cuda.ml', reporter = 'progress')"