Skip to content

Commit 6572fc2

Browse files
committed
移除旧的recipe_new.yaml文件,更新recipe.yaml以包含新的构建步骤和依赖项,同时添加GitHub Actions工作流以支持Conda构建和上传到Anaconda.org。
1 parent 8ed67f2 commit 6572fc2

File tree

3 files changed

+147
-75
lines changed

3 files changed

+147
-75
lines changed

.conda/recipe.yaml

Lines changed: 53 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -6,62 +6,63 @@ build:
66
noarch: python
77
number: 0
88
script:
9-
- python -m pip install paho-mqtt opentrons_shared_data
10-
- python -m pip install git+https://github.com/Xuwznln/pylabrobot.git
9+
- python -m pip install paho-mqtt opentrons_shared_data
10+
- python -m pip install git+https://github.com/Xuwznln/pylabrobot.git
11+
- python -m pip install . --no-deps
1112

1213
requirements:
1314
host:
14-
- python >=3.11
15-
- pip
16-
- setuptools
15+
- python >=3.11
16+
- pip
17+
- setuptools
1718
run:
18-
- conda-forge::python =3.11.11
19-
- compilers
20-
- cmake
21-
- make
22-
- ninja
23-
- sphinx
24-
- sphinx_rtd_theme
25-
- numpy
26-
- scipy
27-
- pandas
28-
- networkx
29-
- matplotlib
30-
- pint
31-
- pyserial
32-
- pyusb
33-
- pylibftdi
34-
- pymodbus
35-
- python-can
36-
- pyvisa
37-
- opencv
38-
- pydantic
39-
- fastapi
40-
- uvicorn
41-
- gradio
42-
- flask
43-
- websocket
44-
- ipython
45-
- jupyter
46-
- jupyros
47-
- colcon-common-extensions
48-
- robostack-staging::ros-humble-desktop-full
49-
- robostack-staging::ros-humble-control-msgs
50-
- robostack-staging::ros-humble-sensor-msgs
51-
- robostack-staging::ros-humble-trajectory-msgs
52-
- ros-humble-navigation2
53-
- ros-humble-ros2-control
54-
- ros-humble-robot-state-publisher
55-
- ros-humble-joint-state-publisher
56-
- ros-humble-rosbridge-server
57-
- ros-humble-cv-bridge
58-
- ros-humble-tf2
59-
- ros-humble-moveit
60-
- ros-humble-moveit-servo
61-
- ros-humble-simulation
62-
- ros-humble-tf-transformations
63-
- transforms3d
64-
- uni-lab::ros-humble-unilabos-msgs
19+
- conda-forge::python =3.11.11
20+
- compilers
21+
- cmake
22+
- make
23+
- ninja
24+
- sphinx
25+
- sphinx_rtd_theme
26+
- numpy
27+
- scipy
28+
- pandas
29+
- networkx
30+
- matplotlib
31+
- pint
32+
- pyserial
33+
- pyusb
34+
- pylibftdi
35+
- pymodbus
36+
- python-can
37+
- pyvisa
38+
- opencv
39+
- pydantic
40+
- fastapi
41+
- uvicorn
42+
- gradio
43+
- flask
44+
- websocket
45+
- ipython
46+
- jupyter
47+
- jupyros
48+
- colcon-common-extensions
49+
- robostack-staging::ros-humble-desktop-full
50+
- robostack-staging::ros-humble-control-msgs
51+
- robostack-staging::ros-humble-sensor-msgs
52+
- robostack-staging::ros-humble-trajectory-msgs
53+
- ros-humble-navigation2
54+
- ros-humble-ros2-control
55+
- ros-humble-robot-state-publisher
56+
- ros-humble-joint-state-publisher
57+
- ros-humble-rosbridge-server
58+
- ros-humble-cv-bridge
59+
- ros-humble-tf2
60+
- ros-humble-moveit
61+
- ros-humble-moveit-servo
62+
- ros-humble-simulation
63+
- ros-humble-tf-transformations
64+
- transforms3d
65+
- uni-lab::ros-humble-unilabos-msgs
6566

6667
about:
6768
repository: https://github.com/dptech-corp/Uni-Lab-OS

.conda/recipe_new.yaml

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: UniLabOS Conda Build
2+
3+
on:
4+
push:
5+
branches: [main, dev]
6+
tags: ['v*']
7+
pull_request:
8+
branches: [main, dev]
9+
workflow_dispatch:
10+
inputs:
11+
upload_to_anaconda:
12+
description: '是否上传到Anaconda.org'
13+
required: false
14+
default: false
15+
type: boolean
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
21+
defaults:
22+
run:
23+
shell: bash -l {0}
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Setup Miniconda
31+
uses: conda-incubator/setup-miniconda@v3
32+
with:
33+
miniconda-version: 'latest'
34+
channels: conda-forge,robostack-staging,uni-lab,defaults
35+
channel-priority: strict
36+
activate-environment: build-env
37+
auto-activate-base: false
38+
auto-update-conda: false
39+
show-channel-urls: true
40+
41+
- name: Install rattler-build and anaconda-client
42+
run: |
43+
conda install -c conda-forge rattler-build anaconda-client
44+
45+
- name: Show environment info
46+
run: |
47+
conda info
48+
conda list | grep -E "(rattler-build|anaconda-client)"
49+
echo "Building UniLabOS package"
50+
51+
- name: Build conda package
52+
run: |
53+
rattler-build build -r .conda/recipe.yaml -c uni-lab -c robostack-staging -c conda-forge
54+
55+
- name: List built packages
56+
run: |
57+
echo "Built packages in output directory:"
58+
find ./output -name "*.conda" | head -10
59+
ls -la ./output/noarch/ || echo "noarch directory not found"
60+
echo "Output directory structure:"
61+
find ./output -type f -name "*.conda"
62+
63+
- name: Prepare artifacts for upload
64+
run: |
65+
mkdir -p conda-packages-temp
66+
find ./output -name "*.conda" -exec cp {} conda-packages-temp/ \;
67+
echo "Copied files to temp directory:"
68+
ls -la conda-packages-temp/
69+
70+
- name: Upload conda package artifacts
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: conda-package-unilabos
74+
path: conda-packages-temp
75+
if-no-files-found: warn
76+
retention-days: 30
77+
78+
- name: Login to Anaconda with API token
79+
if: github.event.inputs.upload_to_anaconda == 'true' || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request')
80+
run: |
81+
anaconda login --token ${{ secrets.ANACONDA_API_TOKEN }}
82+
83+
- name: Upload to Anaconda.org (uni-lab organization)
84+
if: github.event.inputs.upload_to_anaconda == 'true' || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request')
85+
run: |
86+
for package in $(find ./output -name "*.conda"); do
87+
echo "Uploading $package to uni-lab organization..."
88+
anaconda upload --user uni-lab --force "$package"
89+
done
90+
91+
- name: Logout from Anaconda
92+
if: always() && (github.event.inputs.upload_to_anaconda == 'true' || (github.ref == 'refs/heads/main' && github.event_name != 'pull_request'))
93+
run: |
94+
anaconda logout || true

0 commit comments

Comments
 (0)