Release 0.3.0 #467
This file contains hidden or 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: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| version-check: | |
| name: Version consistency | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Check version sync | |
| run: python scripts/version_sync.py --check | |
| rust: | |
| name: Rust (fmt, clippy, test) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Check formatting | |
| run: cargo fmt --all --check | |
| - name: Run clippy | |
| run: cargo clippy --workspace --exclude iscc-rb --all-targets -- -D warnings | |
| - name: Clippy iscc-lib (no default features) | |
| run: cargo clippy -p iscc-lib --no-default-features -- -D warnings | |
| - name: Clippy iscc-lib (all features) | |
| run: cargo clippy -p iscc-lib --all-features -- -D warnings | |
| - name: Run tests | |
| run: cargo test --workspace --exclude iscc-rb | |
| - name: Test iscc-lib (no default features) | |
| run: cargo test -p iscc-lib --no-default-features | |
| - name: Test iscc-lib (all features) | |
| run: cargo test -p iscc-lib --all-features | |
| - name: Test iscc-lib (text-processing only) | |
| run: cargo test -p iscc-lib --no-default-features --features text-processing | |
| python-test: | |
| name: Python ${{ matrix.python-version }} (ruff, pytest) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.14'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - uses: astral-sh/setup-uv@v4 | |
| - name: Install dev dependencies | |
| run: uv sync --group dev | |
| - name: Build Python bindings | |
| run: uv run maturin develop --manifest-path crates/iscc-py/Cargo.toml | |
| - name: Run ruff check | |
| run: uv run ruff check | |
| - name: Run ruff format check | |
| run: uv run ruff format --check | |
| - name: Run pytest | |
| run: uv run pytest | |
| python: | |
| name: Python (ruff, pytest) | |
| if: always() | |
| needs: python-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Verify all Python versions passed | |
| run: test "${{ needs.python-test.result }}" = "success" | |
| nodejs: | |
| name: Node.js (napi build, test) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install npm dependencies | |
| run: npm install | |
| working-directory: crates/iscc-napi | |
| - name: Build native addon | |
| run: npx napi build --platform | |
| working-directory: crates/iscc-napi | |
| - name: Run tests | |
| run: npm test | |
| working-directory: crates/iscc-napi | |
| wasm: | |
| name: WASM (wasm-pack test) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install wasm-pack | |
| run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
| - name: Run tests | |
| run: wasm-pack test --node crates/iscc-wasm --features conformance | |
| c-ffi: | |
| name: C FFI (cbindgen, gcc, test) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install cbindgen | |
| run: cargo install cbindgen | |
| - name: Build FFI crate | |
| run: cargo build -p iscc-ffi | |
| - name: Check C header freshness | |
| run: | | |
| cbindgen --config crates/iscc-ffi/cbindgen.toml --crate iscc-ffi --output crates/iscc-ffi/include/iscc.h | |
| git diff --exit-code crates/iscc-ffi/include/iscc.h || \ | |
| (echo "::error::iscc.h is stale. Run: cbindgen --config crates/iscc-ffi/cbindgen.toml --crate iscc-ffi --output crates/iscc-ffi/include/iscc.h" && exit 1) | |
| - name: Compile C test program | |
| run: > | |
| gcc -o test_iscc | |
| crates/iscc-ffi/tests/test_iscc.c | |
| -I crates/iscc-ffi/include | |
| -L target/debug | |
| -liscc_ffi | |
| -lpthread -ldl -lm | |
| - name: Run C test program | |
| run: LD_LIBRARY_PATH=target/debug ./test_iscc | |
| dotnet: | |
| name: C# / .NET (dotnet build, test) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0' | |
| - name: Build FFI native library | |
| run: cargo build -p iscc-ffi | |
| - name: Build .NET projects | |
| run: dotnet build packages/dotnet/Iscc.Lib.Tests/Iscc.Lib.Tests.csproj | |
| - name: Run .NET tests | |
| run: > | |
| dotnet test packages/dotnet/Iscc.Lib.Tests/ | |
| -e LD_LIBRARY_PATH=${{ github.workspace }}/target/debug | |
| java: | |
| name: Java (JNI build, mvn test) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| - name: Build JNI native library | |
| run: cargo build -p iscc-jni | |
| - name: Run Maven tests | |
| run: mvn test -f crates/iscc-jni/java/pom.xml | |
| go: | |
| name: Go (go test, go vet) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: packages/go/go.mod | |
| - name: Run Go tests | |
| run: CGO_ENABLED=0 go test -v -count=1 ./... | |
| working-directory: packages/go | |
| - name: Run Go vet | |
| run: go vet ./... | |
| working-directory: packages/go | |
| ruby: | |
| name: Ruby (magnus build, test) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install libclang-dev | |
| run: sudo apt-get update && sudo apt-get install -y libclang-dev | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.1' | |
| working-directory: crates/iscc-rb | |
| bundler-cache: true | |
| - name: Run standardrb | |
| run: bundle exec standardrb | |
| working-directory: crates/iscc-rb | |
| - name: Run clippy | |
| run: cargo clippy -p iscc-rb -- -D warnings | |
| - name: Compile native extension | |
| run: bundle exec rake compile | |
| working-directory: crates/iscc-rb | |
| - name: Run tests | |
| run: bundle exec rake test | |
| working-directory: crates/iscc-rb | |
| cpp: | |
| name: C++ (cmake, ASAN, test) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install cmake | |
| run: sudo apt-get update && sudo apt-get install -y cmake | |
| - name: Build FFI native library | |
| run: cargo build -p iscc-ffi | |
| - name: Configure CMake | |
| run: > | |
| cmake -B build -DCMAKE_BUILD_TYPE=Debug | |
| -DFFI_LIB_DIR=../../target/debug -DSANITIZE_ADDRESS=ON | |
| working-directory: packages/cpp | |
| - name: Build C++ tests | |
| run: cmake --build build | |
| working-directory: packages/cpp | |
| - name: Run C++ tests | |
| run: LD_LIBRARY_PATH=../../target/debug ./build/tests/test_iscc | |
| working-directory: packages/cpp | |
| bench: | |
| name: Bench (compile check) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Compile benchmarks | |
| run: cargo bench --no-run |