File tree 3 files changed +80
-21
lines changed
3 files changed +80
-21
lines changed Original file line number Diff line number Diff line change
1
+ name : Cache performance testing
2
+
3
+ # Only run manually: the purpose of this test is to check how much (if at all)
4
+ # using the caches helps, and that's not something that needs doing often, and
5
+ # it is something that's time consuming.
6
+ on : workflow_dispatch
7
+
8
+ # Avoid running at the same time as other actions that interfere with caches,
9
+ # to avoid pollution.
10
+ concurrency : caches
11
+
12
+ jobs :
13
+ clear-caches :
14
+ uses : ./.github/workflows/clear-caches.yml
15
+ permissions :
16
+ actions : write
17
+
18
+ # There should now be no cache, so we can test how long it takes to do an
19
+ # install without a cache while building the cache for the later action.
20
+ install-without-cache :
21
+ runs-on : windows-latest
22
+ needs : clear-caches
23
+ steps :
24
+ - name : Checkout
25
+ uses : actions/checkout@v3
26
+
27
+ - name : Install a large set of Cygwin packages
28
+ uses : ./
29
+ with :
30
+ packages : >
31
+ biber doxygen evolution kde-dev-utils
32
+ mkvtoolnix-debuginfo nghttp x11vnc
33
+ package-cache : saveonly
34
+
35
+ install-with-cache :
36
+ runs-on : windows-latest
37
+ needs : install-without-cache
38
+ steps :
39
+ - name : Checkout
40
+ uses : actions/checkout@v3
41
+
42
+ - name : Install a large set of Cygwin packages
43
+ uses : ./
44
+ with :
45
+ packages : >
46
+ biber doxygen evolution kde-dev-utils
47
+ mkvtoolnix-debuginfo nghttp x11vnc
48
+ package-cache : enabled
Original file line number Diff line number Diff line change @@ -8,29 +8,9 @@ concurrency: caches
8
8
9
9
jobs :
10
10
clear-caches :
11
- runs-on : ubuntu-latest
11
+ uses : ./.github/workflows/clear-caches.yml
12
12
permissions :
13
13
actions : write
14
- steps :
15
- # This will only delete up to 100 caches. That should be far more than
16
- # is ever needed.
17
- - name : Delete cache entries
18
- uses : actions/github-script@v6
19
- with :
20
- script : |
21
- const response = await github.rest.actions.getActionsCacheList({
22
- owner: context.repo.owner,
23
- repo: context.repo.repo,
24
- per_page: 100,
25
- key: 'cygwin-install-action-packages-'
26
- });
27
- for (const cache of response.data.actions_caches) {
28
- await github.rest.actions.deleteActionsCacheById({
29
- owner: context.repo.owner,
30
- repo: context.repo.repo,
31
- cache_id: cache.id
32
- });
33
- }
34
14
35
15
test-caching :
36
16
runs-on : windows-latest
53
33
# saveonly | yes (3) | no (7)
54
34
# restoreonly | no (4) | yes (8)
55
35
steps :
36
+ - name : Checkout
37
+ uses : actions/checkout@v3
56
38
57
39
- name : Install Cygwin + bash_completion, no caching
58
40
uses : ./
Original file line number Diff line number Diff line change
1
+ name : Clear Cygwin package caches
2
+
3
+ on : workflow_call
4
+
5
+ jobs :
6
+ clear-caches :
7
+ runs-on : ubuntu-latest
8
+ permissions :
9
+ actions : write
10
+ steps :
11
+ # This will only delete up to 100 caches. That should be far more than
12
+ # is ever needed.
13
+ - name : Delete cache entries
14
+ uses : actions/github-script@v6
15
+ with :
16
+ script : |
17
+ const response = await github.rest.actions.getActionsCacheList({
18
+ owner: context.repo.owner,
19
+ repo: context.repo.repo,
20
+ per_page: 100,
21
+ key: 'cygwin-install-action-packages-'
22
+ });
23
+ for (const cache of response.data.actions_caches) {
24
+ await github.rest.actions.deleteActionsCacheById({
25
+ owner: context.repo.owner,
26
+ repo: context.repo.repo,
27
+ cache_id: cache.id
28
+ });
29
+ }
You can’t perform that action at this time.
0 commit comments