Skip to content

Commit

Permalink
Update r_macos.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
davidycliao committed Sep 21, 2024
1 parent 7451471 commit cd8c151
Showing 1 changed file with 82 additions and 28 deletions.
110 changes: 82 additions & 28 deletions .github/workflows/r_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,74 +5,128 @@
#
# See https://github.com/r-lib/actions/tree/master/examples#readme for
# additional example workflows available for the R community.
#
# name: R-MacOS
#
# on:
# push:
# branches: [ "main" ]
# pull_request:
# branches: [ "main" ]
#
# permissions:
# contents: read
#
# jobs:
# build:
# runs-on: macos-latest
#
# strategy:
# matrix:
# r-version: ['4.3.2', '4.2.0', '4.2.1']
#
# steps:
# - uses: actions/checkout@v3
#
# - name: Update Homebrew
# run: |
# brew update
#
# - name: Install pandoc
# run: |
# for i in {1..3}; do
# brew install pandoc && break || sleep 15
# done
#
# - name: Set up R ${{ matrix.r-version }}
# uses: r-lib/actions/setup-r@v2
# with:
# r-version: ${{ matrix.r-version }}
#
# - name: Install R dependencies
# run: |
# Rscript -e "install.packages(c('remotes', 'rcmdcheck', 'reticulate', 'renv', 'knitr', 'rmarkdown', 'lsa', 'purrr', 'testthat', 'htmltools'), repos='https://cran.r-project.org')"
# Rscript -e "remotes::install_version('htmltools', version = '0.5.8')"
# Rscript -e "renv::restore()"
#
#
# - name: Set up Python
# uses: actions/setup-python@v2
# with:
# python-version: '3.10.x'
#
# - name: Install Python virtualenv
# run: pip install virtualenv
#
# - name: Create Python virtual environment
# run: virtualenv flair_env
#
# - name: Install Python dependencies in virtual environment
# run: |
# source flair_env/bin/activate
# pip install --upgrade pip
# pip install scipy==1.12.0
# pip install flair
#
# - name: Remove Python cache files
# run: find . -name '*.pyc' -delete
#
# - name: Check (with virtual environment)
# run: |
# source flair_env/bin/activate
# R CMD build --no-build-vignettes .
#
# shell: bash

name: R-MacOS

name: R-MacOS
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:
runs-on: macos-latest

strategy:
matrix:
r-version: ['4.3.2', '4.2.0', '4.2.1']

r-version: ['4.3.2', '4.4.0']
steps:
- uses: actions/checkout@v3

- name: Update Homebrew
run: |
brew update
run: brew update
- name: Install pandoc
run: |
for i in {1..3}; do
brew install pandoc && break || sleep 15
done
- name: Set up R ${{ matrix.r-version }}
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r-version }}

- name: Install R dependencies
run: |
Rscript -e "install.packages(c('remotes', 'rcmdcheck', 'reticulate', 'renv', 'knitr', 'rmarkdown', 'lsa', 'purrr', 'testthat', 'htmltools'), repos='https://cran.r-project.org')"
Rscript -e "install.packages(c('remotes', 'rcmdcheck', 'reticulate', 'renv', 'knitr', 'rmarkdown', 'lsa', 'purrr', 'testthat'), repos='https://cran.r-project.org')"
Rscript -e "if (getRversion() >= '4.4.0') remotes::install_version('Matrix', version = '1.6-5') else remotes::install_version('Matrix', version = '1.5-3')"
Rscript -e "remotes::install_version('htmltools', version = '0.5.8')"
Rscript -e "renv::restore()"
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10.x'

- name: Install Python virtualenv
run: pip install virtualenv

- name: Create Python virtual environment
run: virtualenv flair_env

- name: Install Python dependencies in virtual environment
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install virtualenv
python -m virtualenv flair_env
source flair_env/bin/activate
pip install --upgrade pip
pip install scipy==1.12.0
pip install flair
pip install scipy==1.12.0 flair
- name: Remove Python cache files
run: find . -name '*.pyc' -delete

- name: Check (with virtual environment)
run: |
source flair_env/bin/activate
R CMD build --no-build-vignettes .
shell: bash

0 comments on commit cd8c151

Please sign in to comment.