generated from carpentries/workbench-template-rmd
-
-
Notifications
You must be signed in to change notification settings - Fork 9
54 lines (50 loc) · 1.62 KB
/
workshop-setup.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# A workflow for testing the workshop setup in different operating systems
name: Test Workshop Setup
# Controls when the action will run. Workflow runs when manually triggered using the UI
on:
workflow_dispatch:
jobs:
workshop_setup:
runs-on: ${{matrix.os}}
strategy:
matrix:
# list of Os's
R: ['4.3.3']
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Setup R
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{matrix.R}}
rtools-version: '4.3.x'
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 1
extra-packages: |
any::tidyverse
any::terra
any:sf
- run: Rscript -e 'print("hello")'
- name: Install GDAL, GEOS, and PROJ.4
if: matrix.os == 'macos-latest'
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew tap osgeo/osgeo4mac && brew tap --repair
brew install proj
brew install geos
brew install gdal
shell: bash
- name: Install GDAL, GEOS, and PROJ.4
if: matrix.os == 'ubuntu-latest'
run: |
sudo add-apt-repository ppa:ubuntugis -y
sudo apt-get update
sudo apt-get install libgdal-dev libgeos-dev libproj-dev -y
shell: bash
# Include Fedora and Arch?
- name: UDUNITS
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install libudunits2-dev -y
shell: bash