From 54b44f93ab3f033cf4af6508f5f6f76d21aed13d Mon Sep 17 00:00:00 2001 From: FBartos Date: Thu, 3 Mar 2022 10:36:20 +0100 Subject: [PATCH] update github actions --- .github/workflows/pkgdown.yaml | 17 ++++++++++++- .github/workflows/test-coverage.yaml | 38 ++++++++++++++++++---------- 2 files changed, 40 insertions(+), 15 deletions(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 1b8f3fb3..a90d2a44 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -27,9 +27,16 @@ jobs: - uses: actions/checkout@v2 - uses: r-lib/actions/setup-r@v1 + with: + r-version: ${{ matrix.config.r }} - uses: r-lib/actions/setup-pandoc@v1 + - name: Install harfbuzz freetype2 fribidi Headers + if: runner.os == 'Linux' + run: sudo apt-get install libharfbuzz-dev libfribidi-dev + + - name: Query dependencies run: | install.packages('remotes') @@ -44,6 +51,14 @@ jobs: key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- + - name: Install system dependencies + if: runner.os == 'Linux' + run: | + while read -r cmd + do + eval sudo $cmd + done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))') + - name: Install JAGS (windows-latest) if: runner.os == 'Windows' run: | @@ -61,7 +76,7 @@ jobs: - name: Install dependencies run: | remotes::install_deps(dependencies = TRUE) - install.packages("pkgdown", type = "binary") + install.packages("pkgdown") remotes::install_version("BayesTools", "0.1.3") shell: Rscript {0} diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 0d823d5b..a8ba3254 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -31,23 +31,11 @@ jobs: - uses: actions/checkout@v2 - uses: r-lib/actions/setup-r@v1 + with: + r-version: ${{ matrix.config.r }} - uses: r-lib/actions/setup-pandoc@v1 - - name: Install JAGS (windows-latest) - if: runner.os == 'Windows' - run: | - curl.exe -o wjags.exe --url https://deac-fra.dl.sourceforge.net/project/mcmc-jags/JAGS/4.x/Windows/JAGS-4.2.0-Rtools33.exe - wjags.exe /S - del wjags.exe - shell: cmd - - - name: Install JAGS (macOS-latest) - if: runner.os == 'macOS' - run : | - rm '/usr/local/bin/gfortran' - brew install automake jags - - name: Query dependencies run: | install.packages('remotes') @@ -62,6 +50,28 @@ jobs: key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- + - name: Install system dependencies + if: runner.os == 'Linux' + run: | + while read -r cmd + do + eval sudo $cmd + done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))') + + - name: Install JAGS (windows-latest) + if: runner.os == 'Windows' + run: | + curl.exe -o wjags.exe --url https://deac-fra.dl.sourceforge.net/project/mcmc-jags/JAGS/4.x/Windows/JAGS-4.2.0-Rtools33.exe + wjags.exe /S + del wjags.exe + shell: cmd + + - name: Install JAGS (macOS-latest) + if: runner.os == 'macOS' + run : | + rm '/usr/local/bin/gfortran' + brew install automake jags + - name: Install dependencies run: | install.packages(c("remotes"))