|
1 | 1 | # Building and Releasing
|
2 | 2 |
|
3 |
| -This repo has two types of releases: |
| 3 | +The toolchain repo is based on two Docker images: |
4 | 4 |
|
5 |
| -- LLVM releases e.g. `vllvm-10.0.1`, which include the bundled LLVM tooling |
6 |
| -- Normal releases e.g. `v0.0.1`, which include a bundled sysroot |
| 5 | +- `faasm/toolchain` - the base image holding just the custom LLVM tools |
| 6 | +- `faasm/sysroot` - the image holding both the tools and sysroot |
7 | 7 |
|
8 |
| -## Docker |
| 8 | +See the [Actions page](https://github.com/faasm/faasm-toolchain/actions) and |
| 9 | +[Dockerfiles](docker) for more info. |
9 | 10 |
|
10 |
| -The toolchain uses two Docker images: |
| 11 | +You only need to rebuild the `toolchain` image when upgrading LLVM (see |
| 12 | +[the docs](docs/upgrade-llvm.md). |
11 | 13 |
|
12 |
| -- `faasm/toolchain` - used to build the custom LLVM tools, not rebuilt regularly |
13 |
| -- `faasm/sysroot` - used to build and package the sysroot |
| 14 | +The `sysroot` image is rebuilt as part of the CI and tagging process. |
14 | 15 |
|
15 |
| -See the [Actions page](https://github.com/faasm/faasm-toolchain/actions) and |
16 |
| -[Dockerfiles](docker) for more info. |
| 16 | +## Rebuilding `toolchain` |
| 17 | + |
| 18 | +You should only need to manually rebuild the `toolchain` image, the `sysroot` |
| 19 | +image is built through GH Actions. |
| 20 | + |
| 21 | +```bash |
| 22 | +# Build the toolchain image |
| 23 | +inv container.toolchain` - rebuilds the base toolchain image |
| 24 | +
|
| 25 | +# Push the latest toolchain image build |
| 26 | +inv container.push-toolchain |
| 27 | +``` |
| 28 | + |
| 29 | +## Rebuilding `sysroot` |
| 30 | + |
| 31 | +If you do want to build `sysroot` locally (e.g. for debugging issues): |
| 32 | + |
| 33 | +```bash |
| 34 | +inv container.sysroot |
| 35 | +``` |
17 | 36 |
|
18 |
| -## Building Docker images |
| 37 | +## CI build |
19 | 38 |
|
20 |
| -We have two tasks for building the Docker images: |
| 39 | +The CI build will run through the `sysroot` build but not push any new images. |
21 | 40 |
|
22 |
| -- `inv container.toolchain` - rebuilds the base toolchain image |
23 |
| -- `inv container.sysroot` - rebuilds the sysroot image |
| 41 | +## Release build |
24 | 42 |
|
25 |
| -## Releasing |
| 43 | +The release build will run the `sysroot` build and push the Docker image to |
| 44 | +Dockerhub. |
26 | 45 |
|
27 |
| -To create a new release: |
| 46 | +To do this: |
28 | 47 |
|
29 |
| -- Update the versions in `VERSION` and the Github Actions build |
30 |
| -- Run `inv git.tag` from the branch you want to tag |
31 |
| -- Push and let the CI do the rest |
| 48 | +- Update the version in `VERSION` |
| 49 | +- Run `inv git.tag` to create the tag (from the head of the current branch) |
| 50 | +- Let the CI build run through and build the container |
32 | 51 |
|
0 commit comments