Skip to content

Commit

Permalink
experiment: include runtimes into polkadot-debug docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
michalkucharczyk committed Sep 13, 2023
1 parent 619c85c commit 657ae27
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .gitlab/pipeline/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@ build-linux-stable:
RUN_UI_TESTS: 1
script:
- time cargo build --locked --profile testnet --features pyroscope,fast-runtime --bin polkadot --bin polkadot-prepare-worker --bin polkadot-execute-worker
- time ROCOCO_EPOCH_DURATION=10 ./polkadot/scripts/build-only-wasm.sh rococo-runtime $(pwd)/runtimes/rococo-runtime-10/
- time ROCOCO_EPOCH_DURATION=100 ./polkadot/scripts/build-only-wasm.sh rococo-runtime $(pwd)/runtimes/rococo-runtime-100/
- pwd
- ls -alR runtimes
# pack artifacts
- mkdir -p ./artifacts
- VERSION="${CI_COMMIT_REF_NAME}" # will be tag or branch name
- mv ./target/testnet/polkadot ./artifacts/.
- mv ./target/testnet/polkadot-prepare-worker ./artifacts/.
- mv ./target/testnet/polkadot-execute-worker ./artifacts/.
- mv ./runtimes/ ./artifacts/.
- pushd artifacts
- sha256sum polkadot | tee polkadot.sha256
- shasum -c polkadot.sha256
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@ RUN apt-get update && \
find /var/lib/apt/lists/ -type f -not -name lock -delete; \
# add user and link ~/.local/share/polkadot to /data
useradd -m -u 1000 -U -s /bin/sh -d /polkadot polkadot && \
mkdir -p /data /polkadot/.local/share && \
mkdir -p /data /polkadot/.local/share /polkdot/runtimes && \
chown -R polkadot:polkadot /data && \
ln -s /data /polkadot/.local/share/polkadot

# add polkadot binaries to docker image
COPY ./artifacts/polkadot ./artifacts/polkadot-execute-worker ./artifacts/polkadot-prepare-worker /usr/local/bin

# add runtime binaries to docker image
COPY ./artifacts/runtimes /polkadot/runtimes/

USER polkadot

# check if executable works in this container
Expand Down

0 comments on commit 657ae27

Please sign in to comment.