Skip to content
This repository was archived by the owner on Oct 24, 2024. It is now read-only.

Commit 91e5897

Browse files
authored
Maybe now (#3)
* .. * fix from * fix from
1 parent 223d202 commit 91e5897

File tree

6 files changed

+44
-20
lines changed

6 files changed

+44
-20
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
All notable changes to the project will be here.
44
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
55

6+
## [1.0.2] - 2022-12-07
7+
8+
### Fixed
9+
10+
- It should work now by using binaries from a fork.
11+
12+
## [1.0.1] - 2022-12-07
13+
14+
### Fixed
15+
16+
- maybe work?
17+
618
## [1.0.0] - 2022-12-07
719

820
### Added

dist/index.js

Lines changed: 10 additions & 6 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.

dist/setup/index.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6578,20 +6578,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
65786578
};
65796579
Object.defineProperty(exports, "__esModule", ({ value: true }));
65806580
const core = __importStar(__nccwpck_require__(2186));
6581+
const exec_1 = __nccwpck_require__(1514);
65816582
const tool_cache_1 = __nccwpck_require__(7784);
65826583
const fs_1 = __nccwpck_require__(7147);
65836584
const path = __importStar(__nccwpck_require__(1017));
6585+
// WE're using a patched version provided on my repo because
6586+
// the original repo didn't release binaries yet with GHA support.
65846587
// Todo: make this input
6585-
const VERSION = "0.3.1";
6588+
const VERSION = "0.3.1-gha";
65866589
const TOOL_NAME = "sccache";
65876590
function getDownloadPath() {
65886591
switch (process.platform) {
65896592
case "darwin":
6590-
return `https://github.com/mozilla/sccache/releases/download/v${VERSION}/sccache-v${VERSION}-x86_64-apple-darwin.tar.gz`;
6593+
return `https://github.com/aviramha/sccache/releases/download/v${VERSION}/sccache-v${VERSION}-x86_64-apple-darwin.tar.gz`;
65916594
case "linux":
6592-
return `https://github.com/mozilla/sccache/releases/download/v${VERSION}/sccache-v${VERSION}-x86_64-unknown-linux-musl.tar.gz`;
6595+
return `https://github.com/aviramha/sccache/releases/download/v${VERSION}/sccache-v${VERSION}-x86_64-unknown-linux-musl.tar.gz`;
65936596
case "win32":
6594-
return `https://github.com/mozilla/sccache/releases/download/v${VERSION}/sccache-v${VERSION}-x86_64-pc-windows-msvc.tar.gz`;
6597+
return `https://github.com/aviramha/sccache/releases/download/v${VERSION}/sccache-v${VERSION}-x86_64-pc-windows-msvc.tar.gz`;
65956598
default:
65966599
throw new Error(`Unsupported platform: ${process.platform}`);
65976600
}
@@ -6614,9 +6617,10 @@ function setCache(sccacheDirectory) {
66146617
core.exportVariable("ACTIONS_CACHE_URL", process.env.ACTIONS_CACHE_URL);
66156618
core.exportVariable("ACTIONS_RUNTIME_TOKEN", process.env.ACTIONS_RUNTIME_TOKEN);
66166619
//todo: make this input
6617-
core.exportVariable("SCCACHE_GHA_CACHE_TO", "sccache");
6618-
core.exportVariable("SCCACHE_GHA_CACHE_FROM", "sccache");
6620+
core.exportVariable("SCCACHE_GHA_CACHE_TO", "sccache-latest");
6621+
core.exportVariable("SCCACHE_GHA_CACHE_FROM", "sccache-");
66196622
core.addPath(sccacheDirectory);
6623+
(0, exec_1.exec)("sccache", ["--start-server"]);
66206624
core.debug("Configured sccache!");
66216625
});
66226626
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sccache-rust-action",
3-
"version": "0.1.0",
3+
"version": "1.0.2",
44
"private": true,
55
"description": "sccache Rust Action",
66
"main": "lib/main.js",

src/main.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
import * as core from "@actions/core";
2+
import { exec } from "@actions/exec";
23
import { cacheDir, downloadTool, extractTar, find } from "@actions/tool-cache";
34
import { promises as fs } from "fs";
45
import * as path from "path";
56

7+
// WE're using a patched version provided on my repo because
8+
// the original repo didn't release binaries yet with GHA support.
69
// Todo: make this input
7-
const VERSION = "0.3.1";
10+
const VERSION = "0.3.1-gha";
811
const TOOL_NAME = "sccache";
912

1013
function getDownloadPath(): string {
1114
switch (process.platform) {
1215
case "darwin":
13-
return `https://github.com/mozilla/sccache/releases/download/v${VERSION}/sccache-v${VERSION}-x86_64-apple-darwin.tar.gz`;
16+
return `https://github.com/aviramha/sccache/releases/download/v${VERSION}/sccache-v${VERSION}-x86_64-apple-darwin.tar.gz`;
1417
case "linux":
15-
return `https://github.com/mozilla/sccache/releases/download/v${VERSION}/sccache-v${VERSION}-x86_64-unknown-linux-musl.tar.gz`;
18+
return `https://github.com/aviramha/sccache/releases/download/v${VERSION}/sccache-v${VERSION}-x86_64-unknown-linux-musl.tar.gz`;
1619
case "win32":
17-
return `https://github.com/mozilla/sccache/releases/download/v${VERSION}/sccache-v${VERSION}-x86_64-pc-windows-msvc.tar.gz`;
20+
return `https://github.com/aviramha/sccache/releases/download/v${VERSION}/sccache-v${VERSION}-x86_64-pc-windows-msvc.tar.gz`;
1821
default:
1922
throw new Error(`Unsupported platform: ${process.platform}`);
2023
}
@@ -39,9 +42,10 @@ async function setCache(sccacheDirectory: string): Promise<void> {
3942
process.env.ACTIONS_RUNTIME_TOKEN
4043
);
4144
//todo: make this input
42-
core.exportVariable("SCCACHE_GHA_CACHE_TO", "sccache");
43-
core.exportVariable("SCCACHE_GHA_CACHE_FROM", "sccache");
45+
core.exportVariable("SCCACHE_GHA_CACHE_TO", "sccache-latest");
46+
core.exportVariable("SCCACHE_GHA_CACHE_FROM", "sccache-");
4447
core.addPath(sccacheDirectory);
48+
exec("sccache", ["--start-server"]);
4549
core.debug("Configured sccache!");
4650
}
4751

0 commit comments

Comments
 (0)