Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
paholg committed Feb 13, 2023
0 parents commit 2859c13
Show file tree
Hide file tree
Showing 7 changed files with 751 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
on:
push:
branches:
- main
pull_request:
branches:
- main

name: CI

jobs:
test-linux:
name: test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
rust:
- stable
- beta
- nightly
include:
- os: macos-latest
rust: stable
- os: windows-latest
rust: stable
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- uses: actions-rs/cargo@v1
with:
command: test
- uses: actions-rs/cargo@v1
with:
command: doc

clippy:
name: clippy + fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt, clippy
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
30 changes: 30 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
on:
push:
tags:
- 'v*'

name: Publish

jobs:
release:
name: GitHub Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false

publish:
name: Crates.io Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: katyo/publish-crates@v1
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
207 changes: 207 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[package]
name = "subenum"
version = "0.1.0"
edition = "2021"
authors = [ "Paho Lurie-Gregg <[email protected]>"]
documentation = "https://docs.rs/subenum"
repository = "https://github.com/paholg/subenum"
readme = "README.md"
license = "MIT OR Apache-2.0"
description = """A proc-macro to create subsets of enums, that can be converted
to and from."""
categories = ["development-tools::procedural-macro-helpers"]

[lib]
proc-macro = true
name = "subenum"

[dev-dependencies]
strum = { version = "0.24.1", features = ["derive"] }
trybuild = { version = "1.0.77", features = ["diff"] }

[dependencies]
quote = "1.0.23"
syn = { version = "1.0.107", features = ["full", "extra-traits"] }
proc-macro2 = "1.0.51"
heck = "0.4.1"
Loading

0 comments on commit 2859c13

Please sign in to comment.