Skip to content

Commit

Permalink
Merge pull request #10 from mamantoha/develop
Browse files Browse the repository at this point in the history
develop
  • Loading branch information
mamantoha authored Aug 2, 2022
2 parents 085d30a + 34644e5 commit 12a3b7a
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 21 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/crystal.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Crystal CI

on: [push, pull_request]
on:
push:
pull_request:
schedule:
- cron: "0 0 * * *"

jobs:
check_format:
Expand All @@ -10,7 +14,7 @@ jobs:
uses: crystal-lang/install-crystal@v1
- uses: actions/checkout@v2
- name: Install dependencies
run: shards install --ignore-crystal-version
run: shards install
- name: Check format
run: crystal tool format --check

Expand All @@ -19,10 +23,10 @@ jobs:
fail-fast: false
matrix:
include:
- {os: ubuntu-latest, crystal: latest}
- {os: ubuntu-latest, crystal: nightly}
- {os: macos-latest}
- {os: windows-latest}
- { os: ubuntu-latest, crystal: latest }
- { os: ubuntu-latest, crystal: nightly }
- { os: macos-latest }
- { os: windows-latest }
runs-on: ${{ matrix.os }}
steps:
- name: Install Crystal
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: website

on:
push:
branches: [ master ]
branches: [master]

jobs:
publish:
Expand All @@ -12,11 +12,10 @@ jobs:
uses: crystal-lang/install-crystal@v1
- uses: actions/checkout@v2
- name: Install dependencies
run: shards install --ignore-crystal-version
run: shards install
- name: Generate documentation
run: crystal docs
-
name: Deploy to GitHub Pages
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
/doc/
/docs/
/lib/
/bin/
/.shards/
*.dwarf

# Libraries don't need dependency lock
# Dependencies will be locked in applications that use them
/shard.lock
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018-2021 Anton Maminov
Copyright (c) 2018-2022 Anton Maminov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ Nanoid.generate(size: 10, alphabet: "1234567890abcdef", secure: false)
`crystal run --release bench/benchmark.cr`

```console
Crystal 1.1.0-dev [e7b46c407] (2021-03-30)
Crystal 1.6.0-dev [8cb915f95] (2022-08-01)

LLVM: 10.0.0
Default target: x86_64-unknown-linux-gnu

Nanoid.simple_generate(21) 1.93 (517.44ms) (± 8.59%) 76.3MB/op fastest
Nanoid.complex_generate(21) 1.05 (950.32ms) (± 3.96%) 91.6MB/op 1.84× slower
UUID v4 1.59 (628.64ms) (±14.80%) 168MB/op 1.21× slower
Nanoid.simple_generate(36) 992.75m ( 1.01s ) (±19.92%) 107MB/op 1.51× slower
Nanoid.complex_generate(36) 796.97m ( 1.25s ) (±20.35%) 122MB/op 1.89× slower
UUID v4 1.50 (664.97ms) (±16.80%) 168MB/op fastest
Nanoid.simple_generate(21) 2.81 (355.35ms) (± 1.22%) 76.3MB/op fastest
Nanoid.complex_generate(21) 1.58 (633.44ms) (± 3.91%) 91.7MB/op 1.78× slower
UUID v4 2.44 (409.74ms) (± 1.61%) 168MB/op 1.15× slower
Nanoid.simple_generate(36) 1.88 (530.88ms) (± 1.62%) 107MB/op 1.25× slower
Nanoid.complex_generate(36) 1.27 (785.09ms) (± 6.24%) 122MB/op 1.84× slower
UUID v4 2.35 (425.85ms) (± 4.11%) 168MB/op fastest
```

## Development
Expand Down Expand Up @@ -94,6 +94,6 @@ crystal spec

## License

Copyright: 2018-2021 Anton Maminov (anton.maminov@gmail.com)
Copyright: 2018-2022 Anton Maminov (anton.maminov@gmail.com)

This library is distributed under the MIT license. Please see the LICENSE file.
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: nanoid
version: 0.7.0
version: 0.7.1

authors:
- Anton Maminov <anton.maminov@gmail.com>
Expand Down

0 comments on commit 12a3b7a

Please sign in to comment.