From 100eb76b9a8d54a52cf3000a2480d8d60bcb7064 Mon Sep 17 00:00:00 2001 From: Yohe-Am <56622350+Yohe-Am@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:55:25 +0300 Subject: [PATCH] fix: nightly CI issue (#96) * fix: nightly CI issue * fix timeout on downloads --- .ghjk/lock.json | 24 +++++++++++++++--------- .github/workflows/nightly.yml | 4 ++-- ports/cargobi.ts | 13 ++++++++----- ports/cmake.ts | 2 +- ports/rust.ts | 6 ++++++ utils/mod.ts | 3 ++- 6 files changed, 34 insertions(+), 18 deletions(-) diff --git a/.ghjk/lock.json b/.ghjk/lock.json index 0c64bfdc..88c73206 100644 --- a/.ghjk/lock.json +++ b/.ghjk/lock.json @@ -5,8 +5,14 @@ "ports": { "version": "0", "configResolutions": { + "bciqay4m4kmzfduj5t2clgejxgpe5zwper6lyyaxt7rhbjalaqd32nhq": { + "version": "2.34.1", + "buildDepConfigs": {}, + "portRef": "git_aa@0.1.0", + "specifiedVersion": false + }, "bciqjlw6cxddajjmznoemlmnu7mgbbm7a3hfmnd2x5oivwajmiqui5ey": { - "version": "v0.2.63", + "version": "v0.2.64", "buildDepConfigs": {}, "portRef": "act_ghrel@0.1.0", "specifiedVersion": false @@ -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": "tar_aa@0.1.0", "specifiedVersion": false }, "zstd_aa": { - "version": "v1.5.6,", + "version": "v1.4.8,", "buildDepConfigs": {}, "portRef": "zstd_aa@0.1.0", "specifiedVersion": false @@ -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": "tar_aa@0.1.0", "specifiedVersion": false }, "zstd_aa": { - "version": "v1.5.6,", + "version": "v1.4.8,", "buildDepConfigs": {}, "portRef": "zstd_aa@0.1.0", "specifiedVersion": false @@ -58,13 +64,13 @@ "specifiedVersion": false }, "bciqj4p5hoqweghbuvz52rupja7sqze34z63dd62nz632c5zxikv6ezy": { - "version": "1.35", + "version": "1.34", "buildDepConfigs": {}, "portRef": "tar_aa@0.1.0", "specifiedVersion": false }, "bciqe6fwheayositrdk7rkr2ngdr4wizldakex23tgivss7w6z7g3q3y": { - "version": "v1.5.6,", + "version": "v1.4.8,", "buildDepConfigs": {}, "portRef": "zstd_aa@0.1.0", "specifiedVersion": false diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index b192524a..fdb034a8 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -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 diff --git a/ports/cargobi.ts b/ports/cargobi.ts index aa25da75..845bb078 100644 --- a/ports/cargobi.ts +++ b/ports/cargobi.ts @@ -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"; @@ -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; } diff --git a/ports/cmake.ts b/ports/cmake.ts index b0f96a80..99fcea11 100644 --- a/ports/cmake.ts +++ b/ports/cmake.ts @@ -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 diff --git a/ports/rust.ts b/ports/rust.ts index bda15bea..2819f8bf 100644 --- a/ports/rust.ts +++ b/ports/rust.ts @@ -70,8 +70,14 @@ export type RustInstallConf = & InstallConfigSimple & zod.input; +/** + * 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, }; diff --git a/utils/mod.ts b/utils/mod.ts index 30f2d51b..66b5419b 100644 --- a/utils/mod.ts +++ b/utils/mod.ts @@ -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: ${ @@ -425,6 +425,7 @@ export async function downloadFile( await $.request(url) .header(headers) + .timeout(undefined) .pipeToPath(tmpFilePath, { create: true, mode }); await $.path(downloadPath).ensureDir();