packages feed

ats-pkg 3.3.0.0 → 3.3.0.1

raw patch · 4 files changed

+27/−2 lines, 4 files

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # ats-pkg +## 3.3.0.1++  * Add `bench` subcommand to CLI+ ## 3.3.0.0    * Add `bench` field to `Pkg` type
app/Main.hs view
@@ -52,6 +52,13 @@                     , _lint       :: Bool                     , _prof       :: Bool                     }+             | Bench { _targets    :: [String]+                     , _atspkgArg  :: Maybe String+                     , _rebuildAll :: Bool+                     , _verbosity  :: Int+                     , _lint       :: Bool+                     , _prof       :: Bool+                     }              | Fetch { _url       :: String                      , _atspkgArg :: Maybe String                      , _verbosity :: Int@@ -80,6 +87,7 @@     <> command "remote" (info fetch (progDesc "Fetch and install a binary package"))     <> command "build" (info build' (progDesc "Build current package targets"))     <> command "test" (info test' (progDesc "Test current package"))+    <> command "bench" (info bench' (progDesc "Benchmark current package"))     <> command "nuke" (info (pure Nuke) (progDesc "Uninstall all globally installed libraries"))     <> command "upgrade" (info (pure Upgrade) (progDesc "Upgrade to the latest version of atspkg"))     <> command "valgrind" (info valgrind (progDesc "Run generated binaries through valgrind"))@@ -139,6 +147,15 @@     <*> noLint     <*> profile +bench' :: Parser Command+bench' = Bench+    <$> targets "bench"+    <*> pkgArgs+    <*> rebuild+    <*> verbosity+    <*> noLint+    <*> profile+ test' :: Parser Command test' = Test     <$> targets "test"@@ -247,6 +264,7 @@ run Clean                              = mkPkg Nothing False True False mempty ["clean"] Nothing 0 run (Build rs mArg tgt rba v lint tim) = runHelper rba lint tim rs mArg tgt v run (Test ts mArg rba v lint tim)      = runHelper rba lint tim ("test" : ts) mArg Nothing v+run (Bench ts mArg rba v lint tim)     = runHelper rba lint tim ("bench" : ts) mArg Nothing v run (Run ts mArg rba v lint tim)       = runHelper rba lint tim ("run" : ts) mArg Nothing v run (Install tgt mArg)                 = runHelper False True False ["install"] mArg tgt 0 run (Valgrind ts mArg)                 = runHelper False True False ("valgrind" : ts) mArg Nothing 0
ats-pkg.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.0 name:               ats-pkg-version:            3.3.0.0+version:            3.3.0.1 license:            BSD3 license-file:       LICENSE copyright:          Copyright: (c) 2018-2019 Vanessa McHale
src/Language/ATS/Package/Build.hs view
@@ -153,6 +153,9 @@ mkValgrind :: Maybe String -> [String] -> Rules () mkValgrind mStr = mkPhony mStr "valgrind" ("valgrind " <>) bin +mkBench :: Maybe String -> [String] -> Rules ()+mkBench mStr = mkPhony mStr "bench" id bench+ mkTest :: Maybe String -> [String] -> Rules () mkTest mStr = mkPhony mStr "test" id test @@ -242,7 +245,7 @@  bits :: Maybe String -> Maybe String -> [String] -> Rules () bits mStr tgt rs = sequence_ (sequence [ mkManpage, mkInstall tgt, mkConfig ] mStr) <>-    biaxe [ mkRun, mkTest, mkValgrind ] mStr rs+    biaxe [ mkRun, mkTest, mkBench, mkValgrind ] mStr rs  pkgToTargets :: Pkg -> Maybe String -> [FilePath] -> [FilePath] pkgToTargets ~Pkg{..} tgt [] = (toTgt tgt . target <$> bin) <> (unpack . libTarget <$> libraries) <> (unpack . cTarget <$> atsSource)