Skip to content

Commit

Permalink
Fix runtime build
Browse files Browse the repository at this point in the history
  • Loading branch information
kogeler committed May 22, 2024
1 parent 0f58d60 commit c413ec3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/polkadot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@ on:
branches:
paths:
- .github/workflows/polkadot.yml
- dockerfiles/Dockerfile.test
- dockerfiles/Dockerfile.amd64
- release-version.txt
pull_request:
paths:
- .github/workflows/polkadot.yml
- dockerfiles/Dockerfile.test
- dockerfiles/Dockerfile.amd64
- release-version.txt

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
RELEASE_REF: refs/heads/main
SKIP_WASM_BUILD: "1"
jobs:
build-docker-images:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -114,6 +115,7 @@ jobs:
echo "BINARY_FILE_NAME=${NODE_GIT_REF}-${ENV_VERSION}" >> $GITHUB_ENV
echo "EXECUTE_WORKER_BINARY_FILE_NAME=${NODE_GIT_REF}-execute-worker-${ENV_VERSION}" >> $GITHUB_ENV
echo "PREPARE_WORKER_BINARY_FILE_NAME=${NODE_GIT_REF}-prepare-worker-${ENV_VERSION}" >> $GITHUB_ENV
echo "WASM_BUILD_WORKSPACE_HINT=$(pwd)/polkadot-sdk" >> $GITHUB_ENV
git config --global --add safe.directory $(pwd)
- name: Checkout polkadot-sdk repository
uses: actions/checkout@v4
Expand All @@ -122,9 +124,9 @@ jobs:
path: polkadot-sdk
ref: ${{ env.NODE_GIT_REF }}
- name: Build binaries
working-directory: ./polkadot-sdk
run: |
cd polkadot-sdk/polkadot
cargo build --release --target x86_64-unknown-linux-gnu
cargo build --profile production --locked --package polkadot --bin polkadot --target x86_64-unknown-linux-gnu
ls /opt/cargo_target/x86_64-unknown-linux-gnu/release
- name: "Create release"
if: ${{ github.ref == env.RELEASE_REF }}
Expand Down
8 changes: 5 additions & 3 deletions dockerfiles/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ FROM ${IMAGE_VERSION}

ARG GIT_REF

WORKDIR /home/rust
RUN git clone https://github.com/paritytech/polkadot-sdk.git polkadot-sdk && cd polkadot-sdk && git checkout ${GIT_REF}
RUN cd polkadot-sdk/polkadot && cargo build --release
ENV WASM_BUILD_WORKSPACE_HINT="/home/rust/polkadot-sdk"

RUN git clone https://github.com/paritytech/polkadot-sdk.git polkadot-sdk --branch ${GIT_REF} --single-branch
WORKDIR /home/rust/polkadot-sdk
RUN cargo build --profile production --locked --package polkadot --bin polkadot

0 comments on commit c413ec3

Please sign in to comment.