Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f2aa051
feat: no-std
CrabNejonas Nov 1, 2023
03a3a3c
Update Cargo.toml
CrabNejonas Nov 1, 2023
891e8fc
remove .idea files
CrabNejonas Jan 17, 2024
0080cec
Update README.md
CrabNejonas Jan 17, 2024
5303d43
Update README.md
CrabNejonas Jan 17, 2024
f264d21
Update Cargo.toml
CrabNejonas Jan 17, 2024
1801a2f
Delete fst-bin directory
CrabNejonas Jan 17, 2024
7ef49f5
Delete fst-levenshtein directory
CrabNejonas Jan 17, 2024
3df9bb0
Delete fst-regex directory
CrabNejonas Jan 17, 2024
0baa27e
Update ci.yml
CrabNejonas Jan 17, 2024
13cd9cc
Update ci.yml
CrabNejonas Jan 17, 2024
638811d
Update ci.yml
CrabNejonas Jan 17, 2024
a5b4e74
Create release-plz.yml
CrabNejonas Jan 17, 2024
4b99b14
Update Cargo.toml
CrabNejonas Jan 17, 2024
9c07a53
Update Cargo.toml
CrabNejonas Jan 17, 2024
21da075
Update Cargo.toml
CrabNejonas Jan 17, 2024
24989ae
cleanup
CrabNejonas Jan 17, 2024
912bf04
clippy
CrabNejonas Jan 17, 2024
bdc90af
clippy
CrabNejonas Jan 18, 2024
ee92e52
fmt
CrabNejonas Jan 18, 2024
7a32ddb
Update ci.yml
CrabNejonas Jan 18, 2024
cba9a0a
Create deny.toml
CrabNejonas Jan 18, 2024
b2021e9
Update release-plz.yml
CrabNejonas Jan 18, 2024
8715110
Update README.md
CrabNejonas Jan 18, 2024
d6b6a9e
chore: release
github-actions[bot] Jan 18, 2024
d316535
Merge pull request #1 from crabnebula-dev/release-plz-2024-01-18T08-4…
CrabNejonas Jan 18, 2024
3fe9e8d
no_std fixes
CrabNejonas Jan 18, 2024
cad13d5
fix: update docs
CrabNejonas Jan 18, 2024
76ccc0c
chore: release
github-actions[bot] Jan 18, 2024
fb3e05a
Merge pull request #2 from crabnebula-dev/release-plz-2024-01-18T10-2…
CrabNejonas Jan 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
227 changes: 87 additions & 140 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,159 +1,106 @@
name: ci
name: CI

on:
pull_request:
branches:
- master
push:
branches:
- master
schedule:
- cron: '00 01 * * *'
paths:
- ".github/workflows/ci.yml"
- "**/*.rs"
- "**/Cargo.toml"
pull_request:
paths:
- ".github/workflows/ci.yml"
- "**/*.rs"
- "**/Cargo.toml"

# The section is needed to drop write-all permissions that are granted on
# `schedule` event. By specifying any permission explicitly all others are set
# to none. By using the principle of least privilege the damage a compromised
# workflow can do (because of an injection or compromised third party tool or
# action) is restricted. Currently the worklow doesn't need any additional
# permission except for pulling the code. Adding labels to issues, commenting
# on pull-requests, etc. may need additional permissions:
#
# Syntax for this section:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
#
# Reference for how to assign permissions on a job-by-job basis:
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
#
# Reference for available permissions that we can enable if needed:
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
permissions:
# to fetch code (actions/checkout)
contents: read

env:
RUSTFLAGS: -Dwarnings

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
pre_ci:
uses: dtolnay/.github/.github/workflows/pre_ci.yml@master

