-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
89 lines (73 loc) · 2.37 KB
/
conda.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Conda
on:
push:
paths-ignore:
- 'doc/**'
- 'docker/**'
branches-ignore:
- 'backport**'
- 'dependabot**'
# Disabled because run is quite slow, especially for Mac
#pull_request:
# paths-ignore:
# - 'doc/**'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build:
name: Conda ${{ matrix.platform }}
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: true
matrix:
# macos-13: Intel
# macos-14: arm64
platform: ['ubuntu-latest','windows-latest','macos-13','macos-14']
env:
GHA_CI_PLATFORM: ${{ matrix.platform }}
CACHE_NUMBER: 0
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Support longpaths
run: git config --system core.longpaths true
if: matrix.platform == 'windows-latest'
- name: Cache Conda Environment
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-${{ steps.get-date.outputs.today }}-conda-${{ env.CACHE_NUMBER }}
- uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4
with:
miniforge-version: latest
use-mamba: true
channels: conda-forge
auto-update-conda: true
- name: Remove conflicting libraries
shell: bash -l {0}
if: matrix.platform == 'windows-latest'
run: |
rm -rf C:/Strawberry || /bin/true
- name: Setup
shell: bash -l {0}
run: |
source ./ci/travis/conda/setup.sh
- name: Build
shell: bash -l {0}
run: |
source ../ci/travis/conda/compile.sh
working-directory: ./gdal-feedstock
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: ${{ matrix.platform }}-conda-package
path: ./gdal-feedstock/packages/
- name: Deploy to gdal-master Conda channel
if: github.ref == 'refs/heads/master'
shell: bash -l {0}
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
source ../ci/travis/conda/upload.sh || true
working-directory: ./gdal-feedstock