-
Notifications
You must be signed in to change notification settings - Fork 15
160 lines (139 loc) · 5.31 KB
/
conda_build.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
name: Build conda package
on:
workflow_dispatch:
inputs:
version:
description: Version to package
required: true
build:
description: "Build revision of package (default: 0)"
required: false
default: '0'
jobs:
build_package_linux-64:
name: Build conda package for linux-64
runs-on: ubuntu-latest
strategy:
fail-fast: false
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
steps:
- name: Checkout pull request branch
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create recipe from template
run: |
mkdir /tmp/recipe
cp .github/recipe/meta.yaml /tmp/recipe/meta.yaml
cp .github/recipe/build.sh /tmp/recipe/build.sh
version=${{ github.event.inputs.version }}
build=${{ github.event.inputs.build }}
wget https://github.com/cumc/pecotmr/archive/${version}.tar.gz
sha256sum=$(sha256sum ${version}.tar.gz | cut -d ' ' -f 1)
sed -i "s/VERSION_PLACEHOLDER/${version}/g" /tmp/recipe/meta.yaml
sed -i "s/SHA256SUM_PLACEHOLDER/${sha256sum}/g" /tmp/recipe/meta.yaml
sed -i "s/BUILD_PLACEHOLDER/${build}/g" /tmp/recipe/meta.yaml
- name: Setup up docker buildx
uses: docker/setup-buildx-action@v2
- name: Build and export docker containers
uses: docker/build-push-action@v4
with:
load: true
file: .github/mambaforge_container.df
tags: conda_mambabuild:latest
- name: Build conda packages
run: docker run --rm --volume /tmp:/tmp --volume $(pwd) --workdir $(pwd) conda_mambabuild conda mambabuild --output-folder /tmp/conda-bld /tmp/recipe
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-name: anaconda-client
create-args: anaconda-client
generate-run-shell: true
- name: Upload packages
shell: micromamba-shell {0}
run: anaconda upload --force /tmp/conda-bld/linux-64/*.tar.bz2
build_package_osx-64:
name: Build conda package for osx-64
runs-on: macos-13
strategy:
fail-fast: false
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
steps:
- name: Checkout pull request branch
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-name: boa
create-args: boa conda-verify anaconda-client sed coreutils
generate-run-shell: true
condarc: |
channels:
- dnachun
- conda-forge
- bioconda
- name: Create recipe from template
shell: micromamba-shell {0}
run: |
mkdir /tmp/recipe
cp .github/recipe/meta.yaml /tmp/recipe/meta.yaml
cp .github/recipe/build.sh /tmp/recipe/build.sh
version=${{ github.event.inputs.version }}
build=${{ github.event.inputs.build }}
wget https://github.com/cumc/pecotmr/archive/${version}.tar.gz
sha256sum=$(sha256sum ${version}.tar.gz | cut -d ' ' -f 1)
sed -i "s/VERSION_PLACEHOLDER/${version}/g" /tmp/recipe/meta.yaml
sed -i "s/SHA256SUM_PLACEHOLDER/${sha256sum}/g" /tmp/recipe/meta.yaml
sed -i "s/BUILD_PLACEHOLDER/${build}/g" /tmp/recipe/meta.yaml
- name: Build conda package
shell: micromamba-shell {0}
run: conda mambabuild --output-folder /tmp/conda-bld /tmp/recipe
- name: Upload package
shell: micromamba-shell {0}
run: anaconda upload --force /tmp/conda-bld/osx-64/*.tar.bz2
build_package_osx-arm64:
name: Build conda package for osx-arm64
runs-on: macos-14
strategy:
fail-fast: false
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
steps:
- name: Checkout pull request branch
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-name: boa
create-args: boa conda-verify anaconda-client sed coreutils
generate-run-shell: true
condarc: |
channels:
- dnachun
- conda-forge
- bioconda
- name: Create recipe from template
shell: micromamba-shell {0}
run: |
mkdir /tmp/recipe
cp .github/recipe/meta.yaml /tmp/recipe/meta.yaml
cp .github/recipe/build.sh /tmp/recipe/build.sh
version=${{ github.event.inputs.version }}
build=${{ github.event.inputs.build }}
wget https://github.com/cumc/pecotmr/archive/${version}.tar.gz
sha256sum=$(sha256sum ${version}.tar.gz | cut -d ' ' -f 1)
sed -i "s/VERSION_PLACEHOLDER/${version}/g" /tmp/recipe/meta.yaml
sed -i "s/SHA256SUM_PLACEHOLDER/${sha256sum}/g" /tmp/recipe/meta.yaml
sed -i "s/BUILD_PLACEHOLDER/${build}/g" /tmp/recipe/meta.yaml
- name: Build conda package
shell: micromamba-shell {0}
run: conda mambabuild --output-folder /tmp/conda-bld /tmp/recipe
- name: Upload package
shell: micromamba-shell {0}
run: anaconda upload --force /tmp/conda-bld/osx-arm64/*.tar.bz2