test:
name: test
env:
# For some builds, we use cross to test on 32-bit and big-endian
# systems.
CARGO: cargo
# When CARGO is set to CROSS, TARGET is set to `--target matrix.target`.
# Note that we only use cross on Linux, so setting a target on a
# different OS will just use normal cargo.
TARGET:
# Bump this as appropriate. We pin to a version to make sure CI
# continues to work as cross releases in the past have broken things
# in subtle ways.
CROSS_VERSION: v0.2.5
runs-on: ${{ matrix.os }}
name: Rust ${{matrix.name}}
needs: pre_ci
if: needs.pre_ci.outputs.continue
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- build: pinned
os: ubuntu-latest
rust: 1.60.0
- build: stable
os: ubuntu-latest
rust: stable
- build: beta
os: ubuntu-latest
rust: beta
- build: nightly
os: ubuntu-latest
rust: nightly
- build: macos
os: macos-latest
rust: stable
- build: win-msvc
os: windows-latest
rust: stable
- build: win-gnu
os: windows-latest
rust: stable-x86_64-gnu
- build: stable-x86
os: ubuntu-latest
rust: stable
target: i686-unknown-linux-gnu
- build: stable-aarch64
os: ubuntu-latest
rust: stable
target: aarch64-unknown-linux-gnu
- build: stable-powerpc64
os: ubuntu-latest
rust: stable
target: powerpc64-unknown-linux-gnu
- build: stable-s390x
os: ubuntu-latest
rust: stable
target: s390x-unknown-linux-gnu
- name: stable/std
rust: stable
features: ""
- name: nightly/std
rust: nightly
features: ""
- name: nightly/core
rust: nightly
features: "--no-default-features"
- name: nightly/alloc
rust: nightly
features: "--no-default-features --features alloc"
timeout-minutes: 45
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}

- name: Use Cross
if: matrix.os == 'ubuntu-latest' && matrix.target != ''
run: |
# In the past, new releases of 'cross' have broken CI. So for now, we
# pin it. We also use their pre-compiled binary releases because cross
# has over 100 dependencies and takes a bit to compile.
dir="$RUNNER_TEMP/cross-download"
mkdir "$dir"
echo "$dir" >> $GITHUB_PATH
cd "$dir"
curl -LO "https://github.com/cross-rs/cross/releases/download/$CROSS_VERSION/cross-x86_64-unknown-linux-musl.tar.gz"
tar xf cross-x86_64-unknown-linux-musl.tar.gz
echo "CARGO=cross" >> $GITHUB_ENV
echo "TARGET=--target ${{ matrix.target }}" >> $GITHUB_ENV

- name: Show command used for Cargo
run: |
echo "cargo command is: ${{ env.CARGO }}"
echo "target flag is: ${{ env.TARGET }}"

- name: Build (just fst crate)
if: matrix.build == 'pinned'
run: ${{ env.CARGO }} build --verbose ${{ env.TARGET }}
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
- uses: Swatinem/rust-cache@v2
- run: cargo test --workspace ${{matrix.features}}
env:
RUSTFLAGS: ${{matrix.rustflags}} ${{env.RUSTFLAGS}}

- name: Build
if: matrix.build != 'pinned'
run: ${{ env.CARGO }} build --verbose --all ${{ env.TARGET }}

- name: Build docs
if: matrix.build != 'pinned'
run: ${{ env.CARGO }} doc --verbose --all ${{ env.TARGET }}

- name: Run tests
if: matrix.build != 'pinned'
run: ${{ env.CARGO }} test --verbose --all ${{ env.TARGET }}

- name: Run tests without default features
if: matrix.build != 'pinned'
run: ${{ env.CARGO }} test --verbose --lib --no-default-features ${{ env.TARGET }}

- name: Build fst CLI tool
if: matrix.build != 'pinned'
run: ${{ env.CARGO }} build --verbose --manifest-path fst-bin/Cargo.toml ${{ env.TARGET }}
msrv:
name: Rust MSRV
needs: pre_ci
if: needs.pre_ci.outputs.continue
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.70.0 # MSRV
- uses: Swatinem/rust-cache@v2
- run: cargo check --workspace --tests

- name: Compile benchmarks
if: matrix.build != 'pinned'
run: ${{ env.CARGO }} bench --manifest-path bench/Cargo.toml --verbose ${{ env.TARGET }} -- --test
clippy:
name: Clippy
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --workspace -- -Dclippy::all

rustfmt:
name: rustfmt
name: Rustfmt
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- name: Install rustfmt with nightly toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: cargo fmt --all -- --check

check-licenses:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt
- name: Check formatting
run: |
cargo fmt --all -- --check
- uses: actions/checkout@v3
- name: Check Rust Licenses
uses: EmbarkStudios/cargo-deny-action@v1
32 changes: 32 additions & 0 deletions .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release-plz

permissions:
pull-requests: write
contents: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches:
- master

jobs:
release-plz:
name: Release-plz
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run release-plz
uses: MarcoIeni/release-plz-action@v0.5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ words
dict
test
months
.idea
Loading