From ce69a08eb6f6bc4ecb4d963ca77df4f170c00e4e Mon Sep 17 00:00:00 2001 From: levisingularity Date: Wed, 30 Oct 2024 17:22:51 -0300 Subject: [PATCH 01/14] das-node-55: Fix publish steps --- .github/workflows/publish-pypi.yml | 18 ++++++------------ Makefile | 4 ++-- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index f7a9d7c..1e39595 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -1,4 +1,5 @@ -name: Publish to PyPI +--- +name: Publish DAS Node to PyPI on: workflow_dispatch: @@ -32,19 +33,12 @@ jobs: - name: Update version run: sed -i "s/version=.*/version='${{ github.event.inputs.version }}',/" pyproject.toml - - - name: Build (Docker Image) - run: ./scripts/docker_image_build.sh + - name: Build bazel + run: make cpp-build - - name: Build (Bazel) - run: ./scripts/build.sh - - - name: Build (Docker Image Wheel) - run: ./scripts/docker_image_wheel.sh - - - name: Build (Wheel) - run: ./scripts/wheel.sh + - name: Build wheel package + run: make wheeler-build - name: Install twine run: pip install twine diff --git a/Makefile b/Makefile index 4560c6e..ef7fc0a 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ cpp-image: @./scripts/cpp_image.sh -cpp-build: +cpp-build: cpp-image @./scripts/cpp_build.sh cpp-test: @@ -13,7 +13,7 @@ cpp-test: wheeler-image: @./scripts/wheeler_image.sh -wheeler-build: +wheeler-build: wheeler-image @./scripts/wheeler_build.sh wheeler-test: From 8770cc535ffab1ce1bfc2422f9ae449e127a20e1 Mon Sep 17 00:00:00 2001 From: levisingularity Date: Wed, 30 Oct 2024 17:23:08 -0300 Subject: [PATCH 02/14] das-node-55: Add python and c++ tests --- .github/workflows/run-tests.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/run-tests.yml diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..61a1393 --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,31 @@ +--- +name: Run DAS Node tests + +on: + pull_request: + types: + - opened + - reopened + - edited + - synchronize + + workflow_dispatch: + +jobs: + cpp-tests: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Running tests + run: make cpp-test + + wheel-test: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Running tests + run: make wheeler-test From bc4cb1de3f46cfb83ffaa0e8efa9717c846cc759 Mon Sep 17 00:00:00 2001 From: levisingularity Date: Thu, 31 Oct 2024 00:29:49 -0300 Subject: [PATCH 03/14] das-node-55: build bazel in run-tests pipeline --- .github/workflows/run-tests.yml | 55 ++++++++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 61a1393..c0978f8 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -12,20 +12,67 @@ on: workflow_dispatch: jobs: + build-bazel: + runs-on: ubuntu-22.04 + steps: + - name: Checkout repository code + uses: actions/checkout@v4 + + - name: Build docker image + run: make cpp-image + + - name: Login to DockerHub + if: success() + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Push image to repository + run: |- + docker tag das-node-builder:latest ghcr.io/das-node-builder:${{ github.sha }} + docker push ghcr.io/das-node-builder:${{ github.sha }} + cpp-tests: runs-on: ubuntu-22.04 + needs: build-bazel steps: - - name: Checkout + - name: Checkout repository code uses: actions/checkout@v4 - - name: Running tests + - name: Login to DockerHub + if: success() + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Pull docker image from registry + run: |- + docker pull ghcr.io/das-node-builder:${{ github.sha }} + docker tag ghcr.io/das-node-builder:${{ github.sha }} das-node-builder:latest + + - name: Run cpp tests run: make cpp-test wheel-test: runs-on: ubuntu-22.04 + needs: build-bazel steps: - - name: Checkout + - name: Checkout repository code uses: actions/checkout@v4 - - name: Running tests + - name: Login to DockerHub + if: success() + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Pull docker image from registry + run: |- + docker pull ghcr.io/das-node-builder:${{ github.sha }} + docker tag ghcr.io/das-node-builder:${{ github.sha }} das-node-builder:latest + + - name: Run python tests run: make wheeler-test From cfc40168d2bf6de61f57856502412f6dafb5d2c8 Mon Sep 17 00:00:00 2001 From: levisingularity Date: Thu, 31 Oct 2024 08:43:19 -0300 Subject: [PATCH 04/14] das-node-55: Update github registry --- .github/workflows/run-tests.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index c0978f8..52e9d82 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -21,12 +21,13 @@ jobs: - name: Build docker image run: make cpp-image - - name: Login to DockerHub + - name: Login to Github Registry if: success() uses: docker/login-action@v1 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Push image to repository run: |- @@ -40,12 +41,13 @@ jobs: - name: Checkout repository code uses: actions/checkout@v4 - - name: Login to DockerHub + - name: Login to Github Registry if: success() uses: docker/login-action@v1 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Pull docker image from registry run: |- @@ -62,12 +64,13 @@ jobs: - name: Checkout repository code uses: actions/checkout@v4 - - name: Login to DockerHub + - name: Login to Github Registry if: success() uses: docker/login-action@v1 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Pull docker image from registry run: |- From d6568cc39260580321f4a2b90c05cc33f37b3ed9 Mon Sep 17 00:00:00 2001 From: levisingularity Date: Thu, 31 Oct 2024 09:27:34 -0300 Subject: [PATCH 05/14] das-node-55: Fix github repository image --- .github/workflows/run-tests.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 52e9d82..9ec32a5 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -31,8 +31,8 @@ jobs: - name: Push image to repository run: |- - docker tag das-node-builder:latest ghcr.io/das-node-builder:${{ github.sha }} - docker push ghcr.io/das-node-builder:${{ github.sha }} + docker tag das-node-builder:latest ghcr.io/${{ github.repository_owner }}/das-node-builder:${{ github.sha }} + docker push ghcr.io/${{ github.repository_owner }}/das-node-builder:${{ github.sha }} cpp-tests: runs-on: ubuntu-22.04 @@ -51,8 +51,8 @@ jobs: - name: Pull docker image from registry run: |- - docker pull ghcr.io/das-node-builder:${{ github.sha }} - docker tag ghcr.io/das-node-builder:${{ github.sha }} das-node-builder:latest + docker pull ghcr.io/${{ github.repository_owner }}/das-node-builder:${{ github.sha }} + docker tag ghcr.io/${{ github.repository_owner }}/das-node-builder:${{ github.sha }} das-node-builder:latest - name: Run cpp tests run: make cpp-test @@ -74,8 +74,8 @@ jobs: - name: Pull docker image from registry run: |- - docker pull ghcr.io/das-node-builder:${{ github.sha }} - docker tag ghcr.io/das-node-builder:${{ github.sha }} das-node-builder:latest + docker pull ghcr.io/${{ github.repository_owner }}/das-node-builder:${{ github.sha }} + docker tag ghcr.io/${{ github.repository_owner }}/das-node-builder:${{ github.sha }} das-node-builder:latest - name: Run python tests run: make wheeler-test From 57f28d1e1a71a5ac62f90d859e93ff00f6b87e1b Mon Sep 17 00:00:00 2001 From: levisingularity Date: Thu, 31 Oct 2024 11:34:27 -0300 Subject: [PATCH 06/14] das-node-55: Update pipeline --- .github/workflows/run-tests.yml | 56 ++++++++++++++++++++++++++++++++- Makefile | 4 +-- 2 files changed, 57 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 9ec32a5..b42a214 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -34,6 +34,20 @@ jobs: docker tag das-node-builder:latest ghcr.io/${{ github.repository_owner }}/das-node-builder:${{ github.sha }} docker push ghcr.io/${{ github.repository_owner }}/das-node-builder:${{ github.sha }} + - name: Build bazel + run: make cpp-build + + - name: Cache build and bazel_assets directories + uses: actions/cache@v3 + with: + path: | + build + bazel_assets + key: ${{ runner.os }}-cpp-build-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('**/*.cpp') }} + restore-keys: | + ${{ runner.os }}-cpp-build-${{ hashFiles('**/CMakeLists.txt') }} + ${{ runner.os }}-cpp-build + cpp-tests: runs-on: ubuntu-22.04 needs: build-bazel @@ -57,9 +71,29 @@ jobs: - name: Run cpp tests run: make cpp-test + build-wheeler: + runs-on: ubuntu-22.04 + steps: + - name: Checkout repository code + uses: actions/checkout@v4 + + - name: Build docker image + run: make wheeler-image + + - name: Build Wheeler + run: make wheeler-build + + - name: Upload wheeler artifacts + uses: actions/upload-artifact@v4 + with: + name: wheelers + path: wheelhouse/* + wheel-test: runs-on: ubuntu-22.04 - needs: build-bazel + needs: + - build-bazel + - build-wheeler steps: - name: Checkout repository code uses: actions/checkout@v4 @@ -77,5 +111,25 @@ jobs: docker pull ghcr.io/${{ github.repository_owner }}/das-node-builder:${{ github.sha }} docker tag ghcr.io/${{ github.repository_owner }}/das-node-builder:${{ github.sha }} das-node-builder:latest + - name: Cache build and bazel_assets directories + uses: actions/cache@v3 + with: + path: | + build + bazel_assets + key: ${{ runner.os }}-cpp-build-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('**/*.cpp') }} + restore-keys: | + ${{ runner.os }}-cpp-build-${{ hashFiles('**/CMakeLists.txt') }} + ${{ runner.os }}-cpp-build + + - name: Download wheeler artifacts + uses: actions/download-artifact@v3 + with: + name: wheelers + path: wheelhouse + + - name: Install Python dependencies + run: pip install wheelhouse/* + - name: Run python tests run: make wheeler-test diff --git a/Makefile b/Makefile index ef7fc0a..4a8ab4d 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ cpp-image: @./scripts/cpp_image.sh -cpp-build: cpp-image +cpp-build: @./scripts/cpp_build.sh cpp-test: @@ -13,7 +13,7 @@ cpp-test: wheeler-image: @./scripts/wheeler_image.sh -wheeler-build: wheeler-image +wheeler-build: @./scripts/wheeler_build.sh wheeler-test: From 0d8e323be05a039ca24833787b8526d09602928c Mon Sep 17 00:00:00 2001 From: levisingularity Date: Thu, 31 Oct 2024 11:40:25 -0300 Subject: [PATCH 07/14] das-node-55: Get cache wheeler --- .github/workflows/run-tests.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index b42a214..b7dd47b 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -73,6 +73,7 @@ jobs: build-wheeler: runs-on: ubuntu-22.04 + needs: build-bazel steps: - name: Checkout repository code uses: actions/checkout@v4 @@ -80,7 +81,18 @@ jobs: - name: Build docker image run: make wheeler-image - - name: Build Wheeler + - name: Cache build and bazel_assets directories + uses: actions/cache@v3 + with: + path: | + build + bazel_assets + key: ${{ runner.os }}-cpp-build-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('**/*.cpp') }} + restore-keys: | + ${{ runner.os }}-cpp-build-${{ hashFiles('**/CMakeLists.txt') }} + ${{ runner.os }}-cpp-build + + - name: Build wheeler run: make wheeler-build - name: Upload wheeler artifacts From 7187c44c439b7dfb2b89613d23181d0f4f77c3f1 Mon Sep 17 00:00:00 2001 From: levisingularity Date: Thu, 31 Oct 2024 13:41:05 -0300 Subject: [PATCH 08/14] das-node-55: Fix wheel dist --- .github/workflows/run-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index b7dd47b..f36b442 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -99,7 +99,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: wheelers - path: wheelhouse/* + path: dist/* wheel-test: runs-on: ubuntu-22.04 @@ -138,10 +138,10 @@ jobs: uses: actions/download-artifact@v3 with: name: wheelers - path: wheelhouse + path: dist - name: Install Python dependencies - run: pip install wheelhouse/* + run: pip install dist/*.whl - name: Run python tests run: make wheeler-test From 6b9be92fa0035e774998423b1a30649293e782f8 Mon Sep 17 00:00:00 2001 From: levisingularity Date: Thu, 31 Oct 2024 15:30:38 -0300 Subject: [PATCH 09/14] 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 \ From 96e27809f5a892c90ba109b07e5a08a130e2191c Mon Sep 17 00:00:00 2001 From: levisingularity Date: Thu, 31 Oct 2024 16:15:20 -0300 Subject: [PATCH 10/14] das-node-55: cache --- .github/workflows/run-tests.yml | 15 ++++++--------- Makefile | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 771d9c6..0d9d7b4 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -44,10 +44,9 @@ jobs: build bazel_assets docker/volumes/bazel_cache - key: ${{ runner.os }}-cpp-build-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('**/*.cpp') }} + key: ${{ runner.os }}-cpp-build-${{ github.sha }} restore-keys: | - ${{ runner.os }}-cpp-build-${{ hashFiles('**/CMakeLists.txt') }} - ${{ runner.os }}-cpp-build + ${{ runner.os }}-cpp-build-${{ github.sha }} cpp-tests: runs-on: ubuntu-22.04 @@ -88,10 +87,9 @@ jobs: path: | build bazel_assets - key: ${{ runner.os }}-cpp-build-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('**/*.cpp') }} + key: ${{ runner.os }}-cpp-build-${{ github.sha }} restore-keys: | - ${{ runner.os }}-cpp-build-${{ hashFiles('**/CMakeLists.txt') }} - ${{ runner.os }}-cpp-build + ${{ runner.os }}-cpp-build-${{ github.sha }} - name: Build wheeler run: make wheeler-build @@ -130,10 +128,9 @@ jobs: path: | build bazel_assets - key: ${{ runner.os }}-cpp-build-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('**/*.cpp') }} + key: ${{ runner.os }}-cpp-build-${{ github.sha }} restore-keys: | - ${{ runner.os }}-cpp-build-${{ hashFiles('**/CMakeLists.txt') }} - ${{ runner.os }}-cpp-build + ${{ runner.os }}-cpp-build-${{ github.sha }} - name: Download wheeler artifacts uses: actions/download-artifact@v4 diff --git a/Makefile b/Makefile index 62b4dc4..5b960c8 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ cpp-test: wheeler-image: @./scripts/wheeler_image.sh -wheeler-build: +wheeler-build: @./scripts/wheeler_build.sh wheeler-test: From 52f01d068821987553853ab8bec9e7d5f44c2376 Mon Sep 17 00:00:00 2001 From: levisingularity Date: Thu, 31 Oct 2024 23:57:59 -0300 Subject: [PATCH 11/14] das-node-55: Update run-tests pipeline --- .github/workflows/run-tests.yml | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 0d9d7b4..d835eda 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -41,9 +41,9 @@ jobs: uses: actions/cache@v3 with: path: | - build - bazel_assets - docker/volumes/bazel_cache + ./build + ./bazel_assets + ./docker/volumes/bazel_cache key: ${{ runner.os }}-cpp-build-${{ github.sha }} restore-keys: | ${{ runner.os }}-cpp-build-${{ github.sha }} @@ -68,6 +68,17 @@ jobs: docker pull ghcr.io/${{ github.repository_owner }}/das-node-builder:${{ github.sha }} docker tag ghcr.io/${{ github.repository_owner }}/das-node-builder:${{ github.sha }} das-node-builder:latest + - name: Cache build and bazel_assets directories + uses: actions/cache@v3 + with: + path: | + ./build + ./bazel_assets + ./docker/volumes/bazel_cache + key: ${{ runner.os }}-cpp-build-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-cpp-build-${{ github.sha }} + - name: Run cpp tests run: make cpp-test @@ -78,19 +89,20 @@ jobs: - name: Checkout repository code uses: actions/checkout@v4 - - name: Build docker image - run: make wheeler-image - - name: Cache build and bazel_assets directories uses: actions/cache@v3 with: path: | - build - bazel_assets + ./build + ./bazel_assets + ./docker/volumes/bazel_cache key: ${{ runner.os }}-cpp-build-${{ github.sha }} restore-keys: | ${{ runner.os }}-cpp-build-${{ github.sha }} + - name: Build docker image + run: make wheeler-image + - name: Build wheeler run: make wheeler-build @@ -126,8 +138,9 @@ jobs: uses: actions/cache@v3 with: path: | - build - bazel_assets + ./build + ./bazel_assets + ./docker/volumes/bazel_cache key: ${{ runner.os }}-cpp-build-${{ github.sha }} restore-keys: | ${{ runner.os }}-cpp-build-${{ github.sha }} From 8cf076b0e2965bf7cdd2139e9f53e5049a434a12 Mon Sep 17 00:00:00 2001 From: levisingularity Date: Fri, 1 Nov 2024 01:20:30 -0300 Subject: [PATCH 12/14] das-node-55: Give permissions --- .github/workflows/run-tests.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index d835eda..49c15da 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -37,11 +37,15 @@ jobs: - name: Build bazel run: make cpp-build + - name: Give permissions + run: |- + sudo chmod 777 bazel_assets/ -R + sudo chmod 777 docker/volumes -R + - name: Cache build and bazel_assets directories uses: actions/cache@v3 with: path: | - ./build ./bazel_assets ./docker/volumes/bazel_cache key: ${{ runner.os }}-cpp-build-${{ github.sha }} @@ -72,7 +76,6 @@ jobs: uses: actions/cache@v3 with: path: | - ./build ./bazel_assets ./docker/volumes/bazel_cache key: ${{ runner.os }}-cpp-build-${{ github.sha }} @@ -93,7 +96,6 @@ jobs: uses: actions/cache@v3 with: path: | - ./build ./bazel_assets ./docker/volumes/bazel_cache key: ${{ runner.os }}-cpp-build-${{ github.sha }} @@ -138,7 +140,6 @@ jobs: uses: actions/cache@v3 with: path: | - ./build ./bazel_assets ./docker/volumes/bazel_cache key: ${{ runner.os }}-cpp-build-${{ github.sha }} From 3bb5aa0712c9a306c772a08751acebcca28dfb3b Mon Sep 17 00:00:00 2001 From: levisingularity Date: Fri, 1 Nov 2024 10:04:55 -0300 Subject: [PATCH 13/14] das-node-55: Set permissions for cache --- .github/workflows/run-tests.yml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 49c15da..c2d080e 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -37,10 +37,10 @@ jobs: - name: Build bazel run: make cpp-build - - name: Give permissions - run: |- - sudo chmod 777 bazel_assets/ -R - sudo chmod 777 docker/volumes -R + - name: Set permissions for cached directories + run: | + sudo chmod -R 777 ./bazel_assets + sudo chmod -R 777 ./docker/volumes/ - name: Cache build and bazel_assets directories uses: actions/cache@v3 @@ -82,6 +82,11 @@ jobs: restore-keys: | ${{ runner.os }}-cpp-build-${{ github.sha }} + - name: Set permissions for cached directories + run: | + sudo chmod -R 777 ./bazel_assets + sudo chmod -R 777 ./docker/volumes/ + - name: Run cpp tests run: make cpp-test @@ -102,6 +107,11 @@ jobs: restore-keys: | ${{ runner.os }}-cpp-build-${{ github.sha }} + - name: Set permissions for cached directories + run: | + sudo chmod -R 777 ./bazel_assets + sudo chmod -R 777 ./docker/volumes/ + - name: Build docker image run: make wheeler-image @@ -146,6 +156,11 @@ jobs: restore-keys: | ${{ runner.os }}-cpp-build-${{ github.sha }} + - name: Set permissions for cached directories + run: | + sudo chmod -R 777 ./bazel_assets + sudo chmod -R 777 ./docker/volumes/ + - name: Download wheeler artifacts uses: actions/download-artifact@v4 with: From 3c8c3ddc02797594069c5354de45fd37763bc798 Mon Sep 17 00:00:00 2001 From: levisingularity Date: Fri, 1 Nov 2024 17:15:03 -0300 Subject: [PATCH 14/14] das-node-55: Update volume owner --- .github/workflows/run-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index c2d080e..6a6ba23 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -84,8 +84,8 @@ jobs: - name: Set permissions for cached directories run: | - sudo chmod -R 777 ./bazel_assets - sudo chmod -R 777 ./docker/volumes/ + sudo chown root:root -R ./bazel_assets + sudo chown root:root -R ./docker/volumes/ - name: Run cpp tests run: make cpp-test