Merge branch 'master' of https://github.com/libKriging/rlibkriging #294
This file contains 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
name: devtools-install_github | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 2 * * SAT' | |
# To automatically cancel previous jobs in same branch or PR | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
install_github: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macOS-latest ] | |
R: [ '4.3' ] | |
runs-on: ${{ matrix.os }} | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
steps: | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.R }} | |
rtools-version: '43' | |
- name: Install tools for Linux | |
run: sudo apt install -y cmake gfortran libcurl4-openssl-dev | |
shell: bash | |
if: matrix.os == 'ubuntu-latest' | |
- name: Install tools for macOS | |
run: brew install cmake gfortran | |
shell: bash | |
if: matrix.os == 'macOS-latest' | |
# Should be temporary since it was ok without additional system packages one month ago | |
- name: Install additional packages to compile devtools | |
shell: bash | |
run: sudo apt install -y libharfbuzz-dev libfribidi-dev | |
if: matrix.os == 'ubuntu-latest' | |
- name: Setup cmake | |
uses: jwlawson/actions-setup-cmake@v1.13 | |
with: | |
cmake-version: '3.24.x' | |
- name: Install devtools | |
shell: bash | |
run: | | |
# Add --insecure to workaround missing certificates on Windows | |
# --header is not required by an useful example if the repo becomes private | |
curl --insecure --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -LO https://raw.githubusercontent.com/libKriging/rlibkriging/${{ env.BRANCH_NAME }}/tools/install_packages.R | |
Rscript --no-save ./install_packages.R devtools | |
- name: BioConductor install Rhdf5lib (Bioconductor deps not suported by devtools::install_github) | |
shell: bash | |
run: | | |
export PATH=$PATH:/opt/R-devel/bin/:/opt/R-patched/bin/:/opt/R/bin | |
Rscript -e "install.packages('BiocManager',repos='https://cloud.r-project.org'); BiocManager::install('Rhdf5lib'); remove.packages('BiocManager')" | |
- name: install_github from ${{ env.BRANCH_NAME }} | |
shell: bash | |
run: Rscript -e "library(devtools); install_github('libKriging/rlibkriging', ref='${{ env.BRANCH_NAME }}'); if (!library('rlibkriging', character.only=TRUE, logical.return=TRUE)) quit(status=1, save='no')" |