Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
setup: warning non-cached tool: github/action-runners ships only one …
Browse files Browse the repository at this point in the history
…tool version

Removed message about policy that several versions of GHC and cabal
are shipped---not true any longer.

Updated links to point to current upstream action-runners repo.
  • Loading branch information
andreasabel committed Apr 27, 2023
1 parent 0dbc692 commit 4c8e445
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 34 deletions.
16 changes: 5 additions & 11 deletions setup/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 5 additions & 11 deletions setup/lib/installer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 5 additions & 12 deletions setup/src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,25 +49,18 @@ async function success(
}

function warn(tool: Tool, version: string): void {
const policy = {
cabal: `the two latest major releases of ${tool} are commonly supported.`,
ghc: `the three latest major releases of ${tool} are commonly supported.`,
stack: `the latest release of ${tool} is commonly supported.`
}[tool];

core.debug(
`${tool} ${version} was not found in the cache. It will be downloaded.\n` +
`If this is unexpected, please check if version ${version} is pre-installed.\n` +
`The list of pre-installed versions is available here: https://help.github.com/en/actions/reference/software-installed-on-github-hosted-runners\n` +
`The above list follows a common haskell convention that ${policy}\n` +
'If the list is outdated, please file an issue here: https://github.com/actions/virtual-environments\n' +
'by using the appropriate tool request template: https://github.com/actions/virtual-environments/issues/new/choose'
`The list of pre-installed versions is available from here: https://github.com/actions/runner-images#available-images\n` +
'If the list is outdated, please file an issue here: https://github.com/actions/runner-images/issues\n' +
'by using the appropriate tool request template: https://github.com/actions/runner-images/issues/new/choose'
);
}

function aptVersion(tool: string, version: string): string {
// For Cabal, extract the first two segments of the version number. This
// regex is intentionally liberal to accomodate unusual cases like "head".
// For Cabal, extract the first two segments of the version number.
// This regex is intentionally liberal to accommodate unusual cases like "head".
return tool === 'cabal' ? /[^.]*\.?[^.]*/.exec(version)![0] : version;
}

Expand Down

0 comments on commit 4c8e445

Please sign in to comment.