Skip to content

Commit

Permalink
fix: nightly CI issue (#96)
Browse files Browse the repository at this point in the history
* fix: nightly CI issue

* fix timeout on downloads
  • Loading branch information
Yohe-Am authored Aug 8, 2024
1 parent 8d50518 commit 100eb76
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 18 deletions.
24 changes: 15 additions & 9 deletions .ghjk/lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@
"ports": {
"version": "0",
"configResolutions": {
"bciqay4m4kmzfduj5t2clgejxgpe5zwper6lyyaxt7rhbjalaqd32nhq": {
"version": "2.34.1",
"buildDepConfigs": {},
"portRef": "[email protected]",
"specifiedVersion": false
},
"bciqjlw6cxddajjmznoemlmnu7mgbbm7a3hfmnd2x5oivwajmiqui5ey": {
"version": "v0.2.63",
"version": "v0.2.64",
"buildDepConfigs": {},
"portRef": "[email protected]",
"specifiedVersion": false
Expand All @@ -15,16 +21,16 @@
"version": "3.7.1",
"buildDepConfigs": {
"cpy_bs_ghrel": {
"version": "3.12.3",
"version": "3.12.4",
"buildDepConfigs": {
"tar_aa": {
"version": "1.35",
"version": "1.34",
"buildDepConfigs": {},
"portRef": "[email protected]",
"specifiedVersion": false
},
"zstd_aa": {
"version": "v1.5.6,",
"version": "v1.4.8,",
"buildDepConfigs": {},
"portRef": "[email protected]",
"specifiedVersion": false
Expand All @@ -39,16 +45,16 @@
"specifiedVersion": false
},
"bciqij3g6mmbjn4a6ps4eipcy2fmw2zumgv5a3gbxycthroffihwquoi": {
"version": "3.12.3",
"version": "3.12.4",
"buildDepConfigs": {
"tar_aa": {
"version": "1.35",
"version": "1.34",
"buildDepConfigs": {},
"portRef": "[email protected]",
"specifiedVersion": false
},
"zstd_aa": {
"version": "v1.5.6,",
"version": "v1.4.8,",
"buildDepConfigs": {},
"portRef": "[email protected]",
"specifiedVersion": false
Expand All @@ -58,13 +64,13 @@
"specifiedVersion": false
},
"bciqj4p5hoqweghbuvz52rupja7sqze34z63dd62nz632c5zxikv6ezy": {
"version": "1.35",
"version": "1.34",
"buildDepConfigs": {},
"portRef": "[email protected]",
"specifiedVersion": false
},
"bciqe6fwheayositrdk7rkr2ngdr4wizldakex23tgivss7w6z7g3q3y": {
"version": "v1.5.6,",
"version": "v1.4.8,",
"buildDepConfigs": {},
"portRef": "[email protected]",
"specifiedVersion": false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ jobs:
env:
GHJKFILE: ./examples/protoc/ghjk.ts
- run: |
cd examples/protoc
cd examples/tasks
. $(ghjk print share-dir-path)/env.sh
protoc --version
ghjk x hey
13 changes: 8 additions & 5 deletions ports/cargobi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import * as std_ports from "../modules/ports/std.ts";
import {
ghConfValidator,
GithubReleasesInstConf,
readGhVars,
} from "../modules/ports/ghrel.ts";
import rust, { RustInstallConf } from "./rust.ts";

Expand Down Expand Up @@ -55,15 +56,17 @@ export type CargobiInstallConf =
export default function conf(config: CargobiInstallConf) {
const { rustConfOverride, ...thisConf } = config;
const out: InstallConfigFat = {
...readGhVars(),
...confValidator.parse(thisConf),
buildDepConfigs: {
port: manifest,
};
if (rustConfOverride) {
out.buildDepConfigs = {
[std_ports.rust_rustup.name]: thinInstallConfig(rust({
profile: "minimal",
...rustConfOverride,
})),
},
port: manifest,
};
};
}
return out;
}

Expand Down
2 changes: 1 addition & 1 deletion ports/cmake.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import * as ports from "./mod.ts";
*
*/
export default function conf(
config: InstallConfigSimple,
config: InstallConfigSimple = {},
): InstallConfigFat[] {
/*
The universal macOS cmake build downloaded by asdf crashes
Expand Down
6 changes: 6 additions & 0 deletions ports/rust.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,14 @@ export type RustInstallConf =
& InstallConfigSimple
& zod.input<typeof confValidator>;

/**
* Uses {@link import("./rustup.ts").conf} to install a rust toolchain.
*
* Defaults to the minimal profile installation of
*/
export default function conf(config: RustInstallConf = {}) {
return {
profile: "minimal",
...config,
port: manifest,
};
Expand Down
3 changes: 2 additions & 1 deletion utils/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ let requestBuilder;
try {
requestBuilder = new dax.RequestBuilder()
.showProgress(Deno.stderr.isTerminal())
.timeout(Deno.env.get("GHJK_REQ_TIMEOUT") as any ?? "1m");
.timeout(Deno.env.get("GHJK_REQ_TIMEOUT") as any ?? "5m");
} catch (err) {
throw new Error(
`invalid timeout param on GHJK_REQ_TIMEOUT: ${
Expand Down Expand Up @@ -425,6 +425,7 @@ export async function downloadFile(

await $.request(url)
.header(headers)
.timeout(undefined)
.pipeToPath(tmpFilePath, { create: true, mode });

await $.path(downloadPath).ensureDir();
Expand Down

0 comments on commit 100eb76

Please sign in to comment.