Skip to content

Commit e473ea4

Browse files
authored
Use docker in GA [AP-1085] (#1393)
# Description @swift-nav/devinfra Make use of `libsbp-build` docker image in the "check generated artefacts" stage. This bring consistency to the artefacts generated in the CI check since the canonical way of generating libsbp is via the docker image. This PR doesn't actually make any changes but should resolve some of the issues which have been seen recently when generating libsbp locally versus in CI. # API compatibility Does this change introduce a API compatibility risk? N/A ## API compatibility plan If the above is "Yes", please detail the compatibility (or migration) plan: N/A # JIRA Reference https://swift-nav.atlassian.net/browse/AP-1085
1 parent 1bfe255 commit e473ea4

File tree

3 files changed

+13
-32
lines changed

3 files changed

+13
-32
lines changed

.github/workflows/generator.yaml

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,20 @@ jobs:
1919
generation:
2020
name: Generated artifacts
2121
runs-on: ubuntu-20.04
22+
container:
23+
image: swiftnav/libsbp-build:2023-12-18
24+
options: --user root
25+
volumes:
26+
- ${{ github.workspace }}:/mnt/workspace
2227
steps:
2328
- uses: actions/checkout@v2
2429
with:
2530
fetch-depth: 0
2631
submodules: recursive
2732

28-
- name: Installing dependencies
33+
- name: Set safe git directory
2934
run: |
30-
sudo apt-get -qq update
31-
sudo apt-get install -y tox python3-sphinx clang-format-6.0 enchant
32-
pip3 install tox-run-command
33-
tox -e py --notest
34-
35-
- name: Installing Node
36-
uses: actions/setup-node@v4
37-
with:
38-
node-version: 18
39-
40-
- name: Installing Quicktype
41-
run: |
42-
npm ci
43-
npm install -g quicktype
44-
45-
- uses: gradle/gradle-build-action@v2
46-
with:
47-
gradle-version: 7.1.1
35+
git config --global --add safe.directory /__w/libsbp/libsbp
4836
4937
- name: Generate tests
5038
run: |
@@ -58,16 +46,9 @@ jobs:
5846
git diff --cached --exit-code
5947
git diff --exit-code
6048
61-
# - name: Generate html for python
62-
# run: make html-python # emits python/docs/build/html, not checked in
63-
6449
- name: Generate javadocs for java
6550
run: make javadocs # emits java/build/docs/javadoc, not used
6651

67-
- name: Installing pdf dependencies
68-
run: |
69-
sudo apt-get install -y texlive-latex-extra texlive-fonts-extra texlive-science graphviz
70-
7152
- name: Generate pdf
7253
id: pdf
7354
run: |

HOWTO.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,11 @@ Some thoughts to consider when adding a new message:
155155
It's highly recommended to use the docker container to run the release process,
156156
the docker container can be pulled from DockerHub and launched via this command:
157157

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

160160
You can invoke individual stages like so:
161161

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

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

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

459459
To publish, you'll run `make dist-java` (which will run `gradle sign` and

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Start [Docker desktop](https://docs.docker.com/docker-for-mac/).
119119
The quickest method to get going is to just pull a prebuilt copy from DockerHub
120120
(no guarantees on freshness) by running the following on your command line:
121121

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

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

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

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

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

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

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

0 commit comments

Comments
 (0)