Skip to content

Commit 5c78000

Browse files
committed
Initial commit of compiler tooling
1 parent 4966b52 commit 5c78000

File tree

14 files changed

+751
-0
lines changed

14 files changed

+751
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
**/target/
2+
# These are backup files generated by rustfmt
3+
**/*.rs.bk
4+

compiler/.github/codecov.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
threshold: 1%
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
paths:
6+
- '**.rs'
7+
- .github/workflows/cargo-clippy.yml
8+
- Cargo.lock
9+
- Cargo.toml
10+
- rust-toolchain
11+
- rust-toolchain.toml
12+
pull_request:
13+
paths:
14+
- '**.rs'
15+
- .github/workflows/cargo-clippy.yml
16+
- Cargo.lock
17+
- Cargo.toml
18+
- rust-toolchain
19+
- rust-toolchain.toml
20+
name: cargo clippy
21+
jobs:
22+
cargoclippy:
23+
name: cargo clippy --tests --benches --examples
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v3
27+
with:
28+
submodules: recursive
29+
token: ${{secrets.GLOBAL_PAT}}
30+
31+
- name: Install latest rust
32+
uses: actions-rs/toolchain@v1
33+
with:
34+
toolchain: stable
35+
override: true
36+
components: clippy
37+
38+
- name: Rust Cache
39+
uses: Swatinem/[email protected]
40+
41+
- uses: actions-rs/clippy-check@v1
42+
with:
43+
token: ${{ secrets.GITHUB_TOKEN }}
44+
args: "--benches --tests --examples --all-features -- -D warnings"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
paths:
6+
- '**.rs'
7+
- .github/workflows/cargo-test.yml
8+
- Cargo.lock
9+
- Cargo.toml
10+
- rust-toolchain.toml
11+
pull_request:
12+
paths:
13+
- '**.rs'
14+
- .github/workflows/cargo-test.yml
15+
- Cargo.lock
16+
- Cargo.toml
17+
- rust-toolchain.toml
18+
workflow_dispatch:
19+
permissions: read-all
20+
name: cargo test
21+
jobs:
22+
cargotest:
23+
name: cargo test
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v3
27+
28+
- uses: EmbarkStudios/cargo-deny-action@v1
29+
with:
30+
log-level: warn
31+
command: check bans licenses sources
32+
arguments: --all-features
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
paths:
6+
- '**.rs'
7+
- .github/workflows/cargo-test.yml
8+
- Cargo.lock
9+
- Cargo.toml
10+
- rust-toolchain.toml
11+
pull_request:
12+
paths:
13+
- '**.rs'
14+
- .github/workflows/cargo-test.yml
15+
- Cargo.lock
16+
- Cargo.toml
17+
- rust-toolchain.toml
18+
workflow_dispatch:
19+
permissions: read-all
20+
name: cargo test
21+
jobs:
22+
cargotest:
23+
name: cargo test
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v3
27+
28+
- name: Install latest rust
29+
uses: actions-rs/toolchain@v1
30+
with:
31+
toolchain: stable
32+
override: true
33+
34+
- uses: taiki-e/install-action@cargo-llvm-cov
35+
- uses: taiki-e/install-action@nextest
36+
37+
- name: Rust Cache
38+
uses: Swatinem/[email protected]
39+
40+
- name: cargo test
41+
shell: bash
42+
run: |
43+
cargo llvm-cov nextest --all-features --lcov --output-path lcov.info
44+
env:
45+
RUST_BACKTRACE: 1
46+
47+
- name: Upload to codecov.io
48+
uses: codecov/codecov-action@v3
49+
with:
50+
token: ${{secrets.CODECOV_TOKEN}}
51+
fail_ci_if_error: true
52+
flags: unittests
53+
verbose: true
54+
files: lcov.info

0 commit comments

Comments
 (0)