Skip to content

Commit

Permalink
Merge pull request #101 from nathaniel-daniel/remove-actions-rs
Browse files Browse the repository at this point in the history
Remove `actions-rs`
  • Loading branch information
octavonce authored Sep 14, 2023
2 parents ec76cf5 + 102587d commit d5e96e1
Showing 1 changed file with 16 additions and 52 deletions.
68 changes: 16 additions & 52 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,107 +24,71 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
profile: minimal
default: true

- name: Build (secure)
uses: actions-rs/cargo@v1
with:
command: build
run: cargo build --features secure

- name: Test (secure)
uses: actions-rs/cargo@v1
with:
command: test
run: cargo test --features secure

- name: Test libmimalloc-sys crate bindings (secure)
uses: actions-rs/cargo@v1
with:
command: run
args: -p libmimalloc-sys-test
run: cargo run --features secure -p libmimalloc-sys-test

- name: Build (no secure)
uses: actions-rs/cargo@v1
with:
command: build
args: --no-default-features
run: cargo build

- name: Test (no secure)
uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features
run: cargo test

- name: Test libmimalloc-sys crate bindings (no secure)
uses: actions-rs/cargo@v1
with:
command: run
args: --no-default-features -p libmimalloc-sys-test
run: cargo run -p libmimalloc-sys-test

lint:
name: Rustfmt / Clippy
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy

- name: Fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check

- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace -- -D warnings
run: cargo clippy --workspace -- -D warnings

# Detect cases where documentation links would be dead
doc:
name: Check documentation
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- uses: dtolnay/rust-toolchain@nightly

# Note: We need to use nightly rust, and `cargo rustdoc` (yes, not `cargo
# doc`) to actually get it to respect -D warnings... Using nightly also
# gets us the nicer syntax for linking to functions, and is in-line with
# what docs.rs uses.

- name: 'Check documentation links in `mimalloc`'
uses: actions-rs/cargo@v1
with:
command: rustdoc
args: -- -D warnings
run: cargo rustdoc -- -D warnings

- name: 'Check documentation links in `libmimalloc-sys`'
uses: actions-rs/cargo@v1
with:
command: rustdoc
args: -p libmimalloc-sys -- -D warnings
run: cargo rustdoc -p libmimalloc-sys -- -D warnings

0 comments on commit d5e96e1

Please sign in to comment.