Skip to content

Commit 898ef6c

Browse files
authored
Merge pull request #2 from karthiknadig/gha1
GHA for PR/CI
2 parents 206866d + dda5b6d commit 898ef6c

File tree

5 files changed

+302
-4
lines changed

5 files changed

+302
-4
lines changed

.github/workflows/lint.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches-ignore:
7+
- main
8+
- release*
9+
10+
jobs:
11+
clippy:
12+
name: Clippy and Format Check
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Rust Tool Chain setup
19+
uses: dtolnay/rust-toolchain@stable
20+
with:
21+
toolchain: stable
22+
23+
- name: Install clippy
24+
run: rustup component add clippy
25+
26+
- name: Cargo Fetch
27+
run: cargo fetch
28+
29+
- name: Check
30+
run: cargo fmt --all -- --check
31+
32+
- name: Run Clippy
33+
run: cargo clippy --all-features -- -Dwarnings

.github/workflows/pr-check.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: PR/CI Check
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches-ignore:
7+
- main
8+
- release*
9+
10+
jobs:
11+
unit-tests:
12+
name: Unit Tests
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
- os: windows-latest
19+
target: x86_64-pc-windows-msvc
20+
- os: windows-latest
21+
target: aarch64-pc-windows-msvc
22+
- os: ubuntu-latest
23+
target: x86_64-unknown-linux-musl
24+
# - os: ubuntu-latest
25+
# target: aarch64-unknown-linux-gnu
26+
# - os: ubuntu-latest
27+
# target: arm-unknown-linux-gnueabihf
28+
- os: macos-latest
29+
target: x86_64-apple-darwin
30+
- os: macos-14
31+
target: aarch64-apple-darwin
32+
- os: ubuntu-latest
33+
target: x86_64-unknown-linux-musl
34+
vsix-target: alpine-x64
35+
# - os: ubuntu-latest
36+
# target: aarch64-unknown-linux-musl
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@v4
40+
41+
- name: Rust Tool Chain setup
42+
uses: dtolnay/rust-toolchain@stable
43+
with:
44+
toolchain: stable
45+
targets: ${{ matrix.target }}
46+
47+
- name: Cargo Fetch
48+
run: cargo fetch
49+
50+
- name: Run Tests
51+
run: cargo test --frozen --all-features

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
debug/
44
target/
55

6-
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
7-
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
8-
Cargo.lock
9-
106
# These are backup files generated by rustfmt
117
**/*.rs.bk
128

Cargo.lock

Lines changed: 218 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cargo.toml renamed to Cargo.toml

File renamed without changes.

0 commit comments

Comments
 (0)