Skip to content

Commit

Permalink
Fix things, matrix action
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljharvey committed Nov 18, 2023
1 parent 0c11caa commit de14276
Show file tree
Hide file tree
Showing 40 changed files with 63 additions and 608 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/lint-haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
builder/**/*.hs
smol-backend/**/*.hs
smol-core/**/*.hs
smol-modules/**/*.hs
smol-repl/**/*.hs
smol-wasm/**/*.hs
Expand All @@ -36,6 +37,6 @@ jobs:
- name: "Run HLint"
uses: rwe/actions-hlint-run@v2
with:
path: '["builder/", "smol-backend/", "smol-core/", "smol-repl/", "smol-wasm/"]'
path: '["builder/", "smol-backend/", "smol-core/", "smol-modules/", "smol-repl/", "smol-wasm/"]'
fail-on: warning

39 changes: 12 additions & 27 deletions .github/workflows/smol-haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,24 @@ on:
push:
branches:
- trunk
paths:
- "smol-backend/**"
- "smol-core/**"
- "smol-repl/**"
- "smol-wasm/**"
- "vendored/**"
- "cabal.project"
- "cabal.project.freeze"

pull_request:
branches:
- trunk
paths:
- "smol-backend/**"
- "smol-core/**"
- "smol-repl/**"
- "smol-wasm/**"
- "vendored/**"
- "cabal.project"
- "cabal.project.freeze"

jobs:
build:
runs-on: ubuntu-latest
example_matrix:
strategy:
matrix:
command:
- "make test-smol"
- "make test-smol-backend"
- "make test-smol-wasm"
- "make test-smol-modules"
- "make build-smol-repl"

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

Expand All @@ -52,14 +45,6 @@ jobs:
ghc-version: '9.6.3'
cabal-version: '3.10.1.0'

- name: Test smol
run: make test-smol

- name: Test smol backend
run: make test-smol-backend

- name: Test smol wasm
run: make test-smol-wasm
- name: Test!
run: ${{ matrix.command }}

- name: Build smol repl
run: make build-smol-repl
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ test-smol:
test-smol-backend:
cabal run smol-backend:test:smol-backend-tests

.PHONY: test-smol-modules
test-smol-modules:
cabal run smol-modules:test:smol-modules-tests

.PHONY: test-smol-wasm
test-smol-wasm:
cabal run smol-wasm:test:smol-wasm-tests
Expand Down
1 change: 1 addition & 0 deletions smol-backend/smol-backend.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ common shared
, mtl
, process
, smol-core
, smol-modules
, string-conversions
, text
, unix
Expand Down
2 changes: 1 addition & 1 deletion smol-backend/src/Smol/Backend/IR/FromExpr/Expr.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import Smol.Backend.IR.IRExpr
import Smol.Backend.Types.GetPath
import Smol.Backend.Types.PatternPredicate
import Smol.Core.Helpers
import Smol.Core.Modules.Types (Module (..), TopLevelExpression (..))
import Smol.Core.Typecheck (flattenConstructorApplication, getTypeAnnotation)
import Smol.Core.Typecheck.Shared (getExprAnnotation)
import Smol.Core.Types.Constructor
Expand All @@ -40,6 +39,7 @@ import Smol.Core.Types.Prim
import Smol.Core.Types.ResolvedDep
import Smol.Core.Types.Type
import Smol.Core.Types.TypeName
import Smol.Modules.Types (Module (..), TopLevelExpression (..))

irPrintInt :: IRExtern
irPrintInt =
Expand Down
6 changes: 3 additions & 3 deletions smol-backend/test/Test/Helpers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ import qualified Data.Sequence as Seq
import qualified Data.Set.NonEmpty as NES
import Data.Text (Text)
import Smol.Core
import Smol.Core.Modules.FromParts
import Smol.Core.Modules.Parser
import Smol.Core.Modules.Types.Module
import Smol.Core.Typecheck.FromParsedExpr
import Smol.Modules.FromParts
import Smol.Modules.Parser
import Smol.Modules.Types.Module

tyBool :: (Monoid ann) => Type dep ann
tyBool = TPrim mempty TPBool
Expand Down
12 changes: 6 additions & 6 deletions smol-backend/test/Test/IR/IRSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ import qualified LLVM.AST as LLVM
import qualified Smol.Backend.Compile.RunLLVM as Run
import Smol.Backend.IR.FromExpr.Expr
import Smol.Backend.IR.ToLLVM.ToLLVM
import Smol.Core.Modules.FromParts
import Smol.Core.Modules.Parser (parseModuleAndFormatError)
import Smol.Core.Modules.ResolveDeps
import Smol.Core.Modules.Typecheck
import Smol.Core.Modules.Types
import Smol.Core.Modules.Types.ModuleError
import Smol.Core.Typecheck.Typeclass.Types
import Smol.Core.Types
import Smol.Modules.FromParts
import Smol.Modules.Parser (parseModuleAndFormatError)
import Smol.Modules.ResolveDeps
import Smol.Modules.Typecheck
import Smol.Modules.Types
import Smol.Modules.Types.ModuleError
import Test.BuiltInTypes
import Test.Hspec
import Test.IR.Samples
Expand Down
1 change: 0 additions & 1 deletion smol-core/src/Smol/Core/Typecheck/Typeclass/Helpers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import qualified Data.Map.Strict as M
import Data.Maybe (listToMaybe, mapMaybe)
import Data.Monoid
import qualified Data.Set as S
import Smol.Core.Helpers
import Smol.Core.TypeUtils
import Smol.Core.Typecheck.Shared
import Smol.Core.Typecheck.Substitute
Expand Down
1 change: 0 additions & 1 deletion smol-core/test/Test/Helpers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ import Smol.Core
import Smol.Core.Typecheck.FromParsedExpr
import Test.BuiltInTypes (builtInTypes)


getRight :: (Show e) => Either e a -> a
getRight (Right a) = a
getRight (Left e) = error (show e)
Expand Down
22 changes: 0 additions & 22 deletions smol-core/test/static/Either.smol

This file was deleted.

83 changes: 0 additions & 83 deletions smol-core/test/static/Eq.smol

This file was deleted.

26 changes: 0 additions & 26 deletions smol-core/test/static/Expr.smol

This file was deleted.

90 changes: 0 additions & 90 deletions smol-core/test/static/Functor.smol

This file was deleted.

Loading

0 comments on commit de14276

Please sign in to comment.