-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f73624
commit 49852e1
Showing
17 changed files
with
1,070 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Templated by `cargo-generate` using https://github.com/danielhenrymantilla/proc-macro-template | ||
[alias] | ||
docs-rs = [ | ||
"doc", "--no-deps", "--open", | ||
"--features", "docs-rs", | ||
] | ||
|
||
[build] | ||
rustdocflags = [ | ||
"--html-before-content", "fix-docsrs-li-details-summary.html", | ||
] | ||
|
||
[doc.extern-map.registries] | ||
crates-io = "https://docs.rs/" | ||
|
||
[profile.rust-analyzer] | ||
inherits = "dev" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
name: CI | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
# == CHECK == # | ||
check: | ||
name: "Check beta stable and MSRV=1.65.0" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust-toolchain: | ||
- 1.65.0 | ||
- stable | ||
# Try to guard against a near-future regression. | ||
- beta | ||
cargo-locked: ['', '--locked'] | ||
feature-nightly-dropck_eyepatch: ['', '--features nightly-dropck_eyepatch'] | ||
exclude: | ||
# MSRV guarantee only stands for `.lock`-tested dependencies. | ||
- rust-toolchain: 1.65.0 | ||
cargo-locked: '' | ||
steps: | ||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: ${{ matrix.rust-toolchain }} | ||
override: true | ||
|
||
- name: Clone repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Update `Cargo.lock` | ||
if: matrix.cargo-locked != '--locked' | ||
run: cargo update -v | ||
|
||
- name: Cargo check | ||
uses: actions-rs/cargo@v1 | ||
env: | ||
RUSTC_BOOTSTRAP: 1 | ||
with: | ||
command: check | ||
args: ${{ matrix.cargo-locked }} ${{ matrix.feature-nightly-dropck_eyepatch }} | ||
|
||
# == BUILD & TEST == # | ||
build-and-test: | ||
name: Build and test | ||
runs-on: ${{ matrix.os }} | ||
needs: [] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
rust-toolchain: | ||
- 1.65.0 | ||
- stable | ||
steps: | ||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: default | ||
override: true | ||
toolchain: ${{ matrix.rust-toolchain }} | ||
|
||
- name: Clone repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: cargo test --lib --tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --lib --tests | ||
|
||
- name: cargo test --doc | ||
if: matrix.rust-toolchain == 'stable' | ||
uses: actions-rs/cargo@v1 | ||
env: | ||
RUSTC_BOOTSTRAP: 1 | ||
with: | ||
command: test | ||
args: --features better-docs --doc | ||
|
||
required-jobs: | ||
needs: | ||
- check | ||
- build-and-test | ||
runs-on: ubuntu-latest | ||
if: ${{ always() }} | ||
steps: | ||
- name: 'All required jobs' | ||
run: | | ||
RESULT=$(echo "${{ join(needs.*.result, '') }}" | sed -e "s/success//g") | ||
if [ -n "$RESULT" ]; then | ||
echo "❌" | ||
false | ||
fi | ||
echo "✅" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Templated by `cargo-generate` using https://github.com/danielhenrymantilla/proc-macro-template | ||
name: Cron CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: '0 8 * * 1,5' | ||
|
||
jobs: | ||
# == TEST == # | ||
test-no-ui: | ||
name: (Check & Build &) Test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
rust-toolchain: | ||
# Future-proof against compiler-regressions | ||
- beta | ||
- nightly | ||
cargo-locked: ['--locked'] | ||
feature-nightly-dropck_eyepatch: ['', '--features nightly-dropck_eyepatch'] | ||
include: | ||
# Also future-proof against semver breakage from dependencies. | ||
- rust-toolchain: stable | ||
cargo-locked: '' | ||
steps: | ||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: default | ||
override: true | ||
toolchain: ${{ matrix.rust-toolchain }} | ||
|
||
- name: Clone repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Update `Cargo.lock` | ||
if: matrix.cargo-locked != '--locked' | ||
run: cargo update -v | ||
|
||
- name: Cargo test | ||
uses: actions-rs/cargo@v1 | ||
env: | ||
RUSTC_BOOTSTRAP: 1 | ||
with: | ||
command: test | ||
args: | | ||
--features better-docs | ||
${{ matrix.cargo-locked }} | ||
${{ matrix.feature-nightly-dropck_eyepatch }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Templated by `cargo-generate` using https://github.com/danielhenrymantilla/proc-macro-template | ||
/target |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Templated by `cargo-generate` using https://github.com/danielhenrymantilla/proc-macro-template | ||
[package] | ||
name = "maybe-dangling" | ||
authors = [ | ||
"Daniel Henry-Mantilla <[email protected]>", | ||
] | ||
version = "0.1.0-rc1" # Keep in sync | ||
edition = "2021" | ||
rust-version = "1.65.0" | ||
|
||
license = "Zlib OR MIT OR Apache-2.0" | ||
repository = "https://github.com/danielhenrymantilla/maybe-dangling.rs" | ||
documentation = "https://docs.rs/maybe-dangling" | ||
readme = "README.md" | ||
|
||
description = "`ManuallyDrop<T>` and `MaybeDangling<T>` semantics in stable Rust as per https://github.com/rust-lang/rfcs/pull/3336" | ||
keywords = ["unsafe", "dangling", "aliasing", "dereferenceable", "manuallydrop"] | ||
|
||
[features] | ||
default = [ | ||
] | ||
|
||
# Enable and use `#![feature(dropck_eyepatch)]` for `MaybeDangling`. | ||
nightly-dropck_eyepatch = [] | ||
|
||
# unstable! Will probably use nightly to improve doc quality | ||
better-docs = [] | ||
|
||
ui-tests = [ | ||
"better-docs", | ||
] | ||
|
||
# `docs-rs` is very similar to `better-docs`, but for it being allowed to enable | ||
# other features as well, often to make sure optional/non-`default` features | ||
# make it to the rendered docs (using `--all-features` instead is not that great). | ||
docs-rs = [ | ||
"better-docs", | ||
] | ||
|
||
[dependencies] | ||
|
||
[dev-dependencies] | ||
|
||
[workspace] | ||
|
||
[package.metadata.docs.rs] | ||
features = [ | ||
"docs-rs", | ||
] | ||
rustdoc-args = [ | ||
# Use (with or without `open`): | ||
# ```md | ||
# <details open class="custom"><summary><span class="summary-box"><span>Click to hide</span></span></summary> | ||
# … | ||
# </details> | ||
# ``` | ||
# to get nice drop-down menus (and avoid the css bug with rustdoc). | ||
"--html-before-content", "fix-docsrs-li-details-summary.html", | ||
] |
Oops, something went wrong.