Skip to content

Commit e59cb0d

Browse files
committed
chore: initial fork of divan
1 parent fedf402 commit e59cb0d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+15340
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: ['nvzqz']
2+
custom: ['https://paypal.me/nvzqz']
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
on: [push, pull_request]
2+
3+
name: CI
4+
5+
env:
6+
CARGO_HOME: ${{ github.workspace }}/.cargo
7+
CARGO_TERM_COLOR: always
8+
RUSTFLAGS: -D warnings -A unused-imports
9+
RUSTDOCFLAGS: -D warnings
10+
RUST_BACKTRACE: full
11+
12+
jobs:
13+
# Check formatting.
14+
rustfmt:
15+
name: Rustfmt
16+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- run: rustup update stable --no-self-update
21+
- run: rustc -Vv
22+
- run: cargo fmt --all -- --check
23+
24+
# Build documentation.
25+
rustdoc:
26+
name: Rustdoc
27+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: actions/[email protected]
32+
with:
33+
path: |
34+
${{ env.CARGO_HOME }}
35+
target
36+
key: rustdoc-${{ runner.os }}
37+
- run: rustup update stable --no-self-update
38+
- run: rustc -Vv
39+
- run: cargo rustdoc --all-features -- --document-private-items
40+
41+
# Run linter.
42+
clippy:
43+
name: Clippy
44+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
45+
runs-on: ${{ matrix.os }}
46+
strategy:
47+
matrix:
48+
os:
49+
- ubuntu-latest
50+
- macos-latest
51+
- windows-latest
52+
steps:
53+
- uses: actions/checkout@v4
54+
- uses: actions/[email protected]
55+
with:
56+
path: |
57+
${{ env.CARGO_HOME }}
58+
target
59+
key: clippy-${{ runner.os }}
60+
- run: rustup update stable --no-self-update
61+
- run: rustc -Vv
62+
- run: cargo clippy --all --all-targets --all-features
63+
64+
# Run tests in `src/` and `tests/`.
65+
unit-test:
66+
name: Unit Test
67+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
68+
runs-on: ${{ matrix.os }}
69+
strategy:
70+
matrix:
71+
os:
72+
- ubuntu-latest
73+
- macos-latest
74+
- windows-latest
75+
rust:
76+
- stable
77+
- nightly
78+
steps:
79+
- uses: actions/checkout@v4
80+
- uses: actions/[email protected]
81+
with:
82+
path: |
83+
${{ env.CARGO_HOME }}
84+
target
85+
key: unit-test-${{ runner.os }}-${{ matrix.rust }}
86+
- run: rustup default ${{ matrix.rust }}
87+
- run: rustup update ${{ matrix.rust }} --no-self-update
88+
- run: rustc -Vv
89+
- run: cargo test -p divan -p divan-macros
90+
91+
# Run tests in `src/` and `tests/` using Miri.
92+
unit-test-miri:
93+
name: Unit Test (Miri)
94+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
95+
runs-on: ubuntu-latest
96+
steps:
97+
- uses: actions/checkout@v4
98+
- uses: actions/[email protected]
99+
with:
100+
path: |
101+
${{ env.CARGO_HOME }}
102+
target
103+
key: miri-${{ runner.os }}
104+
- run: rustup default nightly
105+
- run: rustup update nightly --no-self-update
106+
- run: rustup component add miri
107+
- run: rustc -Vv
108+
- run: cargo miri test -p divan -p divan-macros
109+
110+
# Run `examples/` directory as tests.
111+
examples-test:
112+
name: Examples Test
113+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
114+
runs-on: ${{ matrix.os }}
115+
strategy:
116+
matrix:
117+
os:
118+
- ubuntu-latest
119+
- macos-latest
120+
- windows-latest
121+
rust:
122+
- stable
123+
- nightly
124+
env:
125+
DIVAN_ITEMS_COUNT: 0
126+
DIVAN_BYTES_COUNT: 1
127+
DIVAN_CHARS_COUNT: 2
128+
steps:
129+
- uses: actions/checkout@v4
130+
- uses: actions/[email protected]
131+
with:
132+
path: |
133+
${{ env.CARGO_HOME }}
134+
target
135+
key: examples-test-${{ runner.os }}-${{ matrix.rust }}
136+
- run: rustup default ${{ matrix.rust }}
137+
- run: rustup update ${{ matrix.rust }} --no-self-update
138+
- run: rustc -Vv
139+
- run: cargo test -p examples --all-features --benches
140+
141+
# Run `examples/` directory as benchmarks.
142+
examples-bench:
143+
name: Examples Bench
144+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
145+
runs-on: ${{ matrix.os }}
146+
env:
147+
# Run each benchmark within 2 seconds.
148+
DIVAN_MAX_TIME: 2
149+
strategy:
150+
matrix:
151+
os:
152+
- ubuntu-latest
153+
- macos-latest
154+
- windows-latest
155+
steps:
156+
- uses: actions/checkout@v4
157+
- uses: actions/[email protected]
158+
with:
159+
path: |
160+
${{ env.CARGO_HOME }}
161+
target
162+
key: examples-bench-${{ runner.os }}
163+
- run: rustup update stable --no-self-update
164+
- run: rustc -Vv
165+
- run: cargo bench -p examples --all-features
166+
167+
# Run `internal_benches/` directory as benchmarks.
168+
internals-bench:
169+
name: Internals Bench
170+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
171+
runs-on: ${{ matrix.os }}
172+
env:
173+
# Run each benchmark within 2 seconds.
174+
DIVAN_MAX_TIME: 2
175+
strategy:
176+
matrix:
177+
os:
178+
- ubuntu-latest
179+
- macos-latest
180+
- windows-latest
181+
steps:
182+
- uses: actions/checkout@v4
183+
- uses: actions/[email protected]
184+
with:
185+
path: |
186+
${{ env.CARGO_HOME }}
187+
target
188+
key: internals-bench-${{ runner.os }}
189+
- run: rustup update stable --no-self-update
190+
- run: rustc -Vv
191+
- run: cargo bench -p internal_benches --all-features
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
### Linux ###
2+
*~
3+
4+
# temporary files which can be created if a process still has a handle open of a deleted file
5+
.fuse_hidden*
6+
7+
# KDE directory preferences
8+
.directory
9+
10+
# Linux trash folder which might appear on any partition or disk
11+
.Trash-*
12+
13+
# .nfs files are created when an open file is removed but is still being accessed
14+
.nfs*
15+
16+
### macOS ###
17+
# General
18+
.DS_Store
19+
.AppleDouble
20+
.LSOverride
21+
22+
# Icon must end with two \r
23+
Icon
24+
25+
# Thumbnails
26+
._*
27+
28+
# Files that might appear in the root of a volume
29+
.DocumentRevisions-V100
30+
.fseventsd
31+
.Spotlight-V100
32+
.TemporaryItems
33+
.Trashes
34+
.VolumeIcon.icns
35+
.com.apple.timemachine.donotpresent
36+
37+
# Directories potentially created on remote AFP share
38+
.AppleDB
39+
.AppleDesktop
40+
Network Trash Folder
41+
Temporary Items
42+
.apdisk
43+
44+
### macOS Patch ###
45+
# iCloud generated files
46+
*.icloud
47+
48+
### Rust ###
49+
# Generated by Cargo
50+
# will have compiled files and executables
51+
debug/
52+
target/
53+
54+
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
55+
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
56+
Cargo.lock
57+
58+
# These are backup files generated by rustfmt
59+
**/*.rs.bk
60+
61+
# MSVC Windows builds of rustc generate these, which store debugging information
62+
*.pdb
63+
64+
### Windows ###
65+
# Windows thumbnail cache files
66+
Thumbs.db
67+
Thumbs.db:encryptable
68+
ehthumbs.db
69+
ehthumbs_vista.db
70+
71+
# Dump file
72+
*.stackdump
73+
74+
# Folder config file
75+
[Dd]esktop.ini
76+
77+
# Recycle Bin used on file shares
78+
$RECYCLE.BIN/
79+
80+
# Windows Installer files
81+
*.cab
82+
*.msi
83+
*.msix
84+
*.msm
85+
*.msp
86+
87+
# Windows shortcuts
88+
*.lnk

0 commit comments

Comments
 (0)