Skip to content

Commit

Permalink
Merge pull request #21 from pmonks/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
pmonks authored Dec 20, 2023
2 parents 4bf5f70 + 7c3ddeb commit fa85588
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 15 deletions.
38 changes: 33 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,16 @@ jobs:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master

CI:
run_ci_matrix:
needs: skip_check
if: ${{ needs.skip_check.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest

strategy:
matrix:
java-version: [ 11, 17 ] # Note: logback no longer supports Java 8, so we've dropped that from the matrix

java-version: [ 8, 11, 17, 21 ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java-version }}
Expand All @@ -40,3 +38,33 @@ jobs:

- name: Run CI checks
run: clojure -Srepro -J-Dclojure.main.report=stderr -T:build ci

# Adapted from https://brunoscheufler.com/blog/2022-04-09-the-required-github-status-check-that-wasnt
after_ci_matrix:
needs: run_ci_matrix
runs-on: ubuntu-latest
if: success()
outputs:
success: ${{ steps.setoutput.outputs.success }}
steps:
- id: setoutput
run: echo "::set-output name=success::true"

CI:
runs-on: ubuntu-latest
if: always()
needs: [skip_check, run_ci_matrix, after_ci_matrix]
steps:
- run: |
skipped="${{ needs.skip_check.outputs.should_skip }}"
passed="${{ needs.after_ci_matrix.outputs.success }}"
if [[ $skipped == "true" ]]; then
echo "CI matrix skipped"
exit 0
elif [[ $passed == "true" ]]; then
echo "CI matrix passed"
exit 0
else
echo "CI matrix failed"
exit 1
fi
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Make sure we get the full history, or else the version number gets screwed up
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
java-version: 21
- uses: DeLaGuardo/[email protected]
with:
cli: latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
java-version: 21
- uses: DeLaGuardo/[email protected]
with:
cli: latest
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.spdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SPDXVersion: SPDX-2.1
SPDXVersion: SPDX-2.3
DataLicense: CC0-1.0
Creator: Peter Monks
PackageName: com.github.pmonks/spinner
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ Note that using Unicode characters in progress indicators may be unreliable, dep

2. If you're using the Clojure CLI tools, you **must** use the `clojure` binary, as the `clj` binary wraps the JVM in `rlwrap` which then incorrectly interprets some of the ANSI escape sequences emitted by `spinner`. Some other readline alternatives (notably [Rebel Readline](https://github.com/bhauman/rebel-readline)) have been reported to work correctly.

#### deps-try

Doesn't work properly, for the same reason the `clj` command line doesn't work properly (`rlwrap` intercepts the ANSI escape sequences emitted by this library and misinterprets them).

#### Clojure CLI

```shell
Expand Down
7 changes: 3 additions & 4 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
;

{:deps
{jansi-clj/jansi-clj {:mvn/version "1.0.1"}
com.github.pmonks/clj-wcwidth {:mvn/version "1.0.64"}}
{jansi-clj/jansi-clj {:mvn/version "1.0.3"}
com.github.pmonks/clj-wcwidth {:mvn/version "1.0.85"}}
:aliases
{:build {:deps {io.github.clojure/tools.build {:git/tag "v0.9.5" :git/sha "24f2894"}
com.github.pmonks/pbr {:mvn/version "RELEASE"}}
{:build {:deps {com.github.pmonks/pbr {:mvn/version "RELEASE"}}
:ns-default pbr.build}}}
2 changes: 1 addition & 1 deletion src/progress/indeterminate.clj
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ long since your dog last pooped."
(clojure.core/print (str (ansi/apply-colours-and-attrs fg-colour bg-colour attributes (nth frames (mod i (count frames))))
" "))
(flush)
(Thread/sleep delay-in-ms)
(Thread/sleep ^Long delay-in-ms)
(ansi/restore-cursor!)
(jansi/erase-line!)
(print-pending-messages)
Expand Down

0 comments on commit fa85588

Please sign in to comment.