Skip to content

Commit

Permalink
debug without buildx
Browse files Browse the repository at this point in the history
  • Loading branch information
Traf333 committed Jan 24, 2024
1 parent a0bd795 commit c03f8b3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 35 deletions.
31 changes: 3 additions & 28 deletions .github/workflows/create-release-draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,41 +181,16 @@ jobs:
WORKER_DOCKER_TAG=$(echo ${{ env.RELEASE_TAG }} | sed 's/.*\(w.*\)/\1/;s/w/v/')
echo "WORKER_DOCKER_TAG=$WORKER_DOCKER_TAG" >> $GITHUB_ENV
- name: Free up disk space
if: startsWith(runner.name, 'GitHub Actions')
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
swap-storage: false
large-packages: false

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
# use the docker driver to access the local image
# we don't need external caches or multi platforms here
# see https://docs.docker.com/build/drivers/
driver: docker

- name: Build local builder
uses: docker/build-push-action@v5
with:
context: .
file: tee-worker/build.Dockerfile
tags: local-builder:latest
target: builder
build-args: |
WORKER_MODE_ARG=sidechain
ADDITIONAL_FEATURES_ARG=
IMAGE_FOR_RELEASE=true
- name: Build worker
uses: docker/build-push-action@v5
with:
context: .
file: tee-worker/build.Dockerfile
tags: litentry/litentry-worker:${{ env.WORKER_DOCKER_TAG }}
target: deployed-worker
build-args: |
WORKER_MODE_ARG=sidechain
IMAGE_FOR_RELEASE=true
- name: Build cli
uses: docker/build-push-action@v5
Expand Down
16 changes: 9 additions & 7 deletions tee-worker/build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,21 @@ ARG FINGERPRINT=none
WORKDIR $HOME/tee-worker
COPY . $HOME

RUN echo "IMAGE_FOR_RELEASE: $IMAGE_FOR_RELEASE"
RUN \
if [ "$IMAGE_FOR_RELEASE" = "true" ]; then \
echo "Omit chache for release image"; \
make;
echo "Omit cache for release image"; \
make; \
else \
rm -rf /opt/rust/registry/cache && mv /home/ubuntu/worker-cache/registry/cache /opt/rust/registry && \
rm -rf /opt/rust/registry/index && mv /home/ubuntu/worker-cache/registry/index /opt/rust/registry && \
rm -rf /opt/rust/git/db && mv /home/ubuntu/worker-cache/git/db /opt/rust/git && \
rm -rf /opt/rust/sccache && mv /home/ubuntu/worker-cache/sccache /opt/rust && \
make && sccache --show-stats;
rm -rf /opt/rust/registry/cache && mv /home/ubuntu/worker-cache/registry/cache /opt/rust/registry && \
rm -rf /opt/rust/registry/index && mv /home/ubuntu/worker-cache/registry/index /opt/rust/registry && \
rm -rf /opt/rust/git/db && mv /home/ubuntu/worker-cache/git/db /opt/rust/git && \
rm -rf /opt/rust/sccache && mv /home/ubuntu/worker-cache/sccache /opt/rust && \
make && sccache --show-stats; \
fi



RUN cargo test --release


Expand Down

0 comments on commit c03f8b3

Please sign in to comment.