Skip to content

Use docker in GA [AP-1085] #1393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Dec 18, 2023
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
33 changes: 7 additions & 26 deletions .github/workflows/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,20 @@ jobs:
generation:
name: Generated artifacts
runs-on: ubuntu-20.04
container:
image: swiftnav/libsbp-build:2023-12-18
options: --user root
volumes:
- ${{ github.workspace }}:/mnt/workspace
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive

- name: Installing dependencies
- name: Set safe git directory
run: |
sudo apt-get -qq update
sudo apt-get install -y tox python3-sphinx clang-format-6.0 enchant
pip3 install tox-run-command
tox -e py --notest

- name: Installing Node
uses: actions/setup-node@v4
with:
node-version: 18

- name: Installing Quicktype
run: |
npm ci
npm install -g quicktype

- uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.1.1
git config --global --add safe.directory /__w/libsbp/libsbp
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this is ideal but required to resolve a permissions issue which I think is caused by different UIDs being used inside and outside the container

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine/I don't know a better solution here.


- name: Generate tests
run: |
Expand All @@ -58,16 +46,9 @@ jobs:
git diff --cached --exit-code
git diff --exit-code

# - name: Generate html for python
# run: make html-python # emits python/docs/build/html, not checked in

- name: Generate javadocs for java
run: make javadocs # emits java/build/docs/javadoc, not used

- name: Installing pdf dependencies
run: |
sudo apt-get install -y texlive-latex-extra texlive-fonts-extra texlive-science graphviz

- name: Generate pdf
id: pdf
run: |
Expand Down
6 changes: 3 additions & 3 deletions HOWTO.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ Some thoughts to consider when adding a new message:
It's highly recommended to use the docker container to run the release process,
the docker container can be pulled from DockerHub and launched via this command:

docker run -v $PWD:/mnt/workspace -i -t swiftnav/libsbp-build:2022-06-14
docker run -v $PWD:/mnt/workspace -i -t swiftnav/libsbp-build:2023-12-19

You can invoke individual stages like so:

docker run -v $PWD:/mnt/workspace -i -t swiftnav/libsbp-build:2022-06-14 \
docker run -v $PWD:/mnt/workspace -i -t swiftnav/libsbp-build:2023-12-19 \
/bin/bash -c "make python"

Check this [link](https://hub.docker.com/r/swiftnav/libsbp-build/tags) for newer tags.
Expand Down Expand Up @@ -453,7 +453,7 @@ For more info see: <https://docs.gradle.org/current/userguide/signing_plugin.htm
Now, invoke docker like this in order to run the `dist-java` task:

```shell
docker run -v $HOME/Documents:/keys -v $PWD:/mnt/workspace -i -t swiftnav/libsbp-build:2022-06-14
docker run -v $HOME/Documents:/keys -v $PWD:/mnt/workspace -i -t swiftnav/libsbp-build:2023-12-19
```

To publish, you'll run `make dist-java` (which will run `gradle sign` and
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Start [Docker desktop](https://docs.docker.com/docker-for-mac/).
The quickest method to get going is to just pull a prebuilt copy from DockerHub
(no guarantees on freshness) by running the following on your command line:

docker run --rm -v $PWD:/mnt/workspace -i -t swiftnav/libsbp-build:2022-06-14 /bin/bash
docker run --rm -v $PWD:/mnt/workspace -i -t swiftnav/libsbp-build:2023-12-19 /bin/bash

This will mount your local copy of the libsbp repository onto the image.

Expand Down Expand Up @@ -156,12 +156,12 @@ This could take several hours to run. Alternately, the docker image will run
the `make all` command by default, so you can kick off the `make all` process
by simply running the following command:

docker run --rm -v $PWD:/mnt/workspace -i -t libsbp-build:2022-06-14
docker run --rm -v $PWD:/mnt/workspace -i -t libsbp-build:2023-12-19

To speed up this process you can attempt to run Python environment tests in
paralell with:

docker run --rm -v $PWD:/mnt/workspace -i -t -e SBP_TOX_PARALLEL=auto libsbp-build:2022-06-14
docker run --rm -v $PWD:/mnt/workspace -i -t -e SBP_TOX_PARALLEL=auto libsbp-build:2023-12-19

When you are finished, quit Docker so that it would not unnecessarily use up
resources on your machine.
Expand Down