Skip to content

Commit

Permalink
Merge pull request #167170 from veehaitch/github-runner-node12
Browse files Browse the repository at this point in the history
github-runner: guard support for Node.js 12
  • Loading branch information
SuperSandro2000 authored Apr 21, 2022
2 parents 76009b4 + 05d7528 commit 4c344da
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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" (
Expand Down Expand Up @@ -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}'
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4c344da

Please sign in to comment.