-
Notifications
You must be signed in to change notification settings - Fork 5
84 lines (71 loc) · 2.39 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
75
76
77
78
79
80
81
82
83
84
name: Conda package
# Declare default permissions as read only.
permissions: read-all
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
PACKAGE_NAME: dpcpp-llvm-spirv
MODULE_NAME: dpcpp_llvm_spirv
jobs:
build:
strategy:
matrix:
python: ["3.9", "3.10", "3.11"]
os: ["ubuntu-latest", "windows-latest"]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -l {0}' }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup conda-build
uses: conda-incubator/setup-miniconda@v3
with:
auto-activate-base: true
activate-environment: ""
- name: Install conda-build
run: conda install conda-build
- name: Build conda package
env:
CHANNELS: -c intel -c conda-forge --override-channels
run: conda build --python ${{ matrix.python }} ${{ env.CHANNELS }} conda-recipe
- name: Store conda paths as envs
shell: bash -l {0}
run: |
echo "CONDA_BLD=$CONDA_PREFIX/conda-bld/${{ runner.os == 'Linux' && 'linux' || 'win' }}-64/" | tr "\\" '/' >> $GITHUB_ENV
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.tar.bz2
upload:
needs: build
# if: ${{github.ref == 'refs/heads/main' || (startsWith(github.ref, 'refs/heads/release') == true)}}
strategy:
matrix:
python: ["3.9", "3.10", "3.11"]
os: ["ubuntu-latest", "windows-latest"]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -l {0}' }}
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
- uses: conda-incubator/setup-miniconda@v3
with:
auto-activate-base: true
activate-environment: ""
- name: Install anaconda-client
run: conda install anaconda-client
# - name: Upload
# run: anaconda --token ${{ secrets.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2