From 6b9be92fa0035e774998423b1a30649293e782f8 Mon Sep 17 00:00:00 2001 From: levisingularity Date: Thu, 31 Oct 2024 15:30:38 -0300 Subject: [PATCH] das-node-55: use bind volume for bazel cache --- .github/workflows/run-tests.yml | 3 ++- .gitignore | 1 + Makefile | 3 +-- scripts/cpp_build.sh | 2 +- scripts/cpp_test.sh | 2 +- scripts/wheeler_test.sh | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index f36b442..771d9c6 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -43,6 +43,7 @@ jobs: path: | build bazel_assets + docker/volumes/bazel_cache key: ${{ runner.os }}-cpp-build-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('**/*.cpp') }} restore-keys: | ${{ runner.os }}-cpp-build-${{ hashFiles('**/CMakeLists.txt') }} @@ -135,7 +136,7 @@ jobs: ${{ runner.os }}-cpp-build - name: Download wheeler artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: wheelers path: dist diff --git a/.gitignore b/.gitignore index ddb9b24..17ddd61 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ share/python-wheels/ .installed.cfg *.egg MANIFEST +docker/volumes/ # PyInstaller # Usually these files are written by a python script from a template diff --git a/Makefile b/Makefile index 4a8ab4d..62b4dc4 100644 --- a/Makefile +++ b/Makefile @@ -27,5 +27,4 @@ test-all: test-cpp test-python # Clean docker volumes and build directories clean: - @docker volume rm bazel_cache - @rm -rf src/bazel-* bazel_assets build dist + @rm -rf src/bazel-* bazel_assets build dist docker/volmes/bazel_cache diff --git a/scripts/cpp_build.sh b/scripts/cpp_build.sh index 80929eb..33d9cfe 100755 --- a/scripts/cpp_build.sh +++ b/scripts/cpp_build.sh @@ -5,7 +5,7 @@ CONTAINER_NAME="das-node-build" docker run \ --rm \ --name=$CONTAINER_NAME \ - --mount type=volume,source=bazel_cache,target=/root/.cache/bazel \ + --volume ./docker/volumes/bazel_cache:/root/.cache/bazel \ --volume .:/opt/hyperon_das_node \ --workdir /opt/hyperon_das_node/src \ das-node-builder \ diff --git a/scripts/cpp_test.sh b/scripts/cpp_test.sh index 5f6a997..ea65310 100755 --- a/scripts/cpp_test.sh +++ b/scripts/cpp_test.sh @@ -5,7 +5,7 @@ CONTAINER_NAME="das-node-cpp-test" docker run \ --rm \ --name=$CONTAINER_NAME \ - --mount type=volume,source=bazel_cache,target=/root/.cache/bazel \ + --volume ./docker/volumes/bazel_cache:/root/.cache/bazel \ --volume .:/opt/hyperon_das_node \ --workdir /opt/hyperon_das_node/src \ das-node-builder \ diff --git a/scripts/wheeler_test.sh b/scripts/wheeler_test.sh index e41981b..06a2071 100755 --- a/scripts/wheeler_test.sh +++ b/scripts/wheeler_test.sh @@ -9,7 +9,7 @@ CONTAINER_NAME="das-node-wheeler-test" docker run \ --rm \ --name=$CONTAINER_NAME \ - --mount type=volume,source=bazel_cache,target=/root/.cache/bazel \ + --volume ./docker/volumes/bazel_cache:/root/.cache/bazel \ --volume .:/opt/hyperon_das_node \ --workdir /opt/hyperon_das_node \ das-node-builder \