Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cache in rebuild #239

Merged
merged 1 commit into from
Jan 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions .github/workflows/rebuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
schedule:
- cron: '30 2 * * *'

env:
DOCKER_BUILDKIT: '1'

jobs:
main:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -40,8 +43,30 @@ jobs:
- name: Checks
run: c2cciutils-checks

- run: make pull
- run: make build
- name: Cache
uses: actions/cache@v2
with:
key: docker-cache
path: /tmp/docker/cache
- name: Fill the cache
run: |
mkdir -p /tmp/docker/cache/.ccache
mkdir cache
cp -ar /tmp/docker/cache/.ccache cache
touch cache/.ccache/a-file
docker build --file=Dockerfile-fillcache .
rm -rf cache

- run: make build-server
- run: make build-desktop
- run: make build-cache

- name: Extract cache
run: |
docker run --rm --detach --name=cache qgis-cache
docker cp cache:/.ccache /tmp/docker/cache
docker stop cache

- run: make run
- run: make acceptance
- run: (cd acceptance_tests; docker-compose logs)
Expand Down