Skip to content

Commit

Permalink
Replace bors with Github native merge queue
Browse files Browse the repository at this point in the history
  • Loading branch information
Veetaha committed Aug 19, 2023
1 parent 74554e7 commit 987cd7d
Show file tree
Hide file tree
Showing 17 changed files with 207 additions and 283 deletions.
117 changes: 117 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: ci

on:
# Makes it possible to trigger via the GitHub UI (Actions tab)
workflow_dispatch:
merge_group:
pull_request:
push:
branches:
- master

defaults:
run:
shell: bash

env:
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
RUSTDOCFLAGS: --deny warnings
RUSTFLAGS: --deny warnings

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
rust-test:
runs-on: ${{ matrix.os }}-latest

strategy:
matrix:
os: [ubuntu, windows, macos]

steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1

- run: cargo test --locked

rust-lint:
runs-on: ${{ matrix.os }}-latest

strategy:
matrix:
os: [ubuntu, windows, macos]

steps:
- uses: actions/checkout@v3
- uses: actions-rust-lang/setup-rust-toolchain@v1

- run: cargo clippy
- run: cargo doc --no-deps

rust-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# We don't need any cache here, so use dtolnay action directly
- uses: dtolnay/rust-toolchain@stable
- run: cargo fmt --check

# This job ensures required packages can be built with a stable toolchain
# except for some special ones that require nightly
rust-check-on-stable:
runs-on: ${{ matrix.os }}-latest

strategy:
matrix:
os: [ubuntu, windows, macos]

steps:
- uses: actions/checkout@v3
- run: rm rust-toolchain.toml
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable

- run: >-
cargo check
--locked
--workspace
--exclude marker_rustc_driver
--exclude marker_lints
# Check for unused dependencies that uses simple regex search,
# meaning it's ⚡️ blazingly ⚡️ fast
rust-unused-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: scripts/download/cargo-machete.sh
- run: cargo-machete

# Check the formatting of TOML files in the repository
toml:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: scripts/download/taplo.sh
- run: taplo fmt --check

# Check for typos in the repository based on a static dictionary
typos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: scripts/download/typos.sh
- run: typos

# Check that the documentation can be built
mdbook:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: scripts/download/mdbook.sh
- run: mdbook build docs/book
25 changes: 0 additions & 25 deletions .github/workflows/docs.yml

This file was deleted.

7 changes: 2 additions & 5 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,8 @@ jobs:
mkdir deploy
cp ./docs/index.html ./deploy/index.html
- name: Build the book
run: |
PATH="$PATH:`pwd`"
cd ./docs/book/
mdbook build --dest-dir ../../deploy/book
cd ../../
run: mdbook build docs/book --dest-dir deploy/book

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
Expand Down
96 changes: 0 additions & 96 deletions .github/workflows/rust.yml

This file was deleted.

97 changes: 0 additions & 97 deletions .github/workflows/rust_bors.yml

This file was deleted.

12 changes: 0 additions & 12 deletions bors.toml

This file was deleted.

4 changes: 2 additions & 2 deletions docs/book/src/usage/setting-lint-levels.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ lint attributes you might usually use, on marker provided lints, like `#[allow(m
```

#### Nightly Lint Attribute
```
```rust
// Marker lints can be controlled like this
#[allow(marker::my_lint)]
fn foo() {}
Expand Down Expand Up @@ -49,7 +49,7 @@ check, like this: `#[cfg_attr(marker = "my_crate", allow(marker::foo))]`.
```

#### Stable Conditional Lint Attribute
```
```rust
// Marker lints can be controlled like this
#[cfg_attr(marker, allow(marker::my_lint))]
fn foo() {}
Expand Down
Loading

0 comments on commit 987cd7d

Please sign in to comment.