Skip to content

Commit

Permalink
CI was fixed (#2)
Browse files Browse the repository at this point in the history
* fix CI

Signed-off-by: kogeler <[email protected]>
  • Loading branch information
kogeler authored Sep 26, 2023
1 parent 7e702fa commit 8836212
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
30 changes: 27 additions & 3 deletions .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@ jobs:
rust-versions: [1.72.0]
clang-versions: [15, 16]
steps:
- name: Set environmental variables
run: |
echo "FULL_IMAGE_NAME=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:debian-${{ matrix.debian-versions }}-rust-${{ matrix.rust-versions }}-clang-${{ matrix.clang-versions }}" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
- name: Log in to Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
Expand All @@ -44,6 +47,27 @@ jobs:
with:
context: dockerfiles
file: dockerfiles/Dockerfile.amd64
push: ${{ github.ref == 'refs/heads/main' }}
push: false
load: true
labels: ${{ steps.meta.outputs.labels }}
tags: "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:debian-${{ matrix.debian-versions }}-rust-${{ matrix.rust-versions }}-clang-${{ matrix.clang-versions }}"
build-args: |
DEBIAN_VERSION=${{ matrix.debian-versions }}
RUST_STABLE_VERSION=${{ matrix.rust-versions }}
CLANG_VERSION=${{ matrix.clang-versions }}
tags: ${{ env.FULL_IMAGE_NAME }},image-to-test:latest
- name: Switch to default Docker builder
run: docker buildx use default
- name: Build node to test Docker image
uses: docker/build-push-action@v5
with:
context: dockerfiles
file: dockerfiles/Dockerfile.test
push: false
pull: false
build-args: |
IMAGE_VERSION=image-to-test:latest
GIT_REF=polkadot-v1.1.0
tags: test-build-image
- name: Push Docker image
if: ${{ github.ref == 'refs/heads/main' }}
run: docker push ${{ env.FULL_IMAGE_NAME }}
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.amd64
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN set -eux && \
apt-get -y update && \
apt-get install --no-install-recommends -y curl ca-certificates && \
curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc && \
echo "deb http://apt.llvm.org/${DEBIAN_VERSION}/ llvm-toolchain-${DEBIAN_VERSION}-15 main" >> /etc/apt/sources.list.d/llvm-toolchain-${DEBIAN_VERSION}-15.list && \
echo "deb http://apt.llvm.org/${DEBIAN_VERSION}/ llvm-toolchain-${DEBIAN_VERSION}-$CLANG_VERSION main" >> /etc/apt/sources.list.d/llvm-toolchain-${DEBIAN_VERSION}-$CLANG_VERSION.list && \
apt-get -y update && \
apt-get install --no-install-recommends -y \
# tools
Expand Down
9 changes: 9 additions & 0 deletions dockerfiles/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ARG IMAGE_VERSION

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

0 comments on commit 8836212

Please sign in to comment.