-
Notifications
You must be signed in to change notification settings - Fork 9
89 lines (70 loc) · 2.15 KB
/
ci.yaml
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
name: Conda package
on:
push:
branches:
- master
pull_request:
env:
PACKAGE_NAME: itt-python
jobs:
build_and_test_linux:
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
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
- name: Build conda package
run: |
CHANNELS="-c conda-forge --override-channels"
VERSIONS="--python ${{ matrix.python }}"
conda build \
$VERSIONS \
$CHANNELS \
conda-recipe
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
path: /usr/share/miniconda/conda-bld/linux-64/${{ env.PACKAGE_NAME }}-*.tar.bz2
build_and_test_windows:
runs-on: windows-2019
strategy:
matrix:
python: ['3.9', '3.10', '3.11', '3.12']
env:
conda-bld: C:\Miniconda\conda-bld\win-64\
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Miniforge3
miniforge-version: latest
activate-environment: build
channels: conda-forge
python-version: ${{ matrix.python }}
- name: Install conda build
run: |
conda activate
conda install -y conda-build
conda list -n base
- name: Build conda package
run: |
conda activate
conda build --python ${{ matrix.python }} -c conda-forge --override-channels conda-recipe
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
path: ${{ env.conda-bld }}${{ env.PACKAGE_NAME }}-*.tar.bz2