clear-cache 0.1.3

A native implementation of `__builtin___clear_cache` without dependency of GCC/Clang.
Documentation
name: Rust CI

on:
  push:
    branches: [ "master" ]
  pull_request:
    branches: [ "master" ]

env:
  CARGO_TERM_COLOR: always

jobs:
  build-test-native:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        target: [
          x86_64-unknown-linux-gnu,
          x86_64-unknown-linux-musl,
          aarch64-apple-darwin,
          x86_64-pc-windows-msvc,
          i686-pc-windows-msvc,
        ]
        include:
        - target: x86_64-unknown-linux-gnu
          os: ubuntu-latest
        - target: x86_64-unknown-linux-musl
          os: ubuntu-latest
        - target: aarch64-apple-darwin
          os: macos-latest
        - target: x86_64-pc-windows-msvc
          os: windows-latest
        - target: i686-pc-windows-msvc
          os: windows-latest
    steps:
    - uses: actions/checkout@v4
    - name: Install corresponding target
      run: rustup target add ${{ matrix.target }}
    - name: Build all features
      run: cargo build --verbose --all-features --target ${{ matrix.target }}
    - name: Run tests
      run: cargo test --verbose --target ${{ matrix.target }}

  cross:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        target: [
          i686-unknown-linux-gnu,
          aarch64-unknown-linux-gnu,
          riscv64gc-unknown-linux-gnu,
          loongarch64-unknown-linux-gnu,
          aarch64-linux-android,
          # armv7-linux-androideabi, # Wait for QEMU-arm's bug
        ]
    steps:
    - name: checkout
      uses: actions/checkout@v4
    - name: Set up cross
      run: cargo install cross --git https://github.com/cross-rs/cross
    - name: Build all features
      run: cross build --verbose --all-features --target ${{ matrix.target }}
    - name: Run tests
      run: cross test --verbose --target ${{ matrix.target }}

  rustfmt:
    name: Rustfmt
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest]
    steps:
    - uses: actions/checkout@v4
    - name: Check code format
      run: cargo fmt --check