Skip to content

Commit

Permalink
Change the output artifact path to $root_dir/obj/$image when runnin…
Browse files Browse the repository at this point in the history
…g locally
  • Loading branch information
DianQK committed Apr 9, 2024
1 parent d92f01a commit 0907ffe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
11 changes: 4 additions & 7 deletions src/ci/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,17 @@ for example:
./src/ci/docker/run.sh x86_64-gnu
```

Images will output artifacts in an `obj` dir at the root of a repository. Note
Images will output artifacts in an `obj/$image_name` dir at the root of a repository. Note
that the script will overwrite the contents of this directory.

To match conditions in rusts CI, also set the environment variable `DEPLOY=1`, e.g.:
```
DEPLOY=1 ./src/ci/docker/run.sh x86_64-gnu
```

**NOTE**: Re-using the same `obj` dir with different docker images with
the same target triple (e.g. `dist-x86_64-linux` and `dist-various-1`)
may result in strange linker errors, due shared library versions differing between platforms.

If you encounter any issues when using multiple Docker images, try deleting your `obj` directory
before running your command.
**NOTE**: In CI, the script outputs the artifacts to the `obj` directory,
while locally, to the `obj/$image_name` directory. This is primarily to prevent
strange linker errors when using multiple Docker images.

## Filesystem layout

Expand Down
6 changes: 5 additions & 1 deletion src/ci/docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ ci_dir="`dirname $script_dir`"
src_dir="`dirname $ci_dir`"
root_dir="`dirname $src_dir`"

objdir=$root_dir/obj
if isCI; then
objdir=$root_dir/obj
else
objdir=$root_dir/obj/$image
fi
dist=$objdir/build/dist


Expand Down

0 comments on commit 0907ffe

Please sign in to comment.