-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (59 loc) · 2.27 KB
/
conda-package.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
name: Conda package
on:
push:
branches:
- master
pull_request:
permissions: read-all
env:
PACKAGE_NAME: intel-gpu-ocl-icd-system
jobs:
build_and_test_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set pkgs_dirs
run: |
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc
- name: Add conda to system path
run: echo $CONDA/bin >> $GITHUB_PATH
- name: Install conda-build
run: conda install conda-build -c conda-forge --override-channels
- name: Build conda package
run: |
# use bootstrap channel to pull NumPy linked with OpenBLAS
CHANNELS="-c conda-forge --override-channels"
conda build \
$CHANNELS \
recipe
- name: Upload artifact
uses: actions/[email protected]
with:
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }}
path: /usr/share/miniconda/conda-bld/noarch/${{ env.PACKAGE_NAME }}-*.tar.bz2
upload_linux:
needs: build_and_test_linux
if: ${{github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/')}}
runs-on: ubuntu-latest
steps:
- name: Download conda artifact
uses: actions/download-artifact@v4
with:
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }}
- name: Install anaconda-client
run: conda install anaconda-client -c conda-forge --override-channels
- name: Add conda to system path
run: echo $CONDA/bin >> $GITHUB_PATH
- name: Package version
run: echo "PACKAGE_VERSION=$(basename ${{ env.PACKAGE_NAME }}-*.tar.bz2 | sed 's/^${{ env.PACKAGE_NAME }}-\([^-]*\).*/\1/')" >> $GITHUB_ENV
- name: Upload
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
anaconda --token $ANACONDA_TOKEN upload --user dppy --label dev ${PACKAGE_NAME}-*.tar.bz2
- name: Upload Wheels
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.whl --version ${{ env.PACKAGE_VERSION }}