Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build docker image
on:
workflow_dispatch:
pull_request:
paths:
- Dockerfile
- Makefile
- .github/workflows/docker.yaml
jobs:
build:
name: Build docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive

- name: Build image
run: |
docker build -t libsbp-build --build-arg UID=$(id -u) - <Dockerfile

- name: List images
run: docker images

- name: Run make all inside image
run: |
docker run --rm -v $PWD:/mnt/workspace -e TOX_PARALLEL_NO_SPINNER=1 \
-t libsbp-build:latest make all
49 changes: 12 additions & 37 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2020-2021 Swift Navigation Inc.
# Copyright (C) 2020-2022 Swift Navigation Inc.
# Contact: https://support.swiftnav.com
#
# This source is subject to the license found in the file 'LICENSE' which must
Expand Down Expand Up @@ -45,11 +45,9 @@ RUN \
software-properties-common \
sudo \
wget \
&& ((test $UBUNTU_RELEASE = bionic -o $UBUNTU_RELEASE = focal \
&& add-apt-repository ppa:deadsnakes/ppa \
&& wget -O - ${KITWARE_KEY_URL} 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null \
&& add-apt-repository "deb https://apt.kitware.com/ubuntu/ ${UBUNTU_RELEASE} main" \
) || true) \
&& add-apt-repository ppa:deadsnakes/ppa \
&& wget -O - ${KITWARE_KEY_URL} 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null \
&& add-apt-repository "deb https://apt.kitware.com/ubuntu/ ${UBUNTU_RELEASE} main" \
&& cat /etc/apt/sources.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
Expand All @@ -65,7 +63,7 @@ RUN \
$CC $CXX \
libpython2.7-stdlib \
libpython3.8-stdlib \
$(test $UBUNTU_RELEASE = focal && echo python-is-python3) \
python-is-python3 \
python3-pip \
python3-setuptools \
llvm \
Expand All @@ -80,39 +78,16 @@ RUN \
graphviz \
imagemagick \
enchant \
clang-format$(test $UBUNTU_RELEASE = bionic -o $UBUNTU_RELEASE = focal && echo -6.0) \
# from deadsnakes
$(test $UBUNTU_RELEASE = bionic -o $UBUNTU_RELEASE = focal && echo \
python3.5 \
python3.6 \
python3.7\
python3.9 \
) \
$(test $UBUNTU_RELEASE = bionic && echo python3.9-dist) \
# from kitware or ubuntu groovy+
clang-format-6.0 \
python3.6 python3.6-dev python3.6-distutils \
python3.7 python3.7-dev python3.7-distutils \
python3 python3-dev python3-distutils \
python3.9 python3.9-dev python3.9-distutils \
python3.10 python3.10-dev python3.10-distutils \
dpkg-dev \
cmake \
&& ((test $UBUNTU_RELEASE = bionic && sudo ln -s /usr/bin/pip3 /usr/bin/pip) || true) \
&& curl -sSL https://get.haskellstack.org/ | sh \
&& apt remove -y \
gnupg \
gpg \
netbase \
packagekit \
software-properties-common \
wget \
&& apt autoremove -y \
&& apt remove -y --allow-remove-essential \
apt \
&& sudo dpkg -r --force-depends \
dpkg-dev \
git-man \
fontconfig-config \
libcommons-logging-java \
libcommons-parent-java \
libdpkg-perl \
libfontbox-java \
libpdfbox-java \
libthai-data \
&& rm -rf /var/lib/apt/lists/* /tmp/* \
&& curl -s "https://get.sdkman.io" | bash \
&& bash -c "source $SDKMAN_DIR/bin/sdkman-init.sh; \
Expand Down
11 changes: 2 additions & 9 deletions HOWTO.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,15 +327,8 @@ git reset --hard v<INCREMENTED_TAG>

# Distributing Python

The build of the libsbp wheel should be done through docker via the "manylinux"
project by running the following set of commands:

```
docker build -f python/Dockerfile.x86_64 -t libsbp-amd64 .
docker run -v libsbp-amd64-root:/root -v $PWD:/work --rm -it libsbp-amd64 /bin/bash
cd /work
make dist-python PYPI_USERNAME=swiftnav PYPI_PASSWORD=...
```
The build of the libsbp wheel can be done via the `libsbp-build` container
described above.

## Troubleshooting

Expand Down
24 changes: 0 additions & 24 deletions python/.coveragerc

This file was deleted.

150 changes: 0 additions & 150 deletions python/Dockerfile.arm

This file was deleted.

50 changes: 0 additions & 50 deletions python/Dockerfile.llvm_arm

This file was deleted.

41 changes: 0 additions & 41 deletions python/Dockerfile.win

This file was deleted.

Loading