Merge branch 'master' of https://github.com/RockefellerUniversity/Int… #115
This file contains hidden or 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
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| schedule: | |
| - cron: "1 7 11 * *" | |
| name: OS-check | |
| jobs: | |
| OS-check: | |
| runs-on: ${{ matrix.config.os }} | |
| name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - { os: macOS-latest, r: 'devel'} | |
| - { os: macOS-latest, r: 'release'} | |
| - { os: windows-latest, r: 'release'} | |
| - { os: ubuntu-latest, r: 'devel'} | |
| - { os: ubuntu-latest, r: 'release'} | |
| env: | |
| R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
| RSPM: ${{ matrix.config.rspm }} | |
| GITHUB_TOKEN: ${{ secrets.GHTOKEN2 }} | |
| GITHUB_PAT: ${{ secrets.GHTOKEN2 }} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| ## R is already included in the Bioconductor docker images | |
| - name: Setup R from r-lib | |
| uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: ${{ matrix.config.r }} | |
| ## pandoc is already included in the Bioconductor docker images | |
| - name: Setup pandoc from r-lib | |
| uses: r-lib/actions/setup-pandoc@v2 | |
| - name: Query dependencies | |
| run: | | |
| install.packages('remotes') | |
| saveRDS(remotes::dev_package_deps("Intro_To_Python/",dependencies = TRUE), ".github/depends.Rds", version = 2) | |
| writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") | |
| remotes::install_cran("BiocManager") | |
| remotes::install_cran("devtools") | |
| shell: Rscript {0} | |
| - name: Cache R packages | |
| if: runner.os != 'Windows' | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.R_LIBS_USER }} | |
| key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} | |
| restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- | |
| - name: Cache R packages | |
| if: "!contains(github.event.head_commit.message, '/nocache') && runner.os != 'Linux'" | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.R_LIBS_USER }} | |
| key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_13-r-4.1-${{ hashFiles('.github/depends.Rds') }} | |
| restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_13-r-4.1- | |
| - name: Cache R packages on Linux | |
| if: "!contains(github.event.head_commit.message, '/nocache') && runner.os == 'Linux' " | |
| uses: actions/cache@v4 | |
| with: | |
| path: /home/runner/work/_temp/Library | |
| key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_13-r-4.1-${{ hashFiles('.github/depends.Rds') }} | |
| restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_13-r-4.1- | |
| - name: Install Linux system dependencies | |
| if: runner.os == 'Linux' | |
| run: | | |
| sysreqs=$(Rscript -e 'cat("apt-get update -y && apt-get install -y", paste(gsub("apt-get install -y ", "", remotes::system_requirements("ubuntu-22.04", package=unlist(strsplit(read.dcf("ATACCutRunChIP/DESCRIPTION")[,"Depends"],", |\n")))), collapse = " "))') | |
| echo $sysreqs | |
| sudo -s eval "$sysreqs" | |
| sudo apt -y install libfontconfig1-dev | |
| sudo apt-get install libharfbuzz-dev libfribidi-dev | |
| sudo apt-get install libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev | |
| - name: Install macOS system dependencies | |
| if: matrix.config.os == 'macOS-latest' | |
| run: | | |
| ## Enable installing XML from source if needed | |
| brew install libxml2 | |
| echo "XML_CONFIG=/usr/local/opt/libxml2/bin/xml2-config" >> $GITHUB_ENV | |
| ## Required to install magick as noted at | |
| ## https://github.com/r-lib/usethis/commit/f1f1e0d10c1ebc75fd4c18fa7e2de4551fd9978f#diff-9bfee71065492f63457918efcd912cf2 | |
| brew install imagemagick@6 | |
| ## For textshaping, required by ragg, and required by pkgdown | |
| brew install harfbuzz fribidi | |
| ## For installing usethis's dependency gert | |
| brew install libgit2 | |
| - name: Install Windows system dependencies | |
| if: runner.os == 'Windows' | |
| run: | | |
| ## Edit below if you have any Windows system dependencies | |
| shell: Rscript {0} | |
| - name: Install dependencies 1 | |
| run: | | |
| remotes::install_deps("Intro_To_Python/",dependencies = TRUE) | |
| remotes::install_cran("rcmdcheck") | |
| remotes::install_cran("BiocManager", force = TRUE) | |
| shell: Rscript {0} | |
| - name: Install dependencies 2 | |
| if: matrix.config.r == 'devel' | |
| run: | | |
| BiocManager::install(version = "devel", ask=F) | |
| BiocManager::install("rmarkdown", version = "devel") | |
| BiocManager::install("devtools", version = "devel") | |
| BiocManager::install("RockefellerUniversity/compileCourses",subdir="compileCourses", version = "devel") | |
| shell: Rscript {0} | |
| - name: Install dependencies 3 | |
| if: matrix.config.r != 'devel' | |
| run: | | |
| BiocManager::install("rmarkdown") | |
| BiocManager::install("devtools") | |
| BiocManager::install("RockefellerUniversity/compileCourses",subdir="compileCourses") | |
| shell: Rscript {0} | |
| - name: Cache R packages | |
| if: "!contains(github.event.head_commit.message, '/nocache') && runner.os != 'Linux'" | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.R_LIBS_USER }} | |
| key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_13-r-4.1-${{ hashFiles('.github/depends.Rds') }} | |
| restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_13-r-4.1- | |
| - name: Install System Dependencies | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update -y | |
| sudo apt-get install -y glpk-utils | |
| sudo apt-get install -y libcurl4-openssl-dev | |
| shell: bash {0} | |
| - name: Session info | |
| run: | | |
| options(width = 100) | |
| pkgs <- installed.packages()[, "Package"] | |
| sessioninfo::session_info(pkgs, include_base = TRUE) | |
| shell: Rscript {0} | |
| - name: Install package | |
| if: github.ref == 'refs/heads/master' | |
| run: | | |
| devtools::install("Intro_To_Python/",dependencies = TRUE,quick = TRUE) | |
| shell: Rscript {0} | |
| - name: CompileCourse | |
| run: | | |
| require(compileCourses) | |
| compileCourses::compileSingleCourseMaterial(repo="RockefellerUniversity",subdir="Intro_To_Python",branch="master") | |
| shell: Rscript {0} |