Skip to content

Commit

Permalink
new build kagome pipeline - activate cache
Browse files Browse the repository at this point in the history
  • Loading branch information
qdrvm-ci committed Jun 23, 2024
1 parent 67d11e7 commit ecfce8a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/zombie-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,25 @@ env:
KAGOME_IN_DOCKER: 1
CTEST_OUTPUT_ON_FAILURE: 1

# CACHE_VERSION: v07
# CACHE_PATHS: |
# ~/Library/Caches/pip
# ~/.cargo
# ~/.ccache
# ~/.hunter
# ~/.rustup
CACHE_VERSION: v01
CACHE_PATH: ./build/cache

jobs:
building_binaries:
kagome_dev_docker_build:
runs-on: [ actions-runner-controller ]
timeout-minutes: 120
timeout-minutes: 180

steps:
- name: Checkout repository
- name: "Checkout repository"
uses: actions/checkout@v4

- name: "Cache dependencies"
uses: actions/cache@v4
with:
path: ${{ env.CACHE_PATH }}
key: ${{ github.job }}-${{ env.CACHE_VERSION }}
save-always: true

- name: "Authenticate with Google Cloud"
uses: 'google-github-actions/auth@v2'
with:
Expand Down
8 changes: 8 additions & 0 deletions housekeeping/docker/kagome-dev/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ CTEST_OUTPUT_ON_FAILURE ?= 1

# Debug, Release, RelWithDebInfo
BUILD_TYPE ?= Release

BUILD_DIR ?= build
CACHE_DIR := $(shell pwd)/../../../../kagome/$(BUILD_DIR)/cache
WORKING_DIR := $(shell pwd)/../../../../kagome

export DOCKER_BUILDKIT=1
# BUILDKIT_PROGRESS - auto, plain, tty, rawjson
Expand All @@ -46,6 +49,7 @@ kagome_builder_deb_push:
docker push $(DOCKER_REGISTRY_PATH)kagome_builder_deb:latest

kagome_dev_docker_build:
mkdir -p $(CACHE_DIR)/.cargo $(CACHE_DIR)/.hunter $(CACHE_DIR)/.cache/ccache $(CACHE_DIR)/.rustup ; \
CONTAINER_NAME=kagome_dev_build_$$(openssl rand -hex 6); \
SHORT_COMMIT_HASH=$$(grep 'short_commit_hash:' commit_hash.txt | cut -d ' ' -f 2); \
BUILD_THREADS=$$(nproc 2>/dev/null || sysctl -n hw.ncpu); \
Expand All @@ -64,6 +68,10 @@ kagome_dev_docker_build:
-e CTEST_OUTPUT_ON_FAILURE=$(CTEST_OUTPUT_ON_FAILURE) \
-v $$(pwd)/../../../../kagome:/opt/kagome \
-v $(GOOGLE_APPLICATION_CREDENTIALS):/root/.gcp/google_creds.json \
-v $(CACHE_DIR)/.cargo:/root/.cargo \
-v $(CACHE_DIR)/.hunter:/root/.hunter \
-v $(CACHE_DIR)/.cache/ccache:/root/.cache/ccache \
-v $(CACHE_DIR)/.rustup:/root/.rustup \
$(DOCKER_REGISTRY_PATH)kagome_builder_deb:$(MINIDEB_TAG) \
-c "tail -f /dev/null"; \
docker exec -t $$CONTAINER_NAME /bin/bash -c \
Expand Down
Empty file modified housekeeping/docker/kagome-dev/build_apt_package.sh
100644 → 100755
Empty file.

0 comments on commit ecfce8a

Please sign in to comment.