-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (68 loc) · 1.88 KB
/
conda-build.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
name: Build conda package
on:
push:
branches:
- main
- v2
paths-ignore:
- README.md
- LICENSE
- benchmarks/**
jobs:
conda-build:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository (v1)
uses: actions/checkout@v4
with:
ref: main
path: v1/
- name: Checkout repository (v2)
uses: actions/checkout@v4
with:
ref: v2
path: v2/
- name: Setup conda-forge channel
run: conda config --add channels conda-forge
- name: Install conda-build and conda-verify
run: $CONDA/bin/conda install --yes conda-build conda-verify --name base
- name: Create output directory
run: mkdir build
- name: Set CCACHE_DIR
run: echo "CCACHE_DIR=$HOME/.ccache" >>"$GITHUB_ENV"
- name: Cache CCACHE_DIR
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ github.run_id }}
restore-keys: |
ccache-
- name: Build conda packages
run: $CONDA/bin/conda build --no-anaconda-upload --output-folder build v1/recipe v2/recipe
- name: Upload conda packages
uses: actions/upload-artifact@v4
with:
name: conda-packages
path: build/
deploy-github-pages:
needs: conda-build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Download conda packages
uses: actions/download-artifact@v4
with:
name: conda-packages
path: repo/
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4