|
| 1 | +# Workflow derived from https://github.com/r-lib/actions/tree/master/examples |
| 2 | +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help |
| 3 | +# |
| 4 | +# NOTE: This workflow is overkill for most R packages and |
| 5 | +# check-standard.yaml is likely a better choice. |
| 6 | +# usethis::use_github_action("check-standard") will install it. |
| 7 | +on: |
| 8 | + push: |
| 9 | + branches: [main, master] |
| 10 | + pull_request: |
| 11 | + branches: [main, master] |
| 12 | + workflow_dispatch: |
| 13 | + |
| 14 | +name: old-tensorflow |
| 15 | + |
| 16 | +jobs: |
| 17 | + old-tensorflow: |
| 18 | + runs-on: ${{ matrix.config.os }} |
| 19 | + |
| 20 | + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) |
| 21 | + |
| 22 | + strategy: |
| 23 | + fail-fast: false |
| 24 | + matrix: |
| 25 | + config: |
| 26 | + - {os: windows-latest, r: 'release'} |
| 27 | + # Use older ubuntu to maximise backward compatibility |
| 28 | + - {os: ubuntu-18.04, r: 'devel', http-user-agent: 'release'} |
| 29 | + env: |
| 30 | + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} |
| 31 | + R_KEEP_PKG_SOURCE: yes |
| 32 | + CXX14: g++ |
| 33 | + CXX14STD: -std=c++1y |
| 34 | + CXX14FLAGS: -Wall -g -02 |
| 35 | + |
| 36 | + steps: |
| 37 | + - uses: actions/checkout@v2 |
| 38 | + |
| 39 | + - uses: r-lib/actions/setup-pandoc@v2 |
| 40 | + |
| 41 | + - uses: r-lib/actions/setup-r@v2 |
| 42 | + with: |
| 43 | + r-version: ${{ matrix.config.r }} |
| 44 | + http-user-agent: ${{ matrix.config.http-user-agent }} |
| 45 | + use-public-rspm: true |
| 46 | + |
| 47 | + - uses: r-lib/actions/setup-r-dependencies@v2 |
| 48 | + with: |
| 49 | + extra-packages: rcmdcheck |
| 50 | + |
| 51 | + - name: Install dev reticulate |
| 52 | + run: pak::pkg_install('rstudio/reticulate') |
| 53 | + shell: Rscript {0} |
| 54 | + |
| 55 | + - name: Install Miniconda |
| 56 | + # conda can fail at downgrading python, so we specify python version in advance |
| 57 | + env: |
| 58 | + RETICULATE_MINICONDA_PYTHON_VERSION: "3.7" |
| 59 | + run: reticulate::install_miniconda() # creates r-reticulate conda env by default |
| 60 | + shell: Rscript {0} |
| 61 | + |
| 62 | + - name: Install TensorFlow |
| 63 | + run: | |
| 64 | + tensorflow::install_tensorflow(version='1.15', conda_python_version = NULL) |
| 65 | + shell: Rscript {0} |
| 66 | + |
| 67 | + - uses: r-lib/actions/check-r-package@v2 |
| 68 | + |
| 69 | + - name: Show testthat output |
| 70 | + if: always() |
| 71 | + run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true |
| 72 | + shell: bash |
| 73 | + |
| 74 | + - name: Upload check results |
| 75 | + if: failure() |
| 76 | + uses: actions/upload-artifact@main |
| 77 | + with: |
| 78 | + name: ${{ runner.os }}-r${{ matrix.config.r }}-results |
| 79 | + path: check |
0 commit comments