diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 76803f5..6fb16ea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -129,13 +129,13 @@ jobs: lake exe graph rm import_graph.dot - # - name: test algorithm - # id: test - # uses: liskin/gh-problem-matcher-wrap@v3 - # with: - # linters: gcc - # run: - # lake test + - name: test algorithm + id: test + uses: liskin/gh-problem-matcher-wrap@v3 + with: + linters: gcc + run: + lake test - name: check for unused imports id: shake diff --git a/test/Mutable/thunk1.lean b/AlgorithmTest/Mutable/thunk1.lean similarity index 100% rename from test/Mutable/thunk1.lean rename to AlgorithmTest/Mutable/thunk1.lean diff --git a/test/Mutable/thunk2.lean b/AlgorithmTest/Mutable/thunk2.lean similarity index 100% rename from test/Mutable/thunk2.lean rename to AlgorithmTest/Mutable/thunk2.lean diff --git a/test/Mutable/thunk3.lean b/AlgorithmTest/Mutable/thunk3.lean similarity index 100% rename from test/Mutable/thunk3.lean rename to AlgorithmTest/Mutable/thunk3.lean diff --git a/test/UnionFind.lean b/AlgorithmTest/UnionFind.lean similarity index 100% rename from test/UnionFind.lean rename to AlgorithmTest/UnionFind.lean diff --git a/lakefile.lean b/lakefile.lean index a8a0424..992d4ed 100644 --- a/lakefile.lean +++ b/lakefile.lean @@ -17,6 +17,7 @@ abbrev algorithmLeanOptions := #[ algorithmOnlyLinters.map fun s ↦ { s with name := `weak ++ s.name } package algorithm where + testDriver := "AlgorithmTest" lean_lib Mutable where roots := #[`Mutable] @@ -30,6 +31,9 @@ lean_lib Algorithm where "-lstdc++" ] +lean_lib AlgorithmTest where + globs := #[.submodules `AlgorithmTest] + target ffi.o pkg : System.FilePath := do let oFile := pkg.buildDir / "cpp" / "ffi.o" let srcJob ← inputBinFile <| pkg.dir / "cpp" / "ffi.cpp" @@ -40,7 +44,3 @@ extern_lib libleanffi pkg := do let name := nameToStaticLib "leanffi" let ffiO ← ffi.o.fetch buildStaticLib (pkg.staticLibDir / name) #[ffiO] - --- @[test_driver] --- lean_exe test where --- srcDir := "scripts"