-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathci-build.sh
More file actions
executable file
·59 lines (37 loc) · 1.3 KB
/
Copy pathci-build.sh
File metadata and controls
executable file
·59 lines (37 loc) · 1.3 KB
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
#!/bin/bash
set -eou pipefail
# Based on: https://stackoverflow.com/a/246128
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
BUILD_ROOT="${SCRIPT_DIR}/.."
cd "${BUILD_ROOT}" || { echo "Unable to change to build root directory" ; exit 1; }
printf """
✨✨✨ Configure gopy / dependencies, and build wheel ✨✨✨
"""
echo "python -VV"
python -VV
echo 'python -c "import sys; print(sys.executable)"'
python -c "import sys; print(sys.executable)"
echo 'pip -V'
pip -V
echo 'pip install poetry'
pip install poetry
# Look for go/bin (skip, we know it exists)
echo '$HOME/'
ls -la "$HOME/"
echo '$HOME/.local/'
ls -la "$HOME/.local/"
echo '$HOME/go/'
ls -la "$HOME/go/"
# Add Go bin directory to PATH
echo "export PATH=$PATH:~/.local/go/bin" >> $GITHUB_ENV
# Since we don't have our wheel build / install configured yet we use '--no-root'
poetry install --no-root
source $(poetry env info --path)/bin/activate
# Add Go bin directory to PATH
echo "export PATH=$PATH:~/.local/go/bin" >> $GITHUB_ENV
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/go-python/gopy@latest
poetry run pip install --upgrade setuptools wheel
gopy build --output=otdf_python -vm=python3 .
poetry run python3 setup.py bdist_wheel
pip install dist/otdf_python-0.2.1-py3-none-any.whl