Merge pull request #167170 from veehaitch/github-runner-node12

github-runner: guard support for Node.js 12
main
Sandro 2 years ago committed by GitHub
commit 4c344da29a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      pkgs/development/tools/continuous-integration/github-runner/default.nix

@ -13,13 +13,16 @@
, linkFarmFromDrvs
, lttng-ust
, makeWrapper
, nodejs-12_x
, nodejs-16_x
, openssl
, stdenv
, zlib
, writeShellApplication
, nuget-to-nix
# Keeping this option until upstream removes support for EoL Node.js 12 entirely
# Also refer to: https://github.com/actions/runner/pull/1716
, withNode12 ? false
, nodejs-12_x
}:
let
nugetSource = linkFarmFromDrvs "nuget-packages" (
@ -187,15 +190,17 @@ stdenv.mkDerivation rec {
++ lib.optionals (stdenv.hostPlatform.system == "aarch64-linux") [
# "JavaScript Actions in Alpine containers are only supported on x64 Linux runners. Detected Linux Arm64"
"GitHub.Runner.Common.Tests.Worker.StepHostL0.DetermineNodeRuntimeVersionInAlpineContainerAsync"
]
++ lib.optionals (!withNode12) [
"GitHub.Runner.Common.Tests.ProcessExtensionL0.SuccessReadProcessEnv"
];
checkInputs = [ git ];
checkPhase = ''
runHook preCheck
mkdir -p _layout/externals
ln -s ${nodejs-12_x} _layout/externals/node12
${lib.optionalString withNode12 "ln -s ${nodejs-12_x} _layout/externals/node12"}
ln -s ${nodejs-16_x} _layout/externals/node16
printf 'Disabled tests:\n%s\n' '${lib.concatMapStringsSep "\n" (x: " - ${x}") disabledTests}'
@ -244,7 +249,7 @@ stdenv.mkDerivation rec {
# externals/node{12,16}. As opposed to the official releases, we don't
# link the Alpine Node flavors.
mkdir -p $out/externals
ln -s ${nodejs-12_x} $out/externals/node12
${lib.optionalString withNode12 "ln -s ${nodejs-12_x} $out/externals/node12"}
ln -s ${nodejs-16_x} $out/externals/node16
# Install Nodejs scripts called from workflows

Loading…
Cancel
Save