-
Notifications
You must be signed in to change notification settings - Fork 1
141 lines (121 loc) · 4.51 KB
/
make_packages.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: Make and upload Conda packages
on:
push:
branches:
- master
create:
tags:
- '*'
schedule:
# - cron: '0-59/5 * * * *' # Every 5 minutes
- cron: '0 00 * * 0' # Weekly, 12AM Sundays UTC
env:
ANACONDA_USER: labscript-suite
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- { os: ubuntu-latest, python: '3.11', arch: x64}
# - { os: ubuntu-latest, python: '3.10', arch: x64 }
# - { os: ubuntu-latest, python: '3.9', arch: x64 }
# - { os: ubuntu-latest, python: '3.8', arch: x64 }
# - { os: ubuntu-latest, python: '3.7', arch: x64 }
# - { os: macos-11, python: '3.11', arch: x64 }
# - { os: macos-11, python: '3.10', arch: x64 }
# - { os: macos-11, python: '3.9', arch: x64 }
# - { os: macos-11, python: '3.8', arch: x64 }
# - { os: macos-11, python: '3.7', arch: x64 }
- { os: windows-latest, python: '3.11', arch: x64 }
- { os: windows-latest, python: '3.10', arch: x64 }
- { os: windows-latest, python: '3.9', arch: x64 }
- { os: windows-latest, python: '3.8', arch: x64 }
- { os: windows-latest, python: '3.7', arch: x64 }
# - { os: windows-latest, python: '3.11', arch: x86 } # conda not yet available
- { os: windows-latest, python: '3.10', arch: x86 }
- { os: windows-latest, python: '3.9', arch: x86 }
- { os: windows-latest, python: '3.8', arch: x86 }
- { os: windows-latest, python: '3.7', arch: x86 }
if: github.repository == 'labscript-suite/vendored-conda-builds' && (github.event_name != 'create' || github.event.ref_type != 'branch' || github.event_name == 'schedule')
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Checkout latest tag
if: github.event_name == 'schedule'
shell: bash -l {0}
run: git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
- name: Set BUILD_NOARCH=true
if: strategy.job-index == 0
shell: bash -l {0}
run: echo "BUILD_NOARCH=true" >> $GITHUB_ENV
- name: Install Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python }}
architecture: ${{ matrix.arch }}
miniconda-version: "latest"
- name: Workaround conda-build incompatibility with xcode 12+
if: runner.os == 'macOS'
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 11.7
- name: Conda package (Unix)
if: runner.os != 'Windows'
shell: bash -l {0}
run: |
conda install -c labscript-suite setuptools-conda
python make_packages.py ${{ runner.temp }}
- name: Conda Package (Windows)
if: runner.os == 'Windows'
shell: cmd /C CALL {0}
run: |
conda install -c labscript-suite setuptools-conda && ^
python make_packages.py ${{ runner.temp }}
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: conda_packages
path: ./conda_packages
upload:
name: Upload
runs-on: ubuntu-latest
needs: build
steps:
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: conda_packages
path: ./conda_packages
- name: Install Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
- name: Install cloud client
shell: bash -l {0}
run: conda install anaconda-client
# - name: Publish to Anaconda test label
# if: github.event.ref_type != 'tag' && github.event_name != 'schedule'
# shell: bash -l {0}
# run: |
# anaconda \
# --token ${{ secrets.ANACONDA_API_TOKEN }} \
# upload \
# --user $ANACONDA_USER \
# --label test \
# --skip-existing \
# conda_packages/*/*
- name: Publish to Anaconda main label
if: github.event.ref_type == 'tag' || github.event_name == 'schedule'
shell: bash -l {0}
run: |
anaconda \
--token ${{ secrets.ANACONDA_API_TOKEN }} \
upload \
--user $ANACONDA_USER \
--skip-existing \
conda_packages/*/*