Skip to content

Commit 74f3795

Browse files
committed
clear fake cache feature; preparing 0.0.3
1 parent 6b48b76 commit 74f3795

File tree

6 files changed

+9
-72
lines changed

6 files changed

+9
-72
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -27,34 +27,6 @@ jobs:
2727
with:
2828
version: ${{ matrix.version }}
2929

30-
- name: Try Calcit
31-
run: |
32-
cr -e "range 20"
33-
34-
- name: Clear bin
35-
run: |
36-
rm -rfv /home/runner/bin/
37-
38-
- name: Setup Calcit skip cache
39-
uses: ./
40-
with:
41-
version: ${{ matrix.version }}
42-
skipCache: true
43-
44-
- name: Try Calcit
45-
run: |
46-
cr -e "range 20"
47-
48-
- name: Clear bin
49-
run: |
50-
rm -rfv /home/runner/bin/
51-
52-
- name: Setup Calcit with cache
53-
uses: ./
54-
with:
55-
version: ${{ matrix.version }}
56-
skipCache: false
57-
5830
- name: Capture Calcit
5931
run: |
6032
cr --help

action.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ inputs:
66
description: Version of Calcit install
77
required: true
88
default: 0.8.38
9-
skipCache:
10-
description: Disable Cache
11-
required: false
12-
default: false
9+
1310
runs:
1411
using: node20
1512
main: dist/index.js

dist/index.js

Lines changed: 3 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ const core = require("@actions/core");
44
const tc = require("@actions/tool-cache");
55

66
const version = core.getInput("version");
7-
const skipCache = core.getInput("skipCache");
87

98
const binFolder = `/home/runner/bin/`;
109

@@ -13,26 +12,11 @@ async function setup(bin) {
1312
// Get version of tool to be installed
1413

1514
let url = `https://github.com/calcit-lang/calcit/releases/download/${version}/${bin}`;
16-
17-
let prevCr = tc.find(bin, version, "ubuntu");
1815
let binPath = `${binFolder}${bin}`;
1916

20-
console.log(`cache is: ${prevCr}`);
21-
if (prevCr && !skipCache) {
22-
fs.copyFileSync(prevCr, binPath);
23-
console.log(`use cached: ${prevCr}`);
24-
} else {
25-
const pathToCr = await tc.downloadTool(url, binPath);
26-
console.log(`downloaded to: ${pathToCr}`);
27-
const cachedPath = await tc.cacheFile(
28-
pathToCr,
29-
bin,
30-
bin,
31-
version,
32-
"ubuntu"
33-
);
34-
console.log(`cached to: ${cachedPath}`);
35-
}
17+
const pathToCr = await tc.downloadTool(url, binPath);
18+
console.log(`downloaded to: ${pathToCr}`);
19+
3620
fs.chmodSync(binPath, 0o755);
3721
core.addPath(binFolder);
3822
console.log(`add binary to path: ${binPath}`);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "setup-cr",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"description": "Setup Calcit runtime",
55
"main": "./index.js",
66
"repository": "[email protected]:calcit-lang/setup-cr.git",

0 commit comments

Comments
 (0)