Skip to content

Results 3

Results 3 #165

Workflow file for this run

name: Investigate Cahing
on:
push:
pull_request:
workflow_dispatch:
jobs:
builtin-cache-create:
strategy:
matrix:
repo: [ulule/loukoum, allegro/marathon-consul, decred/dcrstakepool, rancher/kontainer-engine]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: ${{ matrix.repo }}
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: "1.20.x"
cache: true
- name: get
run: |
go get
- name: build
run: |
go build
- name: stats
run: |
echo 'Build results size(Mb):'
du -m -s `go env GOCACHE`
echo 'Dependency results size(Mb):'
du -m -s `go env MODGOCACHE`
echo 'Lines is go.mod:'
wc -l go.mod
echo 'Lines is go.sum:'
wc -l go.sum
builtin-cache-use:
needs: builtin-cache-create
strategy:
matrix:
repo: [ulule/loukoum, allegro/marathon-consul, rancher/kontainer-engine, decred/dcrstakepool]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: ${{ matrix.repo }}
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: "1.20.x"
cache: true
- name: get
run: |
go get
- name: touch
run: |
find . -name '*.go' | while read f;do ls -la $f;echo "// $(date)" >> $f;N=$((N + 1));touch $f;echo $N;ls -la $f;if [[ $N -gt 10 ]];then break;fi done
- name: build
run: |
go build
action-cache-create:
strategy:
matrix:
repo: [ulule/loukoum, allegro/marathon-consul, rancher/kontainer-engine, decred/dcrstakepool]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: ${{ matrix.repo }}
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: "1.20.x"
cache: false
- name: Get Go cached paths
run: |
echo "cache=$(go env GOCACHE)" >> $GITHUB_ENV
echo "modcache=$(go env GOMODCACHE)" >> $GITHUB_ENV
repo=$(echo '${{ matrix.repo }}'|sed 's/\//-/')
echo "repo=${repo}" >> $GITHUB_ENV
- name: Create dependencies cache
uses: actions/cache@v3
with:
path: |
${{ env.modcache }}
key: action-cache-deps--${{ env.repo }}--${{ hashFiles('go.sum go.mod') }}
- name: Create intermediate built files cache
uses: actions/cache@v3
with:
path: |
${{ env.cache }}
key: action-cache-build--${{ env.repo }}--${{ hashFiles('**/*.go') }}
- name: get
run: |
go get
- name: build
run: |
go build
- name: stats
run: |
echo 'Build results size(Mb):'
du -m -s `go env GOCACHE`
echo 'Dependency results size(Mb):'
du -m -s `go env MODGOCACHE`
echo 'Lines is go.mod:'
wc -l go.mod
echo 'Lines is go.sum:'
wc -l go.sum
action-cache-use:
needs: action-cache-create
strategy:
matrix:
repo: [ulule/loukoum, allegro/marathon-consul, rancher/kontainer-engine, decred/dcrstakepool]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: ${{ matrix.repo }}
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: "1.20.x"
cache: false
- name: Get Go cached paths
run: |
echo "cache=$(go env GOCACHE)" >> $GITHUB_ENV
echo "modcache=$(go env GOMODCACHE)" >> $GITHUB_ENV
repo=$(echo '${{ matrix.repo }}'|sed 's/\//-/')
echo "repo=${repo}" >> $GITHUB_ENV
- name: Create dependencies cache
uses: actions/cache@v3
with:
path: |
${{ env.modcache }}
key: action-cache-deps--${{ env.repo }}--${{ hashFiles('go.sum go.mod') }}
- name: Create intermediate built files cache
uses: actions/cache@v3
with:
path: |
${{ env.cache }}
key: action-cache-build--${{ env.repo }}--${{ hashFiles('**/*.go') }}
- name: get
run: |
go get
- name: touch
run: |
find . -name '*.go' | while read f;do ls -la $f;echo "// $(date)" >> $f;N=$((N + 1));touch $f;echo $N;ls -la $f;if [[ $N -gt 10 ]];then break;fi done
- name: build
run: |
go build