Skip to content

Commit

Permalink
Try a different approach
Browse files Browse the repository at this point in the history
  • Loading branch information
woodfell committed Dec 18, 2023
1 parent 482115a commit aa08f75
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 20 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,21 @@ 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@v3
- name: Pull docker image
run: |
docker pull swiftnav/libsbp-build:2023-12-19
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive

- name: Set safe git directory
run: |
git config --global --add safe.directory /__w/libsbp/libsbp
- name: Generate tests
run: |
rm c/test/auto_check_*.c c/test/cpp/auto_check_*.cc java/test/auto_check_*.java rust/sbp/tests/integration/auto_check_*.rs
make gen-c gen-java gen-rust gen-jsonschema gen-haskell gen-python gen-javascript gen-protobuf
make quicktype
docker run --rm -v $PWD:/mnt/workspace -e TOX_PARALLEL_NO_SPINNER=1 -t swiftnav/libsbp-build:2023-12-19 make gen-c gen-java gen-rust gen-jsonschema gen-haskell gen-python gen-javascript gen-protobuf
docker run --rm -v $PWD:/mnt/workspace -e TOX_PARALLEL_NO_SPINNER=1 -t swiftnav/libsbp-build:2023-12-19 make quicktype
- name: Check generated tests are up to date
run: |
Expand All @@ -47,12 +42,13 @@ jobs:
git diff --exit-code
- name: Generate javadocs for java
run: make javadocs # emits java/build/docs/javadoc, not used
run: |
docker run --rm -v $PWD:/mnt/workspace -e TOX_PARALLEL_NO_SPINNER=1 -t swiftnav/libsbp-build:2023-12-19 make javadocs # emits java/build/docs/javadoc, not used
- name: Generate pdf
id: pdf
run: |
make pdf
docker run --rm -v $PWD:/mnt/workspace -e TOX_PARALLEL_NO_SPINNER=1 -t swiftnav/libsbp-build:2023-12-19 make pdf
cp docs/sbp.pdf .
echo "::set-output name=artifact_name::sbp.pdf"
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:2023-12-18
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:2023-12-18 \
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:2023-12-18
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:2023-12-18 /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:2023-12-18
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:2023-12-18
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

0 comments on commit aa08f75

Please sign in to comment.