refactor(hstr): Allow &'static str
and make interning optional
#76
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
name: CI | |
on: | |
pull_request: | |
types: ["opened", "reopened", "synchronize"] | |
push: | |
branches: | |
- main | |
env: | |
CI: 1 | |
CARGO_INCREMENTAL: 0 | |
CARGO_TERM_COLOR: "always" | |
DIFF: 0 | |
# For faster CI | |
RUST_LOG: "off" | |
jobs: | |
cargo-fmt: | |
name: Cargo fmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# We explicitly do this to cache properly. | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
components: rustfmt | |
- run: cargo fmt --all -- --check | |
cargo-clippy: | |
name: Cargo clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
components: clippy | |
- run: cargo clippy --all --all-targets -- -D warnings | |
cargo-deny: | |
name: Check license of dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
- name: Install cargo-deny | |
uses: baptiste0928/cargo-install@v2 | |
with: | |
crate: cargo-deny | |
version: "0.11.3" | |
- name: Check licenses | |
run: | | |
cargo deny check | |
cargo-check: | |
name: Check | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
# We explicitly do this to cache properly. | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
- name: Setup Node.js | |
uses: ./.github/actions/setup-node | |
- name: Run cargo check for all targets | |
run: cargo check --all --all-targets | |
cargo-test: | |
name: Cargo test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Handle line endings | |
shell: bash | |
if: runner.os == 'Windows' | |
run: | | |
git config --system core.autocrlf false | |
git config --system core.eol lf | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Setup Node.js | |
uses: ./.github/actions/setup-node | |
# We explicitly do this to cache properly. | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
- name: Setup Node.js | |
uses: ./.github/actions/setup-node | |
- name: Run cargo test | |
run: | | |
cargo test --all | |
done: | |
needs: | |
- cargo-fmt | |
- cargo-clippy | |
- cargo-deny | |
- cargo-check | |
- cargo-test | |
if: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }} | |
runs-on: ubuntu-latest | |
name: Done | |
steps: | |
- run: exit 1 | |
if: ${{ always() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled')) }} |