Commit Graph

5714 Commits (53c0756defd9ef6b7a02406c0c69a39b5d1f187e)
 

Author SHA1 Message Date
Frans de Jonge 53c0756def CircleCI: finishing touches (#3340)
* junit test results; unfortunately this seems to conflict with the verbose out

* fix deps cache: two files can change independently

* verbose print obsoleted by gtest in upsream busted
7 years ago
poire-z f90973f73a Allow for disabling flashing of menu, icons and buttons (#3339) 7 years ago
poire-z 430b61ba76 Small visual fixes to Menu (#3338)
Rationalize horizontal construction of Menu items (TOC,
Bookmarks, Classic file views) for more even padding.
Align "x" close button diagonaly with top right border and title.

Also add forgotten scale_for_dpi to MultiConfirmBox
7 years ago
Frans de Jonge 6b6ffdffeb README: style updates (#3337)
Improved some stylistic issues.

* Updated Travis CI reference to CircleCI.
* Switched to CircleCI "shield" style badge to fit in better with the other badges.
7 years ago
Robert a392fbcca0 [feat] VirtualKeyboard cursor navigation (#3290)
Still lacks Japanese due to insufficient knowledge of the language.
7 years ago
Frans de Jonge aaab777ddb [CI] Switch to Codecov (#3336)
The debug output from Coveralls was rubbish. `"Build processing error"`
Besides some basics like checking if we were actually sending
valid JSON that gives us absolutely nothing to work with.
7 years ago
Frans de Jonge fa7763f59b CircleCI: run docs & coverage in first container only (#3335)
I wrote this whole complicated wofkflow-based config file, but except
in the case of a base rebuild it wouldn't really be any faster than
this simple tweak.

```
defaults: &defaults
    docker:
      - image: houqp/kobase:0.0.5
        environment:
          EMULATE_READER: 1
          # this is for shellcheck 0.4.5 and lower; can be removed for 0.4.6
          LC_ALL: en_US.UTF8

version: 2
jobs:
  install-and-build:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          keys:
            # binary dependencies require {{ arch }} because there are different CPUs in use on the servers
            - deps-{{ arch }}-{{ checksum ".ci/install.sh" }}
      # need to init some stuff first or git will complain when sticking in base cache
      - run: git submodule init base && git submodule update base && pushd base && git submodule init && git submodule update && popd
      # we can't use command output directly for cache check so we write it to git-rev-base
      - run: pushd base && git_rev_base=$(git describe HEAD) && popd && echo $git_rev_base && echo $git_rev_base >git-rev-base
      - restore_cache:
          keys:
            - build-{{ arch }}-{{ checksum "git-rev-base" }}
      - run: echo 'export PATH=${HOME}/bin:${PATH}' >> $BASH_ENV
      - run:
          name: setup
          command: .ci/before_install.sh
      - run:
          name: install
          command: .ci/install.sh
      - save_cache:
          key: deps-{{ arch }}-{{ checksum ".ci/install.sh" }}
          paths:
            - "/home/ko/bin"
            - "/home/ko/.luarocks"
            # compiled luarocks binaries
            - "install"
      - run:
          name: fetch
          command: .ci/fetch.sh
      - run:
          name: check
          command: .ci/check.sh
      - run:
          name: build
          command: .ci/build.sh
      - save_cache:
          key: build-{{ checksum "base/git-rev" }}
          paths:
            - "/home/ko/.ccache"
            - "base"
      - persist_to_workspace:
          # Must be an absolute path, or relative path from working_directory
          root: "./"
          # Must be relative path from root
          paths:
            # front build
            - "koreader-emulator-x86_64-linux-gnu/koreader"

  test:
    <<: *defaults
    parallelism: 4
    steps:
      - checkout
      - restore_cache:
          keys:
            # binary dependencies require {{ arch }} because there are different CPUs in use on the servers
            - deps-{{ arch }}-{{ checksum ".ci/install.sh" }}
      # need to init some stuff first or git will complain when sticking in base cache
      - run: git submodule init base && git submodule update base && pushd base && git submodule init && git submodule update && popd
      # we can't use command output directly for cache check so we write it to git-rev-base
      - run: pushd base && git_rev_base=$(git describe HEAD) && popd && echo $git_rev_base && echo $git_rev_base >git-rev-base
      - restore_cache:
          keys:
            - build-{{ arch }}-{{ checksum "git-rev-base" }}
      - run: echo 'export PATH=${HOME}/bin:${PATH}' >> $BASH_ENV
      - attach_workspace:
          # Must be absolute path or relative path from working_directory
          at: "./"
      - run:
          name: test
          command: .ci/test.sh

  docs-and-coverage:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          keys:
            # binary dependencies require {{ arch }} because there are different CPUs in use on the servers
            - deps-{{ arch }}-{{ checksum ".ci/install.sh" }}
      # need to init some stuff first or git will complain when sticking in base cache
      - run: git submodule init base && git submodule update base && pushd base && git submodule init && git submodule update && popd
      # we can't use command output directly for cache check so we write it to git-rev-base
      - run: pushd base && git_rev_base=$(git describe HEAD) && popd && echo $git_rev_base && echo $git_rev_base >git-rev-base
      - restore_cache:
          keys:
            - build-{{ arch }}-{{ checksum "git-rev-base" }}
      - run: echo 'export PATH=${HOME}/bin:${PATH}' >> $BASH_ENV
      - attach_workspace:
          # Must be absolute path or relative path from working_directory
          at: "./"
      - run:
          name: cleanup
          command: .ci/after_success.sh

workflows:
  version: 2
  build-and-test:
    jobs:
      - install-and-build
      - test:
          requires:
            - install-and-build
      - docs-and-coverage:
          requires:
            - install-and-build
```
7 years ago
Frans de Jonge 5bd288e378 [fix] #nocov on broken scroll mode tests 7 years ago
Frans de Jonge 372967bc65 [fix] MockTime spec 7 years ago
Frans de Jonge 868860a62e CircleCI parallelization
* Enable parallelism in .circleci/config.yml
* Add BUSTED_SPEC_FILE to Makefile testfront
* Use it in .ci/test.sh with xargs for test parallelization

NB This is the dumb method of improving test time.
Ideally we want a workflow fan-in/fan-out approach.
7 years ago
poire-z 2b89be4f95 Fix cre scroll page update and allow jumping to page (#3333)
This makes Go to, Skim to and TOC page selection work in
scroll mode, and page given to other module more accurate
(previously, we were one action lagging).
7 years ago
Robert 31f8372c87 [fix] Statistics: onPosUpdate and save stats when closing document (#3332) 7 years ago
Frans de Jonge 91f07b9d99 CircleCI cache fix (#3329)
* Update luarocks/shellcheck/shfmt check based on `deps-{{ arch }}-{{ checksum ".ci/install.sh" }}`
* We generate a git-rev-base to check whether we can trust the cache
  with `build-{{ arch }}-{{ checksum "git-rev-base" }}`

Binary dependencies require `{{ arch }}` because there are different CPUs used on the servers.
More information here: https://discuss.circleci.com/t/use-the-arch-cache-template-key-if-you-rely-on-cached-compiled-binary-dependencies/16129
7 years ago
poire-z 66e521f34b Fix stats in cre scroll mode (#3331) 7 years ago
Frans de Jonge 99d06ae928 CircleCI docs (#3327)
* Environment variable key replaced by CircleCI GitHub push key.
  See <https://circleci.com/docs/1.0/adding-read-write-deployment-key/>.

* Temporarily added `|| true` to luacov so it won't cause a fail.
7 years ago
Frans de Jonge a710d2c68a Fix readerfooter_spec (#3326)
My bad, leftover from #3323 but not caught due to some Travis → CircleCI migration birth pains.
7 years ago
Robert bcb09f3aa1 Flash KeyValuePage item when callback (#3322) 7 years ago
poire-z 9443098e98 Normalize some widgets appearance (those using ButtonTable)
This makes button heights similar in all uses of ButtonTable.
It depended on how the ButtonTable was used in each widget
(previously, first and last row may have different sizes than
the others).

buttontable.lua: more even buttons height whether zero_sep or not
framecontainer.lua: added padding_top/bottom/left/right (similar to
what was done for iconbutton)

The following widgets have been adapted for this, with some
additional fixes:

buttondialog.lua
buttondialogtitle.lua: wider title with adequate padding
confirmbox.lua + multiconfirmbox.lua: dismissable via tap outside
inputdialog.lua + multiinputdialog.lua: more even vertical padding between elements
imageviewer.lua
textviewer.lua
datewidget.lua
timewidget.lua

Additionaly: frontlightwidget.lua: fixed width of progress bar that
was exceeding window width since the Size scaling adjustements
7 years ago
poire-z 2fc8076139 Better vertical centering of text in its box
Decide baseline vertical position according to font metrics, instead
of the hardcoded 0.7 (in textwidget, which made the text a little
bit up in its box), and 0.75 (in toggleswitch, which made the text a
little bit down in its box). This usually gives a value around 0.72
or 0.73 with our ui fonts, which looks about right.
ReaderFooter: add bottom padding, now that our text goes a few pixels lower
7 years ago
Frans de Jonge ea033431aa CircleCI fixes
* shellcheck 0.4.5 fix `LC_ALL: en_US.UTF8` (can be removed for shellcheck 0.4.6)

* hush updated luacheck on `reader.lua`; we're not assigning any variables but `= nil` is redundant
7 years ago
Qingping Hou 283bffdce9 Add CircleCI (#3321) 7 years ago
Frans de Jonge 6e52e559ae [fix, Android] Don't steal frontlight control on start (#3319)
I believe this should be `if isKobo()`, or better yet that the entire
block should be moved to `KoboPowerD:init()` because afaik that is the
only platform where the system doesn't provide trustworthy frontlight
information. But to be absolutely sure that I don't break anything (and I
don't want to spend any time on this atm) I'm temporarily excluding only
Android where this behavior is known to be problematic.

See discussion in https://github.com/koreader/koreader/issues/3118#issuecomment-334995879

References #3118 (using keyword "references" because phrases like "possibly fixes"
result in GH autoclose).
7 years ago
Frans de Jonge 91fbdd59ff Bump base (#3318)
Includes https://github.com/koreader/koreader-base/pull/539.

Changes to koptcontext.lua. Look here if anything weird changes in PDFs.
7 years ago
Robert 9ea2b3dbad Option to disable show bottom menu on top menu activation (#3316) 7 years ago
Frans de Jonge d23d01643e Add LuaData and Dictionary Lookup History (#3161)
* Add dictionary history

Fixes #2033, fixes #2998.

* Add LuaData

* table handling in base settings

* Add LuaData spec
7 years ago
Robert ddf700043d [ReadTimer] Time from now (#3311) 7 years ago
poire-z 8c700eefd9 Avoid some full refreshes on Kindle (#3315)
"partial" refresh causes a full (without black flash) refresh on
Kindle (which uses REAGL mode for partial refresh). This causes a
full redraw of widgets, which is a bit distracting with some of them:
- dictquicklookup: when showing next definition
- infomessage: when displaying a new one (Wikipedia Save as epub)

Also fix bottom menu, that even when closed, would still register
bottom area as dirty: this would cause top menu navigation to
cause a full partial refresh, only noticable on Kindle.
7 years ago
Frans de Jonge f7618f7f52 Bump base to prevent Travis LuaJIT rebuild (#3314) 7 years ago
Robert 0b2b2bbc2b refresh footer (#3313) 7 years ago
poire-z e6fcea6e26 Fix crash with keyboard navigation of onHold buttontables (#3307)
* Fix crash with keyboard navigation of onHold buttontables

Would crash when encountering a separator or when the number
of buttons in a row changes.

* Reset previous selected item on new buttontable
7 years ago
poire-z b7785753c6 [fix] Crash on highlight in some situations (#3306) 7 years ago
poire-z b483c54be8 Fix footer, stats, TOC position with cre in scroll mode (#3304)
This gives the page position to these modules even in scroll mode.
Also, in readerrolling: don't query battery/charging status
when crengine does not need it (used only when it shows its top
progress bar).
7 years ago
Frans de Jonge ac7119c433 [fix] Android screen blackout on first light change (#3303) 7 years ago
poire-z 301892f4b6 [fix] Avoid multiple refreshes when opening credocuments (#3300)
Only noticeable on Kindle (which uses REAGL as partial refresh).
7 years ago
Frans de Jonge 34ad91c3f0 Bump base (#3301)
Includes:

* [fix] Android viewport (fixes #3148)
* Makefile: add luajit-clean target and auto-call it (https://github.com/koreader/koreader-base/pull/531)
7 years ago
Robert ceb7cf9771 Migrate Goodreads to https (#3298) 7 years ago
Frans de Jonge 5786449021 ISSUE_TEMPLATE: add request to share crash.log (#3296) 7 years ago
Frans de Jonge 7eefff284d [fix] kodev: default NDKABI=14 if not set for NDK 15 standalone toolkit 7 years ago
Frans de Jonge 59cfde8558 kodev: add run android convenience shortcut (#3297) 7 years ago
Frans de Jonge db6c35c144 README: small typo 7 years ago
poire-z 5a2c8e4b5e Revert 2 commits that caused crengine scroll mode side effects (#3295)
394be8a (#2855) and 2b3b310 (#3183) introduced side effects (scroll mode
crashing and TOC being reset and rebuild). This reverts parts of them
not yet reverted.
7 years ago
Frans de Jonge bf61e6f093 [fix] Android frontlight control 7 years ago
Fabian Müller-Knapp 7d81aa5cf4 [feat] Pocketbook840 enable frontlight (#3294)
* Detect PocketBook840 by GetSoftwareVersion()

* implement Frontlight-support for 840 via inkview
7 years ago
poire-z b55265ba91 CoverBrowser: avoid crash when indexing some cre documents (#3293) 7 years ago
poire-z 26def92983 credocument reader optimisation (avoid multiple TOC builds) (#3292)
Avoid unnecessary work in ReaderView:onSetViewMode() and
ReaderRolling:updatePos() that would result in TOC being reset
and rebuilt (which can take time on books with huge TOC) during
reader setup.
7 years ago
Frans de Jonge e5675af467 README: Change gcc requirement to 4.8
Technically 4.7 is probably fine for all but debugging symbols, for which a simple version check and workaround could be added. However, since all of the CI tests run 4.8 there is no regression prevention and it would be more future maintenance trouble than it's worth.
7 years ago
Frans de Jonge 83e0ce7750 [fix] KOSync server TLS connection (#3291)
Bumps base for updated luasec.

The forum reminded me Sync was broken https://www.mobileread.com/forums/showthread.php?p=3587993 (as I don't use it myself). This finishes 23e2183931.

Thanks to @houqp for helping with debugging Cloudflare. See https://support.cloudflare.com/hc/en-us/articles/203135314-How-can-I-enable-SSLv3-

Fixes #2738. Fixes #2178. (Duplicate bug reports by @Hzj-jie. :-P) Fixes #3159. Fixes #3158. Fixes #2877.
7 years ago
poire-z 308c243238 Inform once about color rendering on supported devices (#3289) 7 years ago
Frans de Jonge 23e2183931 [fix] KOSync plugin server location (#3288)
This is only step one. It remains to be determined why the connection is downgraded to sslv3, which will result in a handshake failure.
7 years ago
poire-z 1f038055d3 [Fix] Full refresh when showing ImageViewer 7 years ago