Skip to content

updates for keras_core / multi-backend support #404

updates for keras_core / multi-backend support

updates for keras_core / multi-backend support #404

Workflow file for this run

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
schedule:
- cron: '51 3 * * Fri'
name: R-CMD-check
defaults:
run:
shell: Rscript {0}
jobs:
R-CMD-check:
name: ${{ matrix.os }}, tf-${{ matrix.tf }}, R-${{ matrix.r }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
## the happy path - default everything
- {os: 'ubuntu-latest' , tf: 'default', r: 'release'}
- {os: 'windows-latest', tf: 'default', r: 'release'}
- {os: 'macOS-latest' , tf: 'default', r: 'release'}
## old R versions
- {os: 'windows-latest', tf: 'default', r: 'oldrel'}
- {os: 'macOS-latest' , tf: 'default', r: 'oldrel'}
- {os: 'ubuntu-latest' , tf: 'default', r: 'oldrel'}
- {os: 'ubuntu-latest' , tf: 'default', r: 'oldrel-1'}
- {os: 'ubuntu-latest' , tf: 'default', r: 'oldrel-2'}
- {os: 'ubuntu-20.04' , tf: 'default', r: '3.6'} # default R in ubuntu-20.04
## release keras/tf version (if different from 'default')
# - {os: 'ubuntu-latest' , tf: 'release', r: 'release'}
# - {os: 'windows-latest', tf: 'release', r: 'release'}
# - {os: 'macOS-latest' , tf: 'release', r: 'release'}
## old keras/tf versions
- {os: 'ubuntu-latest', tf: '2.14', r: 'release'}
- {os: 'ubuntu-latest', tf: '2.13', r: 'release'}
- {os: 'ubuntu-latest', tf: '2.12', r: 'release'}
- {os: 'ubuntu-latest', tf: '2.11', r: 'release'}
- {os: 'ubuntu-latest', tf: '2.9' , r: 'release'}
# these are allowed to fail
# - {os: 'ubuntu-latest', tf: '2.14.0rc1', r: 'release'}
# - {os: 'ubuntu-20.04', tf: 'default', r: 'devel'}
# - {os: 'ubuntu-20.04', tf: 'nightly' , r: 'release'}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.tf == 'nightly' || contains(matrix.tf, 'rc') || matrix.r == 'devel' }}
env:
R_KEEP_PKG_SOURCE: yes
# R_REMOTES_NO_ERRORS_FROM_WARNINGS: 'true'
# R_COMPILE_AND_INSTALL_PACKAGES: 'never' # commented out until CRAN builds TF 2.8
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
id: setup-r
with:
r-version: ${{ matrix.r }}
use-public-rspm: true
Ncpus: '2L'
- name: Get Date
id: get-date
shell: bash
run: |
echo "year-week=$(date -u "+%Y-%U")" >> $GITHUB_OUTPUT
echo "date=$(date -u "+%F")" >> $GITHUB_OUTPUT
# echo "::set-output name=year-week::$(date -u "+%Y-%U")"
# echo "::set-output name=date::$(date -u "+%F")"
- name: Restore R package cache
uses: actions/cache@v3
id: r-package-cache
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ matrix.os }}-${{ steps.setup-r.outputs.installed-r-version }}-${{ steps.get-date.outputs.year-week }}-1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck local::.
cache-version: 1
upgrade: 'TRUE'
- name: Install Tensorflow + Keras deps
run: keras::install_keras(tensorflow = '${{ matrix.tf }}-cpu')
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true