-
Notifications
You must be signed in to change notification settings - Fork 11
64 lines (55 loc) · 2.14 KB
/
test-install-instructions.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
55
56
57
58
59
60
61
62
63
64
name: Test Install instructions Section
on:
pull_request:
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: macos-latest
INSTALLER: "Miniforge3-MacOSX-x86_64.sh"
- os: ubuntu-latest
INSTALLER: "Miniforge3-Linux-x86_64.sh"
- os: windows-latest
INSTALLER: "Miniforge3-Windows-x86_64.exe"
fail-fast: false
defaults:
run:
shell: bash -l {0}
steps:
- name: Download Miniforge3 and the Env File
run: >
curl -L -O https://github.com/conda-forge/miniforge/releases/latest/download/${{ matrix.INSTALLER }}
&& curl -L -O https://raw.githubusercontent.com/ioos/ioos_code_lab/main/.binder/environment.yml
- name: Install Miniforge3 on *nix
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macOS')
run: |
sh ${{ matrix.INSTALLER }} -b
- name: Install Miniforge3 on Windows
shell: cmd
if: startsWith(matrix.os, 'windows')
run: |
start /wait "" ${{ matrix.INSTALLER }} /InstallationType=JustMe /AddToPath=0 /RegisterPython=0 /S /D=C:\miniforge3
- name: Create on *nix
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macOS')
run: |
~/miniforge3/bin/conda env create --quiet --file environment.yml
- name: Create on Windows
shell: cmd
if: startsWith(matrix.os, 'windows')
run: |
C:\miniforge3\Scripts\conda.exe update --yes --all
C:\miniforge3\Scripts\conda.exe env create --quiet --file environment.yml
- name: Test environment on *nix
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macOS')
run: >
source ~/miniforge3/bin/activate IOOS
&& python -c 'import osgeo.gdal; print(dir(osgeo.gdal))'
- name: Test environment on Windows
shell: cmd
if: startsWith(matrix.os, 'windows')
run: |
C:\miniforge3\Scripts\activate.bat IOOS
python -c "import osgeo.gdal; print(dir(osgeo.gdal))"