diff options
-rw-r--r-- | .gitlab-ci.yml | 9 | ||||
-rw-r--r-- | hadrian/src/Hadrian/Utilities.hs | 13 | ||||
-rw-r--r-- | hadrian/src/Rules/Test.hs | 9 |
3 files changed, 20 insertions, 11 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 16ae89c3e4..e02aba031d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -710,14 +710,19 @@ validate-x86_64-linux-fedora27: bash -c './configure --enable-tarballs-autodownload GHC=`pwd`/toolchain/bin/ghc HAPPY=`pwd`/toolchain/bin/happy ALEX=`pwd`/toolchain/bin/alex' - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --flavour=Quick --docs=no-sphinx binary-dist" - mv _build/bindist/ghc*.tar.xz ghc.tar.xz - # FIXME: Testsuite disabled due to #16156. - # - bash -c 'make V=0 test THREADS=`mk/detect-cpu-count.sh` JUNIT_FILE=../../junit.xml' + - bash -c "PATH=`pwd`/toolchain/bin:$PATH hadrian/build.cabal.sh -j`mk/detect-cpu-count.sh` --flavour=quick test --summary-junit=./junit.xml --skip-perf" + # skipping perf tests for now since we build a quick-flavoured GHC, + # which might result in some broken perf tests? tags: - x86_64-windows artifacts: + reports: + junit: junit.xml + expire_in: 2 week when: always paths: - ghc.tar.xz + - junit.xml validate-x86_64-windows-hadrian: extends: .build-windows-hadrian diff --git a/hadrian/src/Hadrian/Utilities.hs b/hadrian/src/Hadrian/Utilities.hs index 521d2bc946..1c2479715c 100644 --- a/hadrian/src/Hadrian/Utilities.hs +++ b/hadrian/src/Hadrian/Utilities.hs @@ -304,22 +304,25 @@ isGeneratedSource file = buildRoot <&> (`isPrefixOf` file) -- | Link a file tracking the link target. Create the target directory if -- missing. createFileLink :: FilePath -> FilePath -> Action () -createFileLink linkTarget link = do +createFileLink linkTarget link + | windowsHost = copyFile' source link + | otherwise = do -- TODO `disableHistory` is a temporary fix (see issue #16866). Remove -- `disableHistory` when shake issue is fixed: https://github.com/ndmitchell/shake/issues/683. historyDisable - let source = if isAbsolute linkTarget - then linkTarget - else takeDirectory link -/- linkTarget need [source] - let dir = takeDirectory link + liftIO $ IO.createDirectoryIfMissing True dir putProgressInfo =<< renderCreateFileLink linkTarget link quietly . liftIO $ do IO.removeFile link <|> return () IO.createFileLink linkTarget link + where dir = takeDirectory link + source | isAbsolute linkTarget = linkTarget + | otherwise = takeDirectory link -/- linkTarget + -- | Copy a file tracking the source. Create the target directory if missing. copyFile :: FilePath -> FilePath -> Action () copyFile source target = do diff --git a/hadrian/src/Rules/Test.hs b/hadrian/src/Rules/Test.hs index 23352ed260..5dea40a48b 100644 --- a/hadrian/src/Rules/Test.hs +++ b/hadrian/src/Rules/Test.hs @@ -162,9 +162,10 @@ needTestsuitePackages = do allpkgs <- packages <$> flavour stgpkgs <- allpkgs (succ stg) testpkgs <- testsuitePackages - targets <- mapM (needFile stg) (stgpkgs ++ testpkgs) + let pkgs = filter (\p -> not $ "iserv" `isInfixOf` pkgName p) + (stgpkgs ++ testpkgs) + need =<< mapM (pkgFile stg) pkgs needIservBins - need targets -- stage 1 ghc lives under stage0/bin, -- stage 2 ghc lives under stage1/bin, etc @@ -187,7 +188,7 @@ needIservBins = do , w `elem` rtsways ] -needFile :: Stage -> Package -> Action FilePath -needFile stage pkg +pkgFile :: Stage -> Package -> Action FilePath +pkgFile stage pkg | isLibrary pkg = pkgConfFile (Context stage pkg profilingDynamic) | otherwise = programPath =<< programContext stage pkg |