Skip to content

Commit 62aa0d8

Browse files
authored
Merge pull request #1 from akarsh1995/ci
v0.1.0
2 parents 420410c + 285cb30 commit 62aa0d8

Some content is hidden

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

41 files changed

+2054
-828
lines changed

.github/workflows/ci.yml

+197
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ '*' ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
build:
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os: [ubuntu-latest, macos-latest, windows-latest]
18+
rust: [nightly, stable, '1.70']
19+
runs-on: ${{ matrix.os }}
20+
continue-on-error: ${{ matrix.rust == 'nightly' }}
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
25+
- name: Restore cargo cache
26+
uses: actions/cache@v2
27+
env:
28+
cache-name: ci
29+
with:
30+
path: |
31+
~/.cargo/registry
32+
~/.cargo/git
33+
~/.cargo/bin
34+
target
35+
key: ${{ matrix.os }}-${{ env.cache-name }}-${{ matrix.rust }}-${{ hashFiles('Cargo.lock') }}
36+
37+
- name: MacOS Workaround
38+
if: matrix.os == 'macos-latest'
39+
run: cargo clean -p serde_derive -p thiserror
40+
41+
- name: Install Rust
42+
uses: actions-rs/toolchain@v1
43+
with:
44+
toolchain: ${{ matrix.rust }}
45+
default: true
46+
override: true
47+
profile: minimal
48+
components: clippy
49+
50+
- name: Build Debug
51+
run: |
52+
cargo build
53+
54+
- name: Run tests
55+
run: cargo test
56+
57+
- name: Run clippy
58+
run: |
59+
cargo clippy --workspace --all-features
60+
61+
- name: Build Release
62+
run: cargo build --release
63+
64+
- name: Test Install
65+
run: cargo install --path "." --force
66+
67+
- name: Binary Size (unix)
68+
if: matrix.os != 'windows-latest'
69+
run: |
70+
ls -l ./target/release/leetui
71+
72+
- name: Binary Size (win)
73+
if: matrix.os == 'windows-latest'
74+
run: |
75+
ls -l ./target/release/leetui.exe
76+
77+
- name: Binary dependencies (mac)
78+
if: matrix.os == 'macos-latest'
79+
run: |
80+
otool -L ./target/release/leetui
81+
82+
- name: Build MSI (windows)
83+
if: matrix.os == 'windows-latest'
84+
run: |
85+
cargo install cargo-wix --version 0.3.3
86+
cargo wix --version
87+
cargo wix -p leetui --no-build --nocapture --output ./target/wix/leetui.msi
88+
ls -l ./target/wix/leetui.msi
89+
90+
build-linux-musl:
91+
runs-on: ubuntu-latest
92+
strategy:
93+
fail-fast: false
94+
matrix:
95+
rust: [nightly, stable, '1.70']
96+
continue-on-error: ${{ matrix.rust == 'nightly' }}
97+
steps:
98+
- uses: actions/checkout@master
99+
- name: Install Rust
100+
uses: actions-rs/toolchain@v1
101+
with:
102+
toolchain: ${{ matrix.rust }}
103+
profile: minimal
104+
default: true
105+
override: true
106+
target: x86_64-unknown-linux-musl
107+
108+
- name: Setup MUSL
109+
run: |
110+
sudo apt-get -qq install musl-tools && sudo apt-get -y install libssl-dev && sudo apt-get -y install pkg-config
111+
- name: Build Debug
112+
run: |
113+
cargo build --target=x86_64-unknown-linux-musl
114+
./target/x86_64-unknown-linux-musl/debug/leetui --version
115+
- name: Build Release
116+
run: |
117+
cargo build --release --target=x86_64-unknown-linux-musl
118+
./target/x86_64-unknown-linux-musl/release/leetui --version
119+
ls -l ./target/x86_64-unknown-linux-musl/release/leetui
120+
- name: Test
121+
run: |
122+
cargo test --workspace --target=x86_64-unknown-linux-musl
123+
- name: Test Install
124+
run: cargo install --path "." --force
125+
126+
linting:
127+
name: Lints
128+
runs-on: ubuntu-latest
129+
steps:
130+
- uses: actions/checkout@master
131+
- name: Install Rust
132+
uses: actions-rs/toolchain@v1
133+
with:
134+
toolchain: stable
135+
override: true
136+
components: rustfmt
137+
138+
- run: cargo fmt -- --check
139+
140+
- name: cargo-sort
141+
run: |
142+
cargo install cargo-sort --force
143+
cargo sort -c -w
144+
145+
- name: cargo-deny install
146+
run: |
147+
cargo install --locked cargo-deny
148+
149+
# - name: cargo-deny licenses
150+
# run: |
151+
# cargo deny check licenses
152+
153+
- name: cargo-deny bans
154+
run: |
155+
cargo deny check bans
156+
157+
udeps:
158+
name: udeps
159+
runs-on: ubuntu-latest
160+
steps:
161+
- uses: actions/checkout@master
162+
- name: Install Rust
163+
uses: actions-rs/toolchain@v1
164+
with:
165+
toolchain: nightly
166+
override: true
167+
168+
- name: cargo-udeps
169+
run: |
170+
# cargo install --locked cargo-udeps
171+
cargo install --git https://github.com/est31/cargo-udeps --locked
172+
cargo +nightly udeps --all-targets
173+
174+
175+
# sec:
176+
# name: Security audit
177+
# runs-on: ubuntu-latest
178+
# steps:
179+
# - uses: actions/checkout@v2
180+
# - uses: actions-rs/audit-check@v1
181+
# with:
182+
# token: ${{ secrets.GITHUB_TOKEN }}
183+
184+
# log-test:
185+
# name: Changelog Test
186+
# runs-on: ubuntu-latest
187+
# steps:
188+
# - uses: actions/checkout@master
189+
# - name: Extract release notes
190+
# id: extract_release_notes
191+
# uses: ffurrer2/extract-release-notes@v1
192+
# with:
193+
# release_notes_file: ./release-notes.txt
194+
# - uses: actions/upload-artifact@v1
195+
# with:
196+
# name: release-notes.txt
197+
# path: ./release-notes.txt

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
leetcode.sqlite
44
config.toml
55
src/.vscode
6+
src/app_ui/components
7+
src/app_ui/widgets

CHANGELOG.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
## [Unreleased]
6+
7+
- Fix config directories setup for windows
8+
9+
- Take input directly from the user lc session
10+
11+
- Sort tags/questions by least accepted.
12+
13+
- Sort by likes dislikes ratio.
14+
15+
- Color question by accepted.
16+
17+
- Search feature.
18+
19+
- Select multiple tags.
20+
21+
- Submit directly.
22+
23+
- Summary of the question
24+
- Submission stats
25+
- View more question details
26+
27+
- Invalidate questions cache through `userSessionProgress`
28+
29+
30+
## [0.1.0] - 2023-07-19
31+
32+
### Added
33+
34+
- List all tags
35+
- Array
36+
- Hash Table
37+
- Linked List
38+
- Math
39+
- Recursion
40+
- Etc
41+
- List questions related to the tag.
42+
43+
- Stats of the selected tag.
44+
- Total Attempted, Solved (Easy, Medium, Hard) by tag.
45+
46+
- Scrollable View of questions corresponding to the tags.
47+
48+
- Read question in the popup using `Enter` key on the selected question.
49+
50+

0 commit comments

Comments
 (0)