Skip to content

Setup test workflow for various OSs #2

Setup test workflow for various OSs

Setup test workflow for various OSs #2

# 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
- uses: r-lib/actions/setup-r-dependencies@v2
with:
r-version: ${{matrix.R}}
rtools-version: '4.3.x'
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