From 0fb4ca7a6337d5c7f21ea8b7ee2d73dae525c183 Mon Sep 17 00:00:00 2001 From: pdlla Date: Sat, 2 Dec 2023 20:25:49 -0800 Subject: [PATCH 01/15] fix index issue in superStyle_fromListFormat --- TODO.txt | 18 +++++++++--------- .../Flow/Serialization/Versions/V1/SElts.hs | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/TODO.txt b/TODO.txt index 413052d3..5b6b10a4 100644 --- a/TODO.txt +++ b/TODO.txt @@ -269,26 +269,26 @@ DONE-handlers should return preview action -no it doesn't, goat can just toss out failed changes :: BUGGAROOS :: +-empty text zipper should return '' span with cursor + -without this, empty cells don't show the cursor... -hitting assert checkvalid = assert (pIsHandlerActive canvasHandler /= HAS_Active_Mouse && pIsHandlerActive layersHandler /= HAS_Active_Mouse) -repro is pan, resive canvas in params without confirming (pressing tab or cilkcing somewhere in params), and then click on canvas area -you can also repro by pan, resive canvas in params, and confirm by cilkcing within params -another repro is to pan ,then hit "new" --style input not support ' ' correctly - -preset style should have ' ' as default fill char, right now it's empty - -if you click on the style params section, it forces the fill char to be space and not empty -DONE-hitting assert when go into text box, type "ee"+return and then click on layers... -DONE-you have a perma broken tt file (see attached) - -rerpo is to pan and save, and open. initial render canvas doesn't account for pan so later tries to render out of bounds inside vty -hide stuff -moving an element into a hidden folder does not hide it right away -moving a hidden folder (in folder hierarchy) shows it (maybe cuz it's selected ,but it does'nt look selected?? and also deselecitng doesn't hide it) -opening file with hidden elements does not hide stuff.. - --you nede to fix the folder dropping at bottom issue... +-you need to fix the folder dropping at bottom issue... -shift select in layers please ;__; -did scroll wheel in finder window stop working?? -yes it's a fcous issue ,the mouse input does'nt get sent to the scroll wheel pane, you ned to pass it in if you want to fix it... - +DONE-style input not support ' ' correctly + DONE-preset style should have ' ' as default fill char, right now it's empty + DONE-if you click on the style params section, it forces the fill char to be space and not empty +DONE-hitting assert when go into text box, type "ee"+return and then click on layers... +DONE-you have a perma broken tt file (see attached) + -rerpo is to pan and save, and open. initial render canvas doesn't account for pan so later tries to render out of bounds inside vty diff --git a/src/Potato/Flow/Serialization/Versions/V1/SElts.hs b/src/Potato/Flow/Serialization/Versions/V1/SElts.hs index 361836a9..d22c083c 100644 --- a/src/Potato/Flow/Serialization/Versions/V1/SElts.hs +++ b/src/Potato/Flow/Serialization/Versions/V1/SElts.hs @@ -74,7 +74,7 @@ instance Show SuperStyle where show = superStyle_toListFormat superStyle_fromListFormat :: [PChar] -> SuperStyle -superStyle_fromListFormat chars = assert (l == 7 || l == 8) $ r where +superStyle_fromListFormat chars = assert (l == 6 || l == 7) $ r where l = length chars r = SuperStyle { _superStyle_tl = Just $ chars L.!! 0 @@ -84,7 +84,7 @@ superStyle_fromListFormat chars = assert (l == 7 || l == 8) $ r where , _superStyle_vertical = Just $ chars L.!! 4 , _superStyle_horizontal = Just $ chars L.!! 5 , _superStyle_point = Just $ chars L.!! 6 - , _superStyle_fill = if l == 7 then FillStyle_Blank else FillStyle_Simple (chars `debugBangBang` 7) + , _superStyle_fill = if l == 6 then FillStyle_Blank else FillStyle_Simple (chars `debugBangBang` 6) } -- superStyle_fromListFormat "╔╗╚╝║═█" `shouldBe` def From 83c4e642e5671f6ca9c83d78cf915957a4c7da49 Mon Sep 17 00:00:00 2001 From: pdlla Date: Sun, 3 Dec 2023 09:31:07 -0800 Subject: [PATCH 02/15] remove `assert (pIsHandlerActive canvasHandler /= HAS_Active_Mouse && pIsHandlerActive layersHandler /= HAS_Active_Mouse)` --- TODO.txt | 94 +++++++++++++++--------------- src/Potato/Flow/Controller/Goat.hs | 6 +- 2 files changed, 49 insertions(+), 51 deletions(-) diff --git a/TODO.txt b/TODO.txt index 5b6b10a4..53ce761c 100644 --- a/TODO.txt +++ b/TODO.txt @@ -268,67 +268,38 @@ DONE-handlers should return preview action -does ordering service need to know about state/non commuting changes -no it doesn't, goat can just toss out failed changes -:: BUGGAROOS :: + +:: RELEASE TODO :: +-get it working on breew +-make a video +-update tutorial file? -empty text zipper should return '' span with cursor -without this, empty cells don't show the cursor... --hitting assert checkvalid = assert (pIsHandlerActive canvasHandler /= HAS_Active_Mouse && pIsHandlerActive layersHandler /= HAS_Active_Mouse) - -repro is pan, resive canvas in params without confirming (pressing tab or cilkcing somewhere in params), and then click on canvas area - -you can also repro by pan, resive canvas in params, and confirm by cilkcing within params - -another repro is to pan ,then hit "new" +-shift select in layers please ;__; +-layers improvements + DONE-when dragging into a folder, the | should then L to the element being moved + -currently not possible to drag the last element in folder outside of that folder if there's something below it + -the trick is if you drag the last element in a folder to the spot below it, you need exception case to move it outside of the folder rather than as the next sibling to itself since that doesn't do anything + -currently not possible to drag below a folder if the folder is thet last sibling :( + -not sure if there's a way around this :( + -DO THIS you might want to consider doing the thing where dragging to the right side of a folder puts it underneath, otherwise it's always a sibling +-fix return navigation in params (you disabled it because it was breaking return to rename in layers) -hide stuff - -moving an element into a hidden folder does not hide it right away + -moving an element into a hidden folder does not hide it right away (ignore this for release) -moving a hidden folder (in folder hierarchy) shows it (maybe cuz it's selected ,but it does'nt look selected?? and also deselecitng doesn't hide it) -opening file with hidden elements does not hide stuff.. --you need to fix the folder dropping at bottom issue... --shift select in layers please ;__; --did scroll wheel in finder window stop working?? - -yes it's a fcous issue ,the mouse input does'nt get sent to the scroll wheel pane, you ned to pass it in if you want to fix it... -DONE-style input not support ' ' correctly - DONE-preset style should have ' ' as default fill char, right now it's empty - DONE-if you click on the style params section, it forces the fill char to be space and not empty -DONE-hitting assert when go into text box, type "ee"+return and then click on layers... -DONE-you have a perma broken tt file (see attached) - -rerpo is to pan and save, and open. initial render canvas doesn't account for pan so later tries to render out of bounds inside vty - - - -:: RELEASE TODO :: --make a video --update tutorial file? -DONE-BUG cursor not showing at very end of canvas size text entry boxes, also happens in filename widget and justall text boxes - -displayLinesWithAlignment does not add trailingcursor I think -DONE-BUG remove `checkvalid = assert (pIsHandlerActive canvasHandler /= HAS_Active_Mouse && pIsHandlerActive layersHandler /= HAS_Active_Mouse)` - -repro is change canvas size and click in canvas area to confirm -DONE-BUG figure out why you are hiting `in assert (_goatState_focusedArea goatState == GoatFocusedArea_Layers) $ goatState_afterAction ` - -repro is to rename a folder, click canvas, click back to folder - DONE-also add a UT for this.. -DONE-make screenshot -DONE-BUG resize window after panning is VERY BROKEN - DONE-add a UT for this -DONE-hardcode the xterm text width file? -DONE-make a regular tutorial doc -DONE-remove potato references :( -DONE-get rid of text box tool - IGNORE-fix box converting to text box - DONE-add a UT for this... - ::NEWEST TODO:: --fix return navigation in params (you disabled it because it was breaking return to rename in layers) +-did scroll wheel in finder window stop working?? + -yes it's a fcous issue ,the mouse input does'nt get sent to the scroll wheel pane, you ned to pass it in if you want to fix it... -upgrading ghc somehow broke unicode test -9.6 fails but 9.2 OK -there are still some EoL cursor bugs with unicode characters -right click menu support (send forward/backwards) (do this is tinytools-vty, make sure inputs get captured ug) -maybe creating box should take you straight to edit mode and name based on what you type in there?? -BUG translating lines should translate midpoints too --layers improvements - DONE-when dragging into a folder, the | should then L to the element being moved - -currently not possible to drag the last element in folder outside of that folder if there's something below it - -the trick is if you drag the last element in a folder to the spot below it, you need exception case to move it outside of the folder rather than as the next sibling to itself since that doesn't do anything - -currently not possible to drag below a folder if the folder is thet last sibling :( - -not sure if there's a way around this :( - -DO THIS you might want to consider doing the thing where dragging to the right side of a folder puts it underneath, otherwise it's always a sibling + -undo_move is probably not very multi-user friendly, you should rewrite using do_move logic -(so remove all children recursively and then add them back in) -(this will allow undo_move to work even if some of those childrens or parents have since been deleted I guess) @@ -450,6 +421,35 @@ DONE-get rid of text box tool -insert vs overwrite option for freeform text -you need some kind of options object to go along side of _setPotatoDefaultParameters_sBoxType + +DONE-hitting assert checkvalid = assert (pIsHandlerActive canvasHandler /= HAS_Active_Mouse && pIsHandlerActive layersHandler /= HAS_Active_Mouse) + -repro is pan, resive canvas in params without confirming (pressing tab or cilkcing somewhere in params), and then click on canvas area + -you can also repro by pan, resive canvas in params, and confirm by cilkcing within params + -another repro is to pan ,then hit "new" +DONE-style input not support ' ' correctly + DONE-preset style should have ' ' as default fill char, right now it's empty + DONE-if you click on the style params section, it forces the fill char to be space and not empty +DONE-hitting assert when go into text box, type "ee"+return and then click on layers... +DONE-you have a perma broken tt file (see attached) + -rerpo is to pan and save, and open. initial render canvas doesn't account for pan so later tries to render out of bounds inside vty + +DONE-BUG cursor not showing at very end of canvas size text entry boxes, also happens in filename widget and justall text boxes + -displayLinesWithAlignment does not add trailingcursor I think +DONE-BUG remove `checkvalid = assert (pIsHandlerActive canvasHandler /= HAS_Active_Mouse && pIsHandlerActive layersHandler /= HAS_Active_Mouse)` + -repro is change canvas size and click in canvas area to confirm +DONE-BUG figure out why you are hiting `in assert (_goatState_focusedArea goatState == GoatFocusedArea_Layers) $ goatState_afterAction ` + -repro is to rename a folder, click canvas, click back to folder + DONE-also add a UT for this.. +DONE-make screenshot +DONE-BUG resize window after panning is VERY BROKEN + DONE-add a UT for this +DONE-hardcode the xterm text width file? +DONE-make a regular tutorial doc +DONE-remove potato references :( +DONE-get rid of text box tool + IGNORE-fix box converting to text box + DONE-add a UT for this... + DONE-return key while renaming layers should confirm it DONE- more style presets please (singl eline ascii box) DONE-cursor dosen't show up at end of layers (probably sam eissu ewith the '' cursor tag from zippers) diff --git a/src/Potato/Flow/Controller/Goat.hs b/src/Potato/Flow/Controller/Goat.hs index e6cbd88a..170ed6db 100644 --- a/src/Potato/Flow/Controller/Goat.hs +++ b/src/Potato/Flow/Controller/Goat.hs @@ -758,9 +758,6 @@ goat_applyWSEvent wsetype wse goatState = goatState_final where then let layersHandler = _goatState_layersHandler goatState_afterSelection canvasHandler = _goatState_handler goatState_afterSelection - -- TODO remove this assert, this will happen for stuff like boxtexthandler - -- since we don't have multi-user events, the handler should never be active when this happens - checkvalid = assert (pIsHandlerActive canvasHandler /= HAS_Active_Mouse && pIsHandlerActive layersHandler /= HAS_Active_Mouse) -- safe for now, since `potatoHandlerInputFromGoatState` does not use `_goatState_handler/_goatState_layersHandler finalGoatState` which is set to `next_handler/next_layersHandler` next_potatoHandlerInput = potatoHandlerInputFromGoatState goatState_afterSelection @@ -771,12 +768,13 @@ goat_applyWSEvent wsetype wse goatState = goatState_final where -- TODO cancel the preview - in checkvalid goatState_afterSelection { + in goatState_afterSelection { _goatState_handler = refreshedCanvasHandler , _goatState_layersHandler = refreshedLayersHandler } else goatState_afterSelection + -- TODO we may have an owl in/out of a hidden folder, we need to rererender these -- | update LayersState based from SuperOwlChanges after applying events | next_layersState' = updateLayers pFState_afterEvent cslmap_afterEvent (_goatState_layersState goatState_afterRefreshHandler) goatState_afterSetLayersState = goat_autoExpandFoldersOfSelection $ goatState_afterRefreshHandler { _goatState_layersState = next_layersState' } From 251b2b7a02f2606af460977ce8336c0355d710c9 Mon Sep 17 00:00:00 2001 From: pdlla Date: Sun, 3 Dec 2023 09:36:42 -0800 Subject: [PATCH 03/15] add empty TZ test case for display lines --- TODO.txt | 1 + test/Potato/Data/Text/ZipperSpec.hs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/TODO.txt b/TODO.txt index 53ce761c..6007b684 100644 --- a/TODO.txt +++ b/TODO.txt @@ -275,6 +275,7 @@ DONE-handlers should return preview action -update tutorial file? -empty text zipper should return '' span with cursor -without this, empty cells don't show the cursor... + -NO this is not the issue :() -shift select in layers please ;__; -layers improvements DONE-when dragging into a folder, the | should then L to the element being moved diff --git a/test/Potato/Data/Text/ZipperSpec.hs b/test/Potato/Data/Text/ZipperSpec.hs index fac3accc..26ad6c07 100644 --- a/test/Potato/Data/Text/ZipperSpec.hs +++ b/test/Potato/Data/Text/ZipperSpec.hs @@ -85,6 +85,8 @@ spec = dl1 = displayLinesWithAlignment TextAlignment_Right 10 () () (fromText "aoeu\n\n\naoeu") dl2 = displayLinesWithAlignment TextAlignment_Right 10 () () (fromText "\n\n\naoeu") dl3 = displayLinesWithAlignment TextAlignment_Right 10 () () (fromText "aoeu\n\n\n") + dl4 = displayLinesWithAlignment TextAlignment_Right 10 () () empty + insertcharnewlinesentence `shouldBe` fromText newlineSentence @@ -93,6 +95,7 @@ spec = _displayLines_spans dl1 `shouldBe` makespans [["aoeu"],[""],[""],["aoeu", ""]] _displayLines_spans dl2 `shouldBe` makespans [[""],[""],[""],["aoeu", ""]] _displayLines_spans dl3 `shouldBe` makespans [["aoeu"],[""],[""],[""]] + _displayLines_spans dl4 `shouldBe` makespans [[""]] From f208a057d22ec626cf95d1bfe00fc0a53d4ec48d Mon Sep 17 00:00:00 2001 From: pdlla Date: Sun, 3 Dec 2023 11:24:31 -0800 Subject: [PATCH 04/15] add ci --- .github/workflows/haskell-ci.yml | 189 +++++++++++++++++++++++++++++++ tinytools.cabal | 1 + 2 files changed, 190 insertions(+) create mode 100644 .github/workflows/haskell-ci.yml diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml new file mode 100644 index 00000000..ab80d86f --- /dev/null +++ b/.github/workflows/haskell-ci.yml @@ -0,0 +1,189 @@ +# This GitHub workflow config has been generated by a script via +# +# haskell-ci 'github' 'tinytools.cabal' +# +# To regenerate the script (for example after adjusting tested-with) run +# +# haskell-ci regenerate +# +# For more information, see https://github.com/haskell-CI/haskell-ci +# +# version: 0.16.6 +# +# REGENDATA ("0.16.6",["github","tinytools.cabal"]) +# +name: Haskell-CI +on: + - push + - pull_request +jobs: + linux: + name: Haskell-CI - Linux - ${{ matrix.compiler }} + runs-on: ubuntu-20.04 + timeout-minutes: + 60 + container: + image: buildpack-deps:bionic + continue-on-error: ${{ matrix.allow-failure }} + strategy: + matrix: + include: + - compiler: ghc-9.2.5 + compilerKind: ghc + compilerVersion: 9.2.5 + setup-method: ghcup + allow-failure: false + fail-fast: false + steps: + - name: apt + run: | + apt-get update + apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 + mkdir -p "$HOME/.ghcup/bin" + curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup" + chmod a+x "$HOME/.ghcup/bin/ghcup" + "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) + "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + env: + HCKIND: ${{ matrix.compilerKind }} + HCNAME: ${{ matrix.compiler }} + HCVER: ${{ matrix.compilerVersion }} + - name: Set PATH and environment variables + run: | + echo "$HOME/.cabal/bin" >> $GITHUB_PATH + echo "LANG=C.UTF-8" >> "$GITHUB_ENV" + echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" + echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" + HCDIR=/opt/$HCKIND/$HCVER + HC=$HOME/.ghcup/bin/$HCKIND-$HCVER + echo "HC=$HC" >> "$GITHUB_ENV" + echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV" + echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" + HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') + echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV" + echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" + echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" + echo "HEADHACKAGE=false" >> "$GITHUB_ENV" + echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV" + echo "GHCJSARITH=0" >> "$GITHUB_ENV" + env: + HCKIND: ${{ matrix.compilerKind }} + HCNAME: ${{ matrix.compiler }} + HCVER: ${{ matrix.compilerVersion }} + - name: env + run: | + env + - name: write cabal config + run: | + mkdir -p $CABAL_DIR + cat >> $CABAL_CONFIG <> $CABAL_CONFIG < cabal-plan.xz + echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c - + xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan + rm -f cabal-plan.xz + chmod a+x $HOME/.cabal/bin/cabal-plan + cabal-plan --version + - name: checkout + uses: actions/checkout@v3 + with: + path: source + - name: initial cabal.project for sdist + run: | + touch cabal.project + echo "packages: $GITHUB_WORKSPACE/source/." >> cabal.project + cat cabal.project + - name: sdist + run: | + mkdir -p sdist + $CABAL sdist all --output-dir $GITHUB_WORKSPACE/sdist + - name: unpack + run: | + mkdir -p unpacked + find sdist -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C $GITHUB_WORKSPACE/unpacked -xzvf {} \; + - name: generate cabal.project + run: | + PKGDIR_tinytools="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/tinytools-[0-9.]*')" + echo "PKGDIR_tinytools=${PKGDIR_tinytools}" >> "$GITHUB_ENV" + rm -f cabal.project cabal.project.local + touch cabal.project + touch cabal.project.local + echo "packages: ${PKGDIR_tinytools}" >> cabal.project + echo "package tinytools" >> cabal.project + echo " ghc-options: -Werror=missing-methods" >> cabal.project + cat >> cabal.project <> cabal.project.local + cat cabal.project + cat cabal.project.local + - name: dump install plan + run: | + $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all + cabal-plan + - name: restore cache + uses: actions/cache/restore@v3 + with: + key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} + path: ~/.cabal/store + restore-keys: ${{ runner.os }}-${{ matrix.compiler }}- + - name: install dependencies + run: | + $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all + $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only -j2 all + - name: build w/o tests + run: | + $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all + - name: build + run: | + $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always + - name: tests + run: | + $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct + - name: cabal check + run: | + cd ${PKGDIR_tinytools} || false + ${CABAL} -vnormal check + - name: haddock + run: | + $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all + - name: unconstrained build + run: | + rm -f cabal.project.local + $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all + - name: save cache + uses: actions/cache/save@v3 + if: always() + with: + key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} + path: ~/.cabal/store diff --git a/tinytools.cabal b/tinytools.cabal index 81fcf3d7..e346ab7c 100644 --- a/tinytools.cabal +++ b/tinytools.cabal @@ -17,6 +17,7 @@ extra-source-files: README.md ChangeLog.md +Tested-With: GHC ==9.2.5 source-repository head type: git From 6182b3f7961da9a8910ad986d4a8dbb0000096b9 Mon Sep 17 00:00:00 2001 From: pdlla Date: Sun, 3 Dec 2023 11:33:20 -0800 Subject: [PATCH 05/15] set text icu ver --- tinytools.cabal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tinytools.cabal b/tinytools.cabal index e346ab7c..a31d0239 100644 --- a/tinytools.cabal +++ b/tinytools.cabal @@ -143,7 +143,7 @@ library , relude , semialign , text - , text-icu + , text-icu >= 0.8.0.1 && < 9 , these , vector , vty @@ -254,7 +254,7 @@ test-suite tinytools-test , relude , semialign , text - , text-icu + , text-icu >= 0.8.0.1 && < 9 , these , tinytools , vector From 8c33642b96c1b41e60ae097a7d8ab3a344cbf995 Mon Sep 17 00:00:00 2001 From: pdlla Date: Sun, 3 Dec 2023 13:36:36 -0800 Subject: [PATCH 06/15] aou' --- .github/workflows/haskell-ci.yml | 189 ------------------------------- .github/workflows/haskell.yml | 6 +- 2 files changed, 4 insertions(+), 191 deletions(-) delete mode 100644 .github/workflows/haskell-ci.yml diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml deleted file mode 100644 index ab80d86f..00000000 --- a/.github/workflows/haskell-ci.yml +++ /dev/null @@ -1,189 +0,0 @@ -# This GitHub workflow config has been generated by a script via -# -# haskell-ci 'github' 'tinytools.cabal' -# -# To regenerate the script (for example after adjusting tested-with) run -# -# haskell-ci regenerate -# -# For more information, see https://github.com/haskell-CI/haskell-ci -# -# version: 0.16.6 -# -# REGENDATA ("0.16.6",["github","tinytools.cabal"]) -# -name: Haskell-CI -on: - - push - - pull_request -jobs: - linux: - name: Haskell-CI - Linux - ${{ matrix.compiler }} - runs-on: ubuntu-20.04 - timeout-minutes: - 60 - container: - image: buildpack-deps:bionic - continue-on-error: ${{ matrix.allow-failure }} - strategy: - matrix: - include: - - compiler: ghc-9.2.5 - compilerKind: ghc - compilerVersion: 9.2.5 - setup-method: ghcup - allow-failure: false - fail-fast: false - steps: - - name: apt - run: | - apt-get update - apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - - name: Set PATH and environment variables - run: | - echo "$HOME/.cabal/bin" >> $GITHUB_PATH - echo "LANG=C.UTF-8" >> "$GITHUB_ENV" - echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" - echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" - HCDIR=/opt/$HCKIND/$HCVER - HC=$HOME/.ghcup/bin/$HCKIND-$HCVER - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV" - echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" - HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') - echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV" - echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" - echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" - echo "HEADHACKAGE=false" >> "$GITHUB_ENV" - echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV" - echo "GHCJSARITH=0" >> "$GITHUB_ENV" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - - name: env - run: | - env - - name: write cabal config - run: | - mkdir -p $CABAL_DIR - cat >> $CABAL_CONFIG <> $CABAL_CONFIG < cabal-plan.xz - echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c - - xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan - rm -f cabal-plan.xz - chmod a+x $HOME/.cabal/bin/cabal-plan - cabal-plan --version - - name: checkout - uses: actions/checkout@v3 - with: - path: source - - name: initial cabal.project for sdist - run: | - touch cabal.project - echo "packages: $GITHUB_WORKSPACE/source/." >> cabal.project - cat cabal.project - - name: sdist - run: | - mkdir -p sdist - $CABAL sdist all --output-dir $GITHUB_WORKSPACE/sdist - - name: unpack - run: | - mkdir -p unpacked - find sdist -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C $GITHUB_WORKSPACE/unpacked -xzvf {} \; - - name: generate cabal.project - run: | - PKGDIR_tinytools="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/tinytools-[0-9.]*')" - echo "PKGDIR_tinytools=${PKGDIR_tinytools}" >> "$GITHUB_ENV" - rm -f cabal.project cabal.project.local - touch cabal.project - touch cabal.project.local - echo "packages: ${PKGDIR_tinytools}" >> cabal.project - echo "package tinytools" >> cabal.project - echo " ghc-options: -Werror=missing-methods" >> cabal.project - cat >> cabal.project <> cabal.project.local - cat cabal.project - cat cabal.project.local - - name: dump install plan - run: | - $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all - cabal-plan - - name: restore cache - uses: actions/cache/restore@v3 - with: - key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} - path: ~/.cabal/store - restore-keys: ${{ runner.os }}-${{ matrix.compiler }}- - - name: install dependencies - run: | - $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all - $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only -j2 all - - name: build w/o tests - run: | - $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all - - name: build - run: | - $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always - - name: tests - run: | - $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct - - name: cabal check - run: | - cd ${PKGDIR_tinytools} || false - ${CABAL} -vnormal check - - name: haddock - run: | - $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all - - name: unconstrained build - run: | - rm -f cabal.project.local - $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all - - name: save cache - uses: actions/cache/save@v3 - if: always() - with: - key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} - path: ~/.cabal/store diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 615ea48d..c89efffe 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -38,6 +38,8 @@ jobs: cabal update cabal build --only-dependencies --enable-tests --enable-benchmarks - name: Build - run: cabal build --enable-tests --enable-benchmarks all + run: | + cabal configure --enable-tests --enable-benchmarks + cabal build --enable-tests --enable-benchmarks all - name: Run tests - run: cabal test all + run: cabal test all --enable-tests From 314f9aaa9daf4550f1d0e4e845b905f92d064d4e Mon Sep 17 00:00:00 2001 From: pdlla Date: Sun, 3 Dec 2023 16:34:46 -0800 Subject: [PATCH 07/15] build-tool-depends: hspec-discover:hspec-discover --- .github/workflows/haskell.yml | 2 +- tinytools.cabal | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index c89efffe..42cfbbf6 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-haskell@v1 with: - ghc-version: '8.10.3' + ghc-version: '9.2.5' cabal-version: '3.2' - name: Cache diff --git a/tinytools.cabal b/tinytools.cabal index a31d0239..c1144502 100644 --- a/tinytools.cabal +++ b/tinytools.cabal @@ -259,4 +259,5 @@ test-suite tinytools-test , tinytools , vector , vty + build-tool-depends: hspec-discover:hspec-discover default-language: Haskell2010 From f68272d1347c1f9fa2096110dcfe7eb734cf8c9c Mon Sep 17 00:00:00 2001 From: pdlla Date: Sun, 3 Dec 2023 16:42:54 -0800 Subject: [PATCH 08/15] update to newer version of haskkel-actions --- .github/workflows/haskell.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 42cfbbf6..57d2666c 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/setup-haskell@v1 + - uses: haskell-actions/setup@v2 with: ghc-version: '9.2.5' cabal-version: '3.2' @@ -38,8 +38,6 @@ jobs: cabal update cabal build --only-dependencies --enable-tests --enable-benchmarks - name: Build - run: | - cabal configure --enable-tests --enable-benchmarks - cabal build --enable-tests --enable-benchmarks all + run: cabal build --enable-tests --enable-benchmarks all - name: Run tests run: cabal test all --enable-tests From 4a73728827455506b4f454d01eeaaa2b0b1939f5 Mon Sep 17 00:00:00 2001 From: pdlla Date: Sun, 3 Dec 2023 16:55:33 -0800 Subject: [PATCH 09/15] add haskell-ci version lol --- .github/workflows/haskell-ci.yml | 189 +++++++++++++++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 .github/workflows/haskell-ci.yml diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml new file mode 100644 index 00000000..ab80d86f --- /dev/null +++ b/.github/workflows/haskell-ci.yml @@ -0,0 +1,189 @@ +# This GitHub workflow config has been generated by a script via +# +# haskell-ci 'github' 'tinytools.cabal' +# +# To regenerate the script (for example after adjusting tested-with) run +# +# haskell-ci regenerate +# +# For more information, see https://github.com/haskell-CI/haskell-ci +# +# version: 0.16.6 +# +# REGENDATA ("0.16.6",["github","tinytools.cabal"]) +# +name: Haskell-CI +on: + - push + - pull_request +jobs: + linux: + name: Haskell-CI - Linux - ${{ matrix.compiler }} + runs-on: ubuntu-20.04 + timeout-minutes: + 60 + container: + image: buildpack-deps:bionic + continue-on-error: ${{ matrix.allow-failure }} + strategy: + matrix: + include: + - compiler: ghc-9.2.5 + compilerKind: ghc + compilerVersion: 9.2.5 + setup-method: ghcup + allow-failure: false + fail-fast: false + steps: + - name: apt + run: | + apt-get update + apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 + mkdir -p "$HOME/.ghcup/bin" + curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup" + chmod a+x "$HOME/.ghcup/bin/ghcup" + "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) + "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + env: + HCKIND: ${{ matrix.compilerKind }} + HCNAME: ${{ matrix.compiler }} + HCVER: ${{ matrix.compilerVersion }} + - name: Set PATH and environment variables + run: | + echo "$HOME/.cabal/bin" >> $GITHUB_PATH + echo "LANG=C.UTF-8" >> "$GITHUB_ENV" + echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" + echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" + HCDIR=/opt/$HCKIND/$HCVER + HC=$HOME/.ghcup/bin/$HCKIND-$HCVER + echo "HC=$HC" >> "$GITHUB_ENV" + echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV" + echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" + HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') + echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV" + echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" + echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" + echo "HEADHACKAGE=false" >> "$GITHUB_ENV" + echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV" + echo "GHCJSARITH=0" >> "$GITHUB_ENV" + env: + HCKIND: ${{ matrix.compilerKind }} + HCNAME: ${{ matrix.compiler }} + HCVER: ${{ matrix.compilerVersion }} + - name: env + run: | + env + - name: write cabal config + run: | + mkdir -p $CABAL_DIR + cat >> $CABAL_CONFIG <> $CABAL_CONFIG < cabal-plan.xz + echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c - + xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan + rm -f cabal-plan.xz + chmod a+x $HOME/.cabal/bin/cabal-plan + cabal-plan --version + - name: checkout + uses: actions/checkout@v3 + with: + path: source + - name: initial cabal.project for sdist + run: | + touch cabal.project + echo "packages: $GITHUB_WORKSPACE/source/." >> cabal.project + cat cabal.project + - name: sdist + run: | + mkdir -p sdist + $CABAL sdist all --output-dir $GITHUB_WORKSPACE/sdist + - name: unpack + run: | + mkdir -p unpacked + find sdist -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C $GITHUB_WORKSPACE/unpacked -xzvf {} \; + - name: generate cabal.project + run: | + PKGDIR_tinytools="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/tinytools-[0-9.]*')" + echo "PKGDIR_tinytools=${PKGDIR_tinytools}" >> "$GITHUB_ENV" + rm -f cabal.project cabal.project.local + touch cabal.project + touch cabal.project.local + echo "packages: ${PKGDIR_tinytools}" >> cabal.project + echo "package tinytools" >> cabal.project + echo " ghc-options: -Werror=missing-methods" >> cabal.project + cat >> cabal.project <> cabal.project.local + cat cabal.project + cat cabal.project.local + - name: dump install plan + run: | + $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all + cabal-plan + - name: restore cache + uses: actions/cache/restore@v3 + with: + key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} + path: ~/.cabal/store + restore-keys: ${{ runner.os }}-${{ matrix.compiler }}- + - name: install dependencies + run: | + $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all + $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only -j2 all + - name: build w/o tests + run: | + $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all + - name: build + run: | + $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always + - name: tests + run: | + $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct + - name: cabal check + run: | + cd ${PKGDIR_tinytools} || false + ${CABAL} -vnormal check + - name: haddock + run: | + $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all + - name: unconstrained build + run: | + rm -f cabal.project.local + $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all + - name: save cache + uses: actions/cache/save@v3 + if: always() + with: + key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} + path: ~/.cabal/store From 7465566ac9f35d6c8f27f46d94b55f430aad9ac9 Mon Sep 17 00:00:00 2001 From: pdlla Date: Sun, 3 Dec 2023 17:34:48 -0800 Subject: [PATCH 10/15] aoeu --- tinytools.cabal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tinytools.cabal b/tinytools.cabal index c1144502..066f3392 100644 --- a/tinytools.cabal +++ b/tinytools.cabal @@ -143,7 +143,7 @@ library , relude , semialign , text - , text-icu >= 0.8.0.1 && < 9 + , text-icu , these , vector , vty @@ -254,7 +254,7 @@ test-suite tinytools-test , relude , semialign , text - , text-icu >= 0.8.0.1 && < 9 + , text-icu , these , tinytools , vector From 6772697352c59c000d3f7c5a5146b2674b62e79a Mon Sep 17 00:00:00 2001 From: pdlla Date: Sun, 3 Dec 2023 17:41:43 -0800 Subject: [PATCH 11/15] um lol --- tinytools.cabal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tinytools.cabal b/tinytools.cabal index 066f3392..c1144502 100644 --- a/tinytools.cabal +++ b/tinytools.cabal @@ -143,7 +143,7 @@ library , relude , semialign , text - , text-icu + , text-icu >= 0.8.0.1 && < 9 , these , vector , vty @@ -254,7 +254,7 @@ test-suite tinytools-test , relude , semialign , text - , text-icu + , text-icu >= 0.8.0.1 && < 9 , these , tinytools , vector From 02a25239b2af6023616f1c750da81ea154d09af3 Mon Sep 17 00:00:00 2001 From: pdlla Date: Sun, 3 Dec 2023 17:53:30 -0800 Subject: [PATCH 12/15] fix build --- .github/workflows/haskell-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index ab80d86f..2227a6a6 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -43,7 +43,7 @@ jobs: curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup" "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + "$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) env: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} @@ -59,7 +59,7 @@ jobs: echo "HC=$HC" >> "$GITHUB_ENV" echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV" echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV" echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" From fdcda13674531b7f7b6128538b745db26e44bef8 Mon Sep 17 00:00:00 2001 From: pdlla Date: Sun, 3 Dec 2023 17:55:57 -0800 Subject: [PATCH 13/15] aeou --- tinytools.cabal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tinytools.cabal b/tinytools.cabal index c1144502..f76c5097 100644 --- a/tinytools.cabal +++ b/tinytools.cabal @@ -143,7 +143,7 @@ library , relude , semialign , text - , text-icu >= 0.8.0.1 && < 9 + , text-icu , these , vector , vty @@ -254,7 +254,7 @@ test-suite tinytools-test , relude , semialign , text - , text-icu >= 0.8.0.1 && < 9 + , text-icu , these , tinytools , vector From f332553aea3a9b2d8b78d24269c00c2d9a2f65e9 Mon Sep 17 00:00:00 2001 From: pdlla Date: Sun, 3 Dec 2023 18:20:35 -0800 Subject: [PATCH 14/15] aoeuo --- tinytools.cabal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tinytools.cabal b/tinytools.cabal index f76c5097..c1144502 100644 --- a/tinytools.cabal +++ b/tinytools.cabal @@ -143,7 +143,7 @@ library , relude , semialign , text - , text-icu + , text-icu >= 0.8.0.1 && < 9 , these , vector , vty @@ -254,7 +254,7 @@ test-suite tinytools-test , relude , semialign , text - , text-icu + , text-icu >= 0.8.0.1 && < 9 , these , tinytools , vector From 16a251e14ebbf081964e04ab450c08fa6b99e3cd Mon Sep 17 00:00:00 2001 From: pdlla Date: Sun, 3 Dec 2023 18:28:22 -0800 Subject: [PATCH 15/15] giv up --- .github/workflows/haskell-ci.yml | 189 ------------------------------- tinytools.cabal | 4 +- 2 files changed, 2 insertions(+), 191 deletions(-) delete mode 100644 .github/workflows/haskell-ci.yml diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml deleted file mode 100644 index 2227a6a6..00000000 --- a/.github/workflows/haskell-ci.yml +++ /dev/null @@ -1,189 +0,0 @@ -# This GitHub workflow config has been generated by a script via -# -# haskell-ci 'github' 'tinytools.cabal' -# -# To regenerate the script (for example after adjusting tested-with) run -# -# haskell-ci regenerate -# -# For more information, see https://github.com/haskell-CI/haskell-ci -# -# version: 0.16.6 -# -# REGENDATA ("0.16.6",["github","tinytools.cabal"]) -# -name: Haskell-CI -on: - - push - - pull_request -jobs: - linux: - name: Haskell-CI - Linux - ${{ matrix.compiler }} - runs-on: ubuntu-20.04 - timeout-minutes: - 60 - container: - image: buildpack-deps:bionic - continue-on-error: ${{ matrix.allow-failure }} - strategy: - matrix: - include: - - compiler: ghc-9.2.5 - compilerKind: ghc - compilerVersion: 9.2.5 - setup-method: ghcup - allow-failure: false - fail-fast: false - steps: - - name: apt - run: | - apt-get update - apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - "$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - - name: Set PATH and environment variables - run: | - echo "$HOME/.cabal/bin" >> $GITHUB_PATH - echo "LANG=C.UTF-8" >> "$GITHUB_ENV" - echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" - echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" - HCDIR=/opt/$HCKIND/$HCVER - HC=$HOME/.ghcup/bin/$HCKIND-$HCVER - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV" - echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" - HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') - echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV" - echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" - echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" - echo "HEADHACKAGE=false" >> "$GITHUB_ENV" - echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV" - echo "GHCJSARITH=0" >> "$GITHUB_ENV" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - - name: env - run: | - env - - name: write cabal config - run: | - mkdir -p $CABAL_DIR - cat >> $CABAL_CONFIG <> $CABAL_CONFIG < cabal-plan.xz - echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c - - xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan - rm -f cabal-plan.xz - chmod a+x $HOME/.cabal/bin/cabal-plan - cabal-plan --version - - name: checkout - uses: actions/checkout@v3 - with: - path: source - - name: initial cabal.project for sdist - run: | - touch cabal.project - echo "packages: $GITHUB_WORKSPACE/source/." >> cabal.project - cat cabal.project - - name: sdist - run: | - mkdir -p sdist - $CABAL sdist all --output-dir $GITHUB_WORKSPACE/sdist - - name: unpack - run: | - mkdir -p unpacked - find sdist -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C $GITHUB_WORKSPACE/unpacked -xzvf {} \; - - name: generate cabal.project - run: | - PKGDIR_tinytools="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/tinytools-[0-9.]*')" - echo "PKGDIR_tinytools=${PKGDIR_tinytools}" >> "$GITHUB_ENV" - rm -f cabal.project cabal.project.local - touch cabal.project - touch cabal.project.local - echo "packages: ${PKGDIR_tinytools}" >> cabal.project - echo "package tinytools" >> cabal.project - echo " ghc-options: -Werror=missing-methods" >> cabal.project - cat >> cabal.project <> cabal.project.local - cat cabal.project - cat cabal.project.local - - name: dump install plan - run: | - $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all - cabal-plan - - name: restore cache - uses: actions/cache/restore@v3 - with: - key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} - path: ~/.cabal/store - restore-keys: ${{ runner.os }}-${{ matrix.compiler }}- - - name: install dependencies - run: | - $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all - $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only -j2 all - - name: build w/o tests - run: | - $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all - - name: build - run: | - $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always - - name: tests - run: | - $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct - - name: cabal check - run: | - cd ${PKGDIR_tinytools} || false - ${CABAL} -vnormal check - - name: haddock - run: | - $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all - - name: unconstrained build - run: | - rm -f cabal.project.local - $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all - - name: save cache - uses: actions/cache/save@v3 - if: always() - with: - key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} - path: ~/.cabal/store diff --git a/tinytools.cabal b/tinytools.cabal index c1144502..f76c5097 100644 --- a/tinytools.cabal +++ b/tinytools.cabal @@ -143,7 +143,7 @@ library , relude , semialign , text - , text-icu >= 0.8.0.1 && < 9 + , text-icu , these , vector , vty @@ -254,7 +254,7 @@ test-suite tinytools-test , relude , semialign , text - , text-icu >= 0.8.0.1 && < 9 + , text-icu , these , tinytools , vector