Skip to content

Commit

Permalink
Use flatc from a pined docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristramg committed Feb 21, 2024
1 parent 8f010bb commit 8bce4f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install flatc
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: flatbuffers-compiler
- name: Install unzip
run: sudo apt update && apt install unzip
- name: Get flatc
run: wget https://github.com/google/flatbuffers/releases/download/v23.5.26/Linux.flatc.binary.g++-10.zip && unzip Linux.flatc.binary.g++-10.zip
- name: Generate rust code from schema
run: flatc --rust schema/lrs.fbs
run: ./flatc --rust schema/lrs.fbs
- name: Ensure same output as commited
run: diff src/lrs_generated.rs lrs_generated.rs
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ The data that defines an LRS is serialized using the [FlatBuffers format](https:

The schema is described in [schema/lrs.fbs](schema/lrs.fbs). The library is written in rust and the [generated file](src/lrs_generated.rs) is commited. This means there is no need to have the `flatc` executable to build and run this project.

If your contribution changes the schema, you will need to generate the file with
If your contribution changes the schema, you will need to generate the file with flatc. The version must be the release 23.5.26. Do not use a version built from master.

`flatc -o src --rust schema/lrs.fbs`

0 comments on commit 8bce4f2

Please sign in to comment.