File tree Expand file tree Collapse file tree 6 files changed +46
-18
lines changed
Expand file tree Collapse file tree 6 files changed +46
-18
lines changed Original file line number Diff line number Diff line change 1- 3.7 .0
1+ 5.4 .0
Original file line number Diff line number Diff line change @@ -15,17 +15,17 @@ jobs:
1515 - uses : actions/checkout@v2
1616 - name : Build manylinux image
1717 run : |
18- docker build -t embag .
18+ docker build -t embag --build-arg BAZEL_VERSION=$(cat .bazelversion) .
1919 docker run -v $PWD:/tmp/cp --rm -t embag bash -c "cp /tmp/out/*.whl /tmp/cp"
2020
2121 - name : Upload .whl artifacts
2222 uses : actions/upload-artifact@v2.1.4
2323 with :
2424 name : python_wheels
2525 path : embag-*.whl
26-
26+
2727 debian_package_build :
28- runs-on : ubuntu-latest
28+ runs-on : ubuntu-20.04 # Need to use Python3.8 for pybind11 (Ubuntu 22.04 uses Python3.10)
2929 steps :
3030 - uses : actions/checkout@v2
3131 - name : Mount bazel cache
4040 with :
4141 name : debian_packages
4242 path : bazel-bin/lib/embag_*.deb
43-
43+
4444 macos_build :
4545 runs-on : macos-10.15
4646 strategy :
6666 with :
6767 name : python_wheels
6868 path : /tmp/out/embag-*.whl
69-
70-
69+
70+
Original file line number Diff line number Diff line change 11FROM quay.io/pypa/manylinux2014_x86_64
22
3- RUN yum install npm git python-devel python2-pip gdb -y -q && \
3+ ARG BAZEL_VERSION
4+
5+ ENV USE_BAZEL_VERSION=$BAZEL_VERSION
6+
7+ RUN yum install npm git python-devel python2-pip python3-pip gdb -y -q && \
8+ npm install -g npm@9.2.0 \
49 npm install -g @bazel/bazelisk && \
5- pip install wheel && \
6- pip install --upgrade "pip < 21.0"
10+ python -m pip install --upgrade "pip < 21.0" --user && \
11+ python -m pip install wheel --user && \
12+ python3 -m pip install --upgrade "pip < 21.0" --user && \
13+ python3 -m pip install wheel --user
714
815RUN mkdir -p /tmp/embag /tmp/pip_build /tmp/out
916COPY WORKSPACE /tmp/embag
Original file line number Diff line number Diff line change @@ -24,6 +24,25 @@ class RosMessage {
2424 {
2525 }
2626
27+ RosMessage (
28+ const std::string& topic,
29+ const RosValue::ros_time_t & timestamp,
30+ const std::string& md5,
31+ const std::shared_ptr<std::vector<char >>& raw_buffer,
32+ size_t offset,
33+ uint32_t raw_data_len,
34+ const std::shared_ptr<RosMsgTypes::MsgDef>& msg_def
35+ )
36+ : topic(topic)
37+ , timestamp(timestamp)
38+ , md5(md5)
39+ , raw_buffer(raw_buffer)
40+ , raw_buffer_offset(offset)
41+ , raw_data_len(raw_data_len)
42+ , msg_def_(msg_def)
43+ {
44+ }
45+
2746 const RosValue::Pointer &data () {
2847 if (!parsed_) {
2948 hydrate ();
Original file line number Diff line number Diff line change 1- EMBAG_VERSION = "0.0.42 "
1+ EMBAG_VERSION = "0.0.43 "
Original file line number Diff line number Diff line change 11#! /bin/bash -e
22
33function build() {
4- PYTHON_PATH =$1
4+ PYTHON_PARENT_FOLDER =$1
55 PYTHON_VERSION=$2
66
7+ PYTHON_PATH=" $PYTHON_PARENT_FOLDER /python$PYTHON_VERSION "
8+
79 # Install necessary dependencies
8- " $PYTHON_PATH /pip " install -r /tmp/pip_build/requirements.txt
10+ " $PYTHON_PATH " -m pip install -r /tmp/pip_build/requirements.txt --user
911
1012 # Build embag libs and echo test binary
1113 (cd /tmp/embag &&
12- PYTHON_BIN_PATH=" $PYTHON_PATH /python " bazel build -c opt //python:libembag.so //embag_echo:embag_echo &&
13- PYTHON_BIN_PATH=" $PYTHON_PATH /python " bazel test -c opt //test:embag_test " //test:embag_test_python$PYTHON_VERSION " --cache_test_results=no --test_output=all)
14+ PYTHON_BIN_PATH=" $PYTHON_PATH " bazel build -c opt //python:libembag.so //embag_echo:embag_echo &&
15+ PYTHON_BIN_PATH=" $PYTHON_PATH " bazel test -c opt //test:embag_test " //test:embag_test_python$PYTHON_VERSION " --cache_test_results=no --test_output=all)
1416
1517 # Build wheel
1618 cp /tmp/embag/bazel-bin/python/libembag.so /tmp/pip_build/embag
17- (cd /tmp/pip_build && " $PYTHON_PATH /python " setup.py bdist_wheel &&
19+ (cd /tmp/pip_build && " $PYTHON_PATH " setup.py bdist_wheel &&
1820 auditwheel repair /tmp/pip_build/dist/embag* .whl --plat manylinux2014_x86_64 &&
19- " $PYTHON_PATH /pip " install wheelhouse/embag* .whl &&
20- " $PYTHON_PATH /python " -c ' import embag; embag.View(); print("Successfully loaded embag!")' &&
21+ " $PYTHON_PATH " -m pip install wheelhouse/embag* .whl --user &&
22+ " $PYTHON_PATH " -c ' import embag; embag.View(); print("Successfully loaded embag!")' &&
2123 cp wheelhouse/* /tmp/out &&
2224 rm wheelhouse/* &&
2325 rm -rf build dist)
You can’t perform that action at this time.
0 commit comments