-
Notifications
You must be signed in to change notification settings - Fork 5
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
0 parents
commit 9570134
Showing
16 changed files
with
1,095 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,8 @@ | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
informational: true | ||
patch: | ||
default: | ||
target: 0% |
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,8 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"local>oxidecomputer/renovate-config", | ||
"local>oxidecomputer/renovate-config//rust/autocreate", | ||
"local>oxidecomputer/renovate-config//actions/pin" | ||
] | ||
} |
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,58 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
name: CI | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
env: | ||
RUSTFLAGS: -D warnings | ||
steps: | ||
- uses: actions/checkout@v4.1.1 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: rustfmt, clippy | ||
- uses: Swatinem/rust-cache@v2.7.2 | ||
- name: Lint (clippy) | ||
run: cargo clippy --all-features --all-targets | ||
- name: Lint (rustfmt) | ||
run: cargo xfmt --check | ||
- name: Run rustdoc | ||
env: | ||
RUSTC_BOOTSTRAP: 1 # for feature(doc_cfg) | ||
RUSTDOCFLAGS: -Dwarnings --cfg doc_cfg | ||
run: cargo doc --all-features --workspace | ||
- name: Check for differences | ||
run: git diff --exit-code | ||
|
||
build: | ||
name: Build and test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
rust-version: ["1.60", stable] | ||
fail-fast: false | ||
env: | ||
RUSTFLAGS: -D warnings | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.rust-version }} | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: taiki-e/install-action@cargo-hack | ||
- uses: taiki-e/install-action@nextest | ||
- name: Build | ||
run: cargo hack build --feature-powerset | ||
- name: Test | ||
run: cargo hack nextest run --feature-powerset | ||
- name: Run doctests | ||
run: cargo test --doc --all-features |
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,35 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
name: Test coverage | ||
|
||
jobs: | ||
coverage: | ||
name: Collect test coverage | ||
runs-on: ubuntu-latest | ||
# nightly rust might break from time to time | ||
continue-on-error: true | ||
env: | ||
RUSTFLAGS: -D warnings | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | ||
- uses: dtolnay/rust-toolchain@nightly # Use nightly to get access to coverage --doc | ||
with: | ||
components: llvm-tools-preview | ||
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2 | ||
- name: Install latest nextest release | ||
uses: taiki-e/install-action@nextest | ||
- name: Install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
|
||
- name: Collect coverage data | ||
run: ./scripts/commands.sh coverage | ||
- name: Upload coverage data to codecov | ||
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3 | ||
with: | ||
files: lcov.info, lcov-doctest.info |
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,33 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
name: Docs | ||
|
||
jobs: | ||
docs: | ||
name: Build and deploy documentation | ||
concurrency: ci-${{ github.ref }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Build rustdoc | ||
env: | ||
RUSTC_BOOTSTRAP: 1 # for feature(doc_cfg) | ||
RUSTDOCFLAGS: -Dwarnings --cfg doc_cfg | ||
run: cargo doc --all-features --workspace | ||
- name: Organize | ||
run: | | ||
rm -rf target/gh-pages | ||
mkdir target/gh-pages | ||
mv target/doc target/gh-pages/rustdoc | ||
touch target/gh-pages/.nojekyll | ||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@releases/v4 | ||
with: | ||
branch: gh-pages | ||
folder: target/gh-pages | ||
single-commit: true |
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,29 @@ | ||
# adapted from https://github.com/taiki-e/cargo-hack/blob/main/.github/workflows/release.yml | ||
|
||
name: Publish release | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
create-release: | ||
if: github.repository_owner == 'oxidecomputer' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
- run: cargo publish | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | ||
- uses: taiki-e/create-gh-release-action@v1 | ||
with: | ||
changelog: CHANGELOG.md | ||
title: cancel-safe-futures $version | ||
branch: main | ||
prefix: cancel-safe-futures | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 @@ | ||
/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,31 @@ | ||
[package] | ||
name = "newtype-uuid" | ||
version = "0.1.0" | ||
edition = "2021" | ||
license = "MIT OR Apache-2.0" | ||
repository = "https://github.com/oxidecomputer/newtype-uuid" | ||
description = "Newtype wrapper around UUIDs" | ||
documentation = "https://docs.rs/newtype-uuid" | ||
readme = "README.md" | ||
keywords = ["uuid", "unique", "guid", "newtype"] | ||
categories = ["data-structures", "uuid"] | ||
rust-version = "1.60" | ||
resolver = "2" | ||
exclude = [".cargo/**/*", ".github/**/*", "scripts/**/*"] | ||
|
||
[package.metadata.docs.rs] | ||
all-features = true | ||
rustdoc-args = ["--cfg=doc_cfg"] | ||
|
||
[dependencies] | ||
serde = { version = "1", optional = true, features = ["derive"] } | ||
schemars = { version = "0.8", features = ["uuid1"], optional = true } | ||
uuid = { version = "1.7.0", default-features = false } | ||
|
||
[features] | ||
default = ["uuid/default", "std"] | ||
std = ["uuid/std", "alloc"] | ||
alloc = [] | ||
v4 = ["uuid/v4"] | ||
serde = ["dep:serde", "uuid/serde"] | ||
schemars08 = ["dep:schemars", "std"] |
Oops, something went wrong.