A script to downloads the contents of the local ccache cache from a Redis remote storage.
Project description
ccache-upload-redis / ccache-download-redis GitHub Action
An GitHub Action for using ccache-upload-redis / ccache-download-redis to uploads / downloads the contents of the local ccache cache from a Redis remote storage.
Usage
name: Test ccache-download-upload-redis
on:
workflow_dispatch:
jobs:
# Label of the container job
container-job:
# Containers must run in Linux based operating systems
runs-on: ubuntu-latest
# Service containers to run with `container-job`
services:
# Label used to access the service container
redis:
# Docker Hub image
image: redis:7.0.10-alpine3.17
# Set health checks to wait until redis has started
options: >-
--interactive
--hostname redis
--add-host=host.docker.internal:host-gateway
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
--restart always
ports:
- 6379/tcp
# get the rendom port via ${{ job.services.redis.ports['6379'] }}
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idservices
# https://docs.github.com/en/actions/learn-github-actions/contexts#job-context
# Maps port 6379 on service container to the host
#- 6379:6379
steps:
- name: "Set some redis settings"
run: |
docker network ls
docker network ls --format='{{.ID }} {{.Name}}'
docker inspect ${{ job.services.redis.id }}
docker exec ${{ job.services.redis.id }} /bin/sh -c 'echo "cat /etc/redis/redis.conf ||:" '
docker exec ${{ job.services.redis.id }} /bin/sh -x -c 'mkdir -p /etc/redis ||: '
docker exec ${{ job.services.redis.id }} /bin/sh -x -c 'echo "save 60 100" >> /etc/redis/redis.conf'
docker exec ${{ job.services.redis.id }} /bin/sh -x -c 'echo "loglevel verbose" >> /etc/redis/redis.conf'
docker exec ${{ job.services.redis.id }} /bin/sh -x -c 'echo "# see https://github.community/t/how-do-i-properly-override-a-service-entrypoint/17435/8" >> /etc/redis/redis.conf'
docker exec ${{ job.services.redis.id }} /bin/sh -x -c 'echo "# https://hub.docker.com/_/redis" >> /etc/redis/redis.conf'
docker kill --signal=SIGHUP ${{ job.services.redis-y9g98g58d.id }} ||:
- name: Checkout repository
uses: actions/checkout@v3
- upload-test: "upload-test"
run: |
ccache-upload-redis
env: |
REDIS_CONF='localhost:${{ job.services.redis.ports['6379'] }}'
CCACHE_DIR='~/.cache/ccache'
- download-test: "download-test"
run: |
ccache-download-redis
env: |
REDIS_CONF='localhost:${{ job.services.redis.ports['6379'] }}'
CCACHE_DIR='~/.cache/ccache'
- name: Connect REDIS
uses: ./
with:
host: ${{ variable.REDIS_SERVER }}
username: ${{ variable.USERNAME }}
password: ${{ variable.PASSWORD }}
ccachedir: ${{ variable.CCACHEDIR }}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ccache_download_redis-0.2.0.tar.gz
.
File metadata
- Download URL: ccache_download_redis-0.2.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.9.2 Linux/5.10.0-21-amd64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9decee2f3ef19a68f8092b756b41b937f53c8203d7f03e9344b4752b223cece0 |
|
MD5 | cc06d01c8a28d928aac1feadb34efcf7 |
|
BLAKE2b-256 | 5a4255ab23914a0464da0901b54dd0c6174b4da334e9bc5dbd3cfaca23fb222d |
File details
Details for the file ccache_download_redis-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: ccache_download_redis-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.9.2 Linux/5.10.0-21-amd64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd8752601b42966dc86245c919d8681b0aef5581c1d491d85d846e03367d1450 |
|
MD5 | 081e2ac0aafffa200a9b9c890df0179c |
|
BLAKE2b-256 | 35b283ea0c34167dcabeda0bf3eb32a732e38ff9577efebdaefff9ca914348b9 |