unsafe impl Send for {Mecab,Njd,JpCommon}
#107
Workflow file for this run
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: test workflow | |
on: [push, pull_request] | |
jobs: | |
rust-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v1 | |
- run: cargo clippy --all-features --tests -- -D clippy::all -D warnings --no-deps | |
- run: cargo fmt -- --check | |
rust-test: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: windows-2019 | |
- os: windows-2022 | |
- os: macos-11 | |
- os: macos-12 | |
- os: ubuntu-20.04 | |
- os: ubuntu-22.04 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install LLVM and Clang # required for bindgen to work, see https://github.com/rust-lang/rust-bindgen/issues/1797 | |
uses: KyleMayes/install-llvm-action@32c4866ebb71e0949e8833eb49beeebed48532bd | |
if: matrix.os == 'windows-2019' | |
with: | |
version: "11.0" | |
directory: ${{ runner.temp }}/llvm | |
- name: Set LIBCLANG_PATH | |
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV | |
if: matrix.os == 'windows-2019' | |
- uses: actions/checkout@v2 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v1 | |
with: | |
# cargoのキャッシュが原因でテストが失敗する場合はバージョン部分をカウントアップすること | |
key: "v1-cargo-test-cache-${{ matrix.os }}" | |
- run: cargo test --all-features | |
rust-build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: windows-latest | |
target: x86_64-pc-windows-msvc | |
- os: windows-latest | |
target: i686-pc-windows-msvc | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
- os: ubuntu-latest | |
target: aarch64-unknown-linux-gnu | |
- os: ubuntu-latest | |
target: aarch64-linux-android | |
- os: ubuntu-latest | |
target: x86_64-linux-android | |
- os: macos-latest | |
target: aarch64-apple-darwin | |
- os: macos-latest | |
target: x86_64-apple-darwin | |
- os: macos-latest | |
target: aarch64-apple-ios | |
- os: macos-latest | |
target: aarch64-apple-ios-sim | |
- os: macos-latest | |
target: x86_64-apple-ios | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
# FIXME: auto_gen_bind_prにも処理があるので共通化する | |
- name: Install cross compiler for linux aarch64 | |
if: matrix.target == 'aarch64-unknown-linux-gnu' | |
shell: bash | |
run: | | |
sudo apt update | |
sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu | |
- uses: nttld/setup-ndk@v1 | |
if: endsWith(matrix.target, '-linux-android') | |
with: | |
ndk-version: r25b | |
- name: Set path for android | |
if: endsWith(matrix.target, '-linux-android') | |
shell: bash | |
run: | | |
echo "$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin" >> "$GITHUB_PATH" | |
UNDERSCORED_TRIPLE=$(sed 's/-/_/g' <<< "${{ matrix.target }}") | |
echo "AR_$UNDERSCORED_TRIPLE=llvm-ar" >> "$GITHUB_ENV" | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.target }} | |
- run: cargo build --target ${{ matrix.target }} --release | |
env: | |
ARCH: ${{ matrix.arch }} | |
env: | |
CARGO_TERM_COLOR: always |