Skip to content

Commit

Permalink
uncomment
Browse files Browse the repository at this point in the history
  • Loading branch information
0xverin committed Dec 20, 2023
1 parent 059a2ae commit 77c8237
Showing 1 changed file with 69 additions and 69 deletions.
138 changes: 69 additions & 69 deletions .github/workflows/create-release-draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,77 +182,77 @@ jobs:
WORKER_TAG=$(echo ${{ env.RELEASE_TAG }} | cut -d'-' -f3- | sed 's/w/v/')
echo "WORKER_TAG=$WORKER_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: 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: Cache worker-cache
# uses: actions/cache@v3
# with:
# path: |
# worker-cache
# key: worker-cache-${{ env.REF_VERSION }}-${{ hashFiles('tee-worker/**/Cargo.lock', 'tee-worker/**/Cargo.toml') }}
# restore-keys: |
# worker-cache-${{ env.REF_VERSION }}-
# worker-cache-

# - name: Create cache folder if not exist
# run: |
# for i in 'git/db' 'registry/cache' 'registry/index' 'sccache'; do
# [ ! -d "worker-cache/$i" ] && mkdir -p "worker-cache/$i" || true
# echo "hello" > worker-cache/$i/nix
# done
# echo "::group::List worker-cache size"
# du -sh worker-cache/*
# echo "::endgroup::"
# echo "::group::Show disk usage"
# df -h .
# echo "::endgroup::"

# - 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=
- name: Cache worker-cache
uses: actions/cache@v3
with:
path: |
worker-cache
key: worker-cache-${{ env.REF_VERSION }}-${{ hashFiles('tee-worker/**/Cargo.lock', 'tee-worker/**/Cargo.toml') }}
restore-keys: |
worker-cache-${{ env.REF_VERSION }}-
worker-cache-
- name: Create cache folder if not exist
run: |
for i in 'git/db' 'registry/cache' 'registry/index' 'sccache'; do
[ ! -d "worker-cache/$i" ] && mkdir -p "worker-cache/$i" || true
echo "hello" > worker-cache/$i/nix
done
echo "::group::List worker-cache size"
du -sh worker-cache/*
echo "::endgroup::"
echo "::group::Show disk usage"
df -h .
echo "::endgroup::"
- 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=
# - name: Copy caches from the built image
# run: |
# echo "::group::Show disk usage"
# df -h .
# echo "::endgroup::"
# echo "::group::docker images"
# docker images --all
# echo "::endgroup::"
# echo "::group::copy cache out"
# for i in 'git/db' 'registry/cache' 'registry/index'; do
# b="${i%/*}"
# rm -rf worker-cache/$i
# docker cp "$(docker create --rm local-builder:latest):/opt/rust/$i" worker-cache/$b
# done
# rm -rf worker-cache/sccache
# docker cp "$(docker create --rm local-builder:latest):/opt/rust/sccache" worker-cache
# du -sh worker-cache/*
# echo "::endgroup::"
# echo "::group::df -h ."
# df -h .
# echo "::endgroup::"
- name: Copy caches from the built image
run: |
echo "::group::Show disk usage"
df -h .
echo "::endgroup::"
echo "::group::docker images"
docker images --all
echo "::endgroup::"
echo "::group::copy cache out"
for i in 'git/db' 'registry/cache' 'registry/index'; do
b="${i%/*}"
rm -rf worker-cache/$i
docker cp "$(docker create --rm local-builder:latest):/opt/rust/$i" worker-cache/$b
done
rm -rf worker-cache/sccache
docker cp "$(docker create --rm local-builder:latest):/opt/rust/sccache" worker-cache
du -sh worker-cache/*
echo "::endgroup::"
echo "::group::df -h ."
df -h .
echo "::endgroup::"
- name: Build worker
uses: docker/build-push-action@v5
Expand Down

0 comments on commit 77c8237

Please sign in to comment.