Skip to content

docs: enumerate escaped chars in duplicate escape fns #38

docs: enumerate escaped chars in duplicate escape fns

docs: enumerate escaped chars in duplicate escape fns #38

Workflow file for this run

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
---
name: CI
on:
push:
tags:
- "v*.*.*"
branches:
- trunk
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
security-audit:
name: Rust Security Audit
runs-on: ubuntu-latest
container:
image: ghcr.io/rust-cross/cargo-zigbuild:sha-59b27c3
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Cache Cargo registry
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306
with:
path: /github/home/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('native/tantivy-c/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache Cargo index
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306
with:
path: /github/home/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('native/tantivy-c/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-index-
- name: Cache Cargo build
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306
with:
path: native/tantivy-c/target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('native/tantivy-c/**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-target-
- name: Install cargo-audit
run: |
cargo install cargo-audit
- name: Run cargo-audit
working-directory: native/tantivy-c
run: |
cargo audit
license-check:
name: License Header Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Check License Headers
uses: apache/skywalking-eyes/header@7a3b6cc34c5980cede4407ffa06fe553a999245d
with:
config: .licenserc.yaml
check-and-test-inko:
name: Check and Test Inko (${{ matrix.os }})
runs-on: ${{ matrix.runner }}
needs: [security-audit, license-check, build-native]
strategy:
fail-fast: false
matrix:
include:
- os: linux
runner: ubuntu-latest
artifact: linux_x64
lib_file: linux_x64_tantivy_c.so
lib_name: libtantivy_c.so
use_container: true
- os: macos
runner: macos-latest
artifact: macos_arm64
lib_file: macos_arm64_tantivy_c.dylib
lib_name: libtantivy_c.dylib
use_container: false
container: ${{ matrix.use_container && 'ghcr.io/inko-lang/inko:0.19.1' || null }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Inko (macOS)
if: matrix.os == 'macos'
run: |
brew install inko
- name: Download Native Library
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
name: ${{ matrix.artifact }}_tantivy_c
- name: Copy Library to Root
run: |
cp ${{ matrix.lib_file }} ./${{ matrix.lib_name }}
- name: Check Formatting and Run Tests
run: |
export LIBRARY_PATH=.
export LD_LIBRARY_PATH=.
export DYLD_LIBRARY_PATH=.
inko --version
inko fmt --check
inko test
- name: Run Performance Benchmarks
continue-on-error: true
run: |
export LIBRARY_PATH=.
export LD_LIBRARY_PATH=.
export DYLD_LIBRARY_PATH=.
echo "Running performance benchmarks (informational only)..."
./run_benchmarks.sh || echo "Benchmarks completed with issues"
build-native:
name: Build Native Library (${{ matrix.artifact_name }})
runs-on: ubuntu-latest
permissions:
contents: write
container:
image: ghcr.io/rust-cross/cargo-zigbuild:sha-59b27c3
strategy:
matrix:
include:
# Linux x64
- target: x86_64-unknown-linux-gnu
artifact_name: linux_x64
arch: x64
lib_name: libtantivy_c.so
# Linux ARM64
- target: aarch64-unknown-linux-gnu
artifact_name: linux_arm64
arch: arm64
lib_name: libtantivy_c.so
# macOS x64 (Intel)
- target: x86_64-apple-darwin
artifact_name: macos_x64
arch: x64
lib_name: libtantivy_c.dylib
# macOS ARM64 (Apple Silicon)
- target: aarch64-apple-darwin
artifact_name: macos_arm64
arch: arm64
lib_name: libtantivy_c.dylib
# Windows x64
- target: x86_64-pc-windows-gnu
artifact_name: windows_x64
arch: x64
lib_name: tantivy_c.dll
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Cache Cargo registry
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: /github/home/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('native/tantivy-c/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache Cargo index
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: /github/home/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('native/tantivy-c/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-index-
- name: Cache Cargo build
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: native/tantivy-c/target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('native/tantivy-c/**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-target-
- name: Install CMake
run: |
apt-get update -y && apt-get install -y --no-install-recommends --no-install-suggests cmake
- name: Install clippy
run: rustup component add clippy
- name: Run cargo test
if: matrix.target == 'x86_64-unknown-linux-gnu'
working-directory: native/tantivy-c
run: |
cargo test
- name: Run cargo clippy
working-directory: native/tantivy-c
run: |
cargo clippy --target ${{ matrix.target }} -- -D warnings
- name: Build Rust cdylib
working-directory: native/tantivy-c
run: |
cargo zigbuild --release --target ${{ matrix.target }}
- name: Create artifact directory structure
working-directory: native/tantivy-c
shell: bash
run: |
mkdir -p release-files
LIB_NAME=${{ matrix.lib_name }}
EXT="${LIB_NAME##*.}"
cp target/${{ matrix.target }}/release/${{ matrix.lib_name }} "release-files/${{ matrix.artifact_name }}_tantivy_c.${EXT}"
- name: Upload Build Artifact
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: ${{ matrix.artifact_name }}_tantivy_c
path: native/tantivy-c/release-files
if-no-files-found: error
- name: Upload to GitHub Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
with:
files: native/tantivy-c/release-files/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}