-
Notifications
You must be signed in to change notification settings - Fork 50
157 lines (129 loc) · 5.63 KB
/
build_recipes.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
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
name: build recipes
on:
push:
branches:
- 'main'
pull_request:
jobs:
build_recipes:
runs-on: ubuntu-latest
env:
TARGET_PLATFORM: emscripten-wasm32
GITHUB_OWNER: "emscripten-forge"
strategy:
fail-fast: false
matrix:
emsdk_ver: ["3.1.45"]
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Maximize build space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: delete fortran...
run: |
sudo apt-get remove gfortran -y
################################################################
# CONFIG
################################################################
- name: global config
shell: bash -el {0}
run: |
git config --global advice.detachedHead false
cp $GITHUB_WORKSPACE/.github/workflows/.condarc $HOME
cp $GITHUB_WORKSPACE/conda_build_config.yaml $HOME
################################################################
# MAMBA
################################################################
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: ci_env.yml
environment-name: ci
init-shell: >-
bash
cache-environment: true
post-cleanup: 'all'
################################################################
# setup emsdk
################################################################
- name: "setup emsdk"
shell: bash -el {0}
run: |
./emsdk/setup_emsdk.sh ${{ matrix.emsdk_ver }} $(pwd)/emsdk_install
################################################################
# POST ENV INSTALL CONFIG
################################################################
- name: post env install config
shell: bash -el {0}
run: |
cp $GITHUB_WORKSPACE/.github/workflows/.condarc $HOME/.condarc
playwright install
################################################################
# install / clone custom non-master things
# for pip, we use --no-deps --ignore-installed
# and make sure that all dependencies are already contained
# in the conda env named "ci-env"
################################################################
- name: "install custom non-master dependencies"
shell: bash -el {0}
run: |
python -m pip install git+https://github.com/DerThorsten/boa.git@python_api_v2 --no-deps --ignore-installed
################################################################
# run pytests
################################################################
- name: "test config files"
shell: bash -el {0}
run: |
cd testing
pytest test_empack_config.py
# ################################################################
# # build pyjs
# ################################################################
# - name: "build package"
# shell: bash -el {0}
# run: |
# cd ${GITHUB_WORKSPACE}
# python builder.py build explicit $GITHUB_WORKSPACE/recipes/recipes/emscripten_emscripten-wasm32
# python builder.py build explicit $GITHUB_WORKSPACE/recipes/recipes_emscripten/pyjs --emscripten-wasm32
################################################################
# build recipes with changes PUSH
################################################################
- name: "build packages push"
shell: bash -el {0}
if: github.event_name == 'push'
run: |
cd ${GITHUB_WORKSPACE}
python builder.py build changed $GITHUB_WORKSPACE/ origin/main~1 origin/main
################################################################
# build recipes with changes PULL_REQUEST
################################################################
- name: "build packages pull_request"
shell: bash -el {0}
if: github.event_name == 'pull_request'
run: |
cd ${GITHUB_WORKSPACE}
python builder.py build changed $GITHUB_WORKSPACE/ origin/main HEAD
################################################################
# quetz upload packages
################################################################
- name: "quetz upload packages"
if: github.event_name == 'push'
shell: bash -el {0}
run: |
mkdir -p ${CONDA_PREFIX}/conda-bld/emscripten-wasm32
mkdir -p ${CONDA_PREFIX}/conda-bld/linux-64
mkdir -p ${CONDA_PREFIX}/conda-bld/noarch
# if [ $(ls ${CONDA_PREFIX}/conda-bld/emscripten-32/*.tar.bz2 | wc -l) -ne 0 ]; then
# QUETZ_API_KEY=${{ secrets.QUETZ_API_KEY}} quetz-client https://beta.mamba.pm/channels/emscripten-forge ${CONDA_PREFIX}/conda-bld/emscripten-wasm32/*.tar.bz2
# fi
# if [ $(ls ${CONDA_PREFIX}/conda-bld/linux-64/*.tar.bz2 | wc -l) -ne 0 ]; then
# QUETZ_API_KEY=${{ secrets.QUETZ_API_KEY}} quetz-client https://beta.mamba.pm/channels/emscripten-forge ${CONDA_PREFIX}/conda-bld/linux-64/*.tar.bz2
# fi
# if [ $(ls ${CONDA_PREFIX}/conda-bld/noarch/*.tar.bz2 | wc -l) -ne 0 ]; then
# QUETZ_API_KEY=${{ secrets.QUETZ_API_KEY}} quetz-client https://beta.mamba.pm/channels/emscripten-forge ${CONDA_PREFIX}/conda-bld/noarch/*.tar.bz2
# fi