Skip to content

Commit

Permalink
zombie builder, change paths
Browse files Browse the repository at this point in the history
  • Loading branch information
qdrvm-ci committed Jun 21, 2024
1 parent a40bc37 commit c4a5f38
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 18 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/zombie-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ env:
# https://github.jparrowsec.cnmunity/t/how-to-set-and-access-a-workflow-variable/17335/6
CACHE_VERSION: v001
CACHE_PATHS: |
/tmp/cargo/registry
/tmp/cargo/git
./cargo/registry
./cargo/git
jobs:
# get_polkadot_binary_image:
Expand Down Expand Up @@ -74,8 +74,8 @@ jobs:
# run: make builder_push

build_polkadot_builder:
runs-on: ubuntu-latest
timeout-minutes: 60
runs-on: [ actions-runner-controller ]
timeout-minutes: 120
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -124,7 +124,14 @@ jobs:
runs-on: ubuntu-latest
needs: [build_polkadot_builder]
timeout-minutes: 120


strategy:
matrix:
artifact:
- malus
- undying-collator
- adder-collator

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -160,8 +167,8 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: polkadot_binary
path: /tmp/polkadot_binary
name: ${{ matrix.artifact }}
path: ./zombienet/docker/polkadot_binary/{{ matrix.artifact }}

# building_binary:
# runs-on: [ actions-runner-controller ]
Expand Down
22 changes: 11 additions & 11 deletions zombienet/docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ polkadot_binary:
df -h ; \
CONTAINER_NAME=polkadot_build_$$(openssl rand -hex 6); \
POLKADOT_SDK_RELEASE=$$(grep 'polkadot_format_version:' polkadot-sdk-versions.txt | cut -d ' ' -f 2); \
mkdir -p /tmp/polkadot_binary /tmp/cargo/registry /tmp/cargo/git; \
mkdir -p ./polkadot_binary ./cargo/registry ./cargo/git; \
docker run -d --name $$CONTAINER_NAME \
--platform $(PLATFORM) \
--entrypoint "/bin/bash" \
Expand All @@ -92,21 +92,21 @@ polkadot_binary:
-e SCCACHE_GCS_RW_MODE=READ_WRITE \
-e SCCACHE_LOG=info \
-v $(GOOGLE_APPLICATION_CREDENTIALS):/root/.gcp/google_creds.json \
-v /tmp/polkadot_binary:/tmp/polkadot_binary \
-v /tmp/cargo/registry:/usr/local/cargo/registry/ \
-v /tmp/cargo/git:/usr/local/cargo/git/ \
-v ./polkadot_binary:/tmp/polkadot_binary \
-v ./cargo/registry:/usr/local/cargo/registry/ \
-v ./cargo/git:/usr/local/cargo/git/ \
$(DOCKER_REGISTRY_PATH)polkadot_builder:$$POLKADOT_SDK_RELEASE \
-c "tail -f /dev/null"; \
docker exec -t $$CONTAINER_NAME /bin/bash -c \
"cargo update $(CARGO_PACKETS) && \
cargo build --profile testnet $(CARGO_PACKETS); \
la -la /home/nonroot/polkadot-sdk/target/testnet/ ; \
cp /home/nonroot/polkadot-sdk/target/testnet/malus \
/home/nonroot/polkadot-sdk/target/testnet/undying-collator \
/home/nonroot/polkadot-sdk/target/testnet/adder-collator \
/tmp/polkadot_binary/; \
ls -la /tmp/polkadot_binary /tmp/cargo/registry /tmp/cargo/git" ; \
ls -la /tmp/polkadot_binary /tmp/cargo/registry /tmp/cargo/git ; df -h ; \
la -la ./target/testnet/ ; \
cp ./target/testnet/malus \
./target/testnet/undying-collator \
./target/testnet/adder-collator \
/tmp/polkadot_binary/ ; \
ls -la /tmp/polkadot_binary /usr/local/cargo/registry /usr/local/cargo/git" ; \
ls -la ./polkadot_binary ./cargo/registry ./cargo/git ; df -h ; \
docker stop $$CONTAINER_NAME; \
else \
echo "One or more files are missing."; \
Expand Down

0 comments on commit c4a5f38

Please sign in to comment.