shithub: MicroHs

Download patch

ref: a1adb6a8ce34f87bb7fe3ea2a5bb87a8fb4ca68d
parent: 0b3fe41bcdbd97c238b09b34927eae2fa6ae2597
author: Lennart Augustsson <lennart.augustsson@epicgames.com>
date: Mon Nov 27 09:50:05 EST 2023

More CI

--- a/.github/workflows/c-cpp.yml
+++ b/.github/workflows/c-cpp.yml
@@ -7,10 +7,20 @@
     branches: [ "master" ]
 
 jobs:
-  build:
-
+  build-linux:
     runs-on: ubuntu-latest
+    steps:
+    - name: checkout repo
+      uses: actions/checkout@v3
+    - name: make
+      run: make
+    - name: make everytestmhs
+      run: make everytestmhs
+    - name: cabal build
+      run: cabal build
 
+  build-macos:
+    runs-on: macos-latest
     steps:
     - name: checkout repo
       uses: actions/checkout@v3
@@ -18,4 +28,6 @@
       run: make
     - name: make everytestmhs
       run: make everytestmhs
+    - name: cabal build
+      run: cabal build
 
--- a/tests/Nfib.hs
+++ b/tests/Nfib.hs
@@ -1,4 +1,4 @@
-module Nfib(main) where
+module Nfib(main, nfib) where
 import Prelude
 
 nfib :: Int -> Int
@@ -8,7 +8,12 @@
     True  -> 1
 
 main :: IO ()
-main = print (nfib 44)
+main = do
+  t1 <- getTimeMilli
+  let r = nfib 39
+  print r
+  t2 <- getTimeMilli
+  putStrLn $ "nfib/s = " ++ show (r `quot` (t2 - t1)) ++ "k"
 
 -- Typical nfib/s is 10M
 -- mhs
--