Skip to content

Commit

Permalink
Replace bors with Github native merge queue (#222)
Browse files Browse the repository at this point in the history
* Replace bors with Github native merge queue

* Try using `1.65.0` for compiling cargo-marker, but `1.71.1` for cargo fmt

* Add more comments

* Bump to 1.66 because `marker_api` uses the feature from there.

```
error[E0658]: custom discriminant values are not allowed in enums with tuple or struct variants
```

* Remove `split-debuginfo` to support an older version of rust toolchain
  • Loading branch information
Veetaha authored Aug 21, 2023
1 parent a4f7d0f commit 06b1928
Show file tree
Hide file tree
Showing 18 changed files with 219 additions and 286 deletions.
3 changes: 0 additions & 3 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ bless = "test --test uitest -- -- --bless"
dogfood = "run --bin cargo-marker -- marker --forward-rust-flags"
uilints = "test -p marker_uilints --test uitest"
uitest = "test --test uitest"

[profile.dev]
split-debuginfo = "unpacked"
129 changes: 129 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
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_TERM_COLOR: always
RUSTDOCFLAGS: --deny warnings
RUSTFLAGS: --deny warnings
# This disables incremental compilation for workspace packages and path deps.
# All other dependencies including registry deps will still use the incremental cache.
CARGO_INCREMENTAL: 0

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
# The version of toolchain here should track the latest stable
# version of Rust. The version of `cargo fmt` we use here doesn't
# influence the version of Rust that is used when `cargo-marker` is built.
- uses: dtolnay/[email protected]
- 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:
# We want a wide range of users to be able to build the project
# if they stick with an old version in their repository yet.
# Therefore we use an older toolchain version here. However,
# we may remove this and track the latest stable version once
# we ship pre-compiled binaries (#193). This way users wouldn't
# need to compile `cargo-marker` from sources and depend on the
# toolchain version that they have installed in their environment.
toolchain: 1.66.0

- 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.

Loading

0 comments on commit 06b1928

Please sign in to comment.