-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
24 additions
and
23 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
## tic GitHub Actions template: linux-macos-windows-deploy | ||
## revision date: 2020-08-06 | ||
## revision date: 2020-12-11 | ||
on: | ||
workflow_dispatch: | ||
push: | ||
|
@@ -23,9 +23,9 @@ jobs: | |
config: | ||
# use a different tic template type if you do not want to build on all listed platforms | ||
- { os: windows-latest, r: "release" } | ||
# - { os: macOS-latest, r: "release", pkgdown: "true", latex: "true" } | ||
- { os: ubuntu-latest, r: "devel", pkgdown: "true", latex: "true" } | ||
#- { os: ubuntu-latest, r: "release" } | ||
- { os: macOS-latest, r: "release", pkgdown: "true", latex: "true" } | ||
- { os: ubuntu-latest, r: "devel" } | ||
- { os: ubuntu-latest, r: "release" } | ||
|
||
env: | ||
# otherwise remotes::fun() errors cause the build to fail. Example: Unavailability of binaries | ||
|
@@ -42,10 +42,9 @@ jobs: | |
SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk | ||
# use GITHUB_TOKEN from GitHub to workaround rate limits in {remotes} | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
_R_BUILD_COMPACT_VIGNETTES_: gs+qpdf | ||
|
||
steps: | ||
- uses: actions/[email protected].1 | ||
- uses: actions/[email protected].4 | ||
|
||
- uses: r-lib/actions/setup-r@master | ||
with: | ||
|
@@ -71,7 +70,7 @@ jobs: | |
|
||
- name: "[Cache] Cache R packages" | ||
if: runner.os != 'Windows' | ||
uses: pat-s/[email protected].0 | ||
uses: pat-s/[email protected].3 | ||
with: | ||
path: ${{ env.R_LIBS_USER }} | ||
key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{steps.date.outputs.date}} | ||
|
@@ -83,20 +82,6 @@ jobs: | |
Rscript -e "if (!requireNamespace('remotes')) install.packages('remotes', type = 'source')" | ||
Rscript -e "if (getRversion() < '3.2' && !requireNamespace('curl')) install.packages('curl', type = 'source')" | ||
- name: "[Stage] [Linux] Install curl" | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt-get install libcurl4-openssl-dev libgit2-dev libharfbuzz-dev libfribidi-dev | ||
tlmgr install ae | ||
tlmgr install multirow | ||
tlmgr install natbib | ||
tlmgr install caption | ||
tlmgr install setspace | ||
- name: "[Custom] [Stage] [Linux] Install pkgdown system lib req" | ||
if: runner.os == 'Linux' && matrix.config.r == 'release' | ||
run: sudo apt-get install libharfbuzz-dev libfribidi-dev libgit2-dev | ||
|
||
- name: "[Custom block] [Linux] Install spatial libraries" | ||
if: runner.os == 'Linux' | ||
run: sudo apt-get install libgdal-dev libproj-dev libgeos-dev libudunits2-dev | ||
|
@@ -108,6 +93,22 @@ jobs: | |
rm '/usr/local/bin/gfortran' | ||
brew install pkg-config gdal proj geos | ||
- name: "[Stage] [Linux] Install curl and libgit2" | ||
if: runner.os == 'Linux' | ||
run: sudo apt install libcurl4-openssl-dev libgit2-dev | ||
|
||
- name: "[Stage] [macOS] Install libgit2" | ||
if: runner.os == 'macOS' | ||
run: brew install libgit2 | ||
|
||
- name: "[Stage] [macOS] Install system libs for pkgdown" | ||
if: runner.os == 'macOS' && matrix.config.pkgdown != '' | ||
run: brew install harfbuzz fribidi | ||
|
||
- name: "[Stage] [Linux] Install system libs for pkgdown" | ||
if: runner.os == 'Linux' && matrix.config.pkgdown != '' | ||
run: sudo apt install libharfbuzz-dev libfribidi-dev | ||
|
||
- name: "[Stage] Install" | ||
if: matrix.config.os != 'macOS-latest' || matrix.config.r != 'devel' | ||
run: Rscript -e "remotes::install_github('ropensci/tic')" -e "print(tic::dsl_load())" -e "tic::prepare_all_stages()" -e "tic::before_install()" -e "tic::install()" | ||
|
@@ -123,12 +124,12 @@ jobs: | |
run: Rscript -e 'tic::script()' | ||
|
||
- name: "[Stage] After Success" | ||
if: matrix.config.os == 'ubuntu-latest' && matrix.config.r == 'devel' | ||
if: matrix.config.os == 'macOS-latest' && matrix.config.r == 'release' | ||
run: Rscript -e "tic::after_success()" | ||
|
||
- name: "[Stage] Upload R CMD check artifacts" | ||
if: failure() | ||
uses: actions/upload-artifact@v2.1.1 | ||
uses: actions/upload-artifact@v2.2.1 | ||
with: | ||
name: ${{ runner.os }}-r${{ matrix.config.r }}-results | ||
path: check | ||
|