Skip to content

CI

CI #1599

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: "17 3 * * *"
env:
CARGO_TERM_COLOR: always
INLINE_IGNORE_PATTERN: "drop_in_place|::fmt::"
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-11, windows-latest]
toolchain: ["1.38.0", stable, beta, nightly ]
features: ["", "--features std", "--features public_imp", "--features std,public_imp"]
rustflags: ["-D warnings", "-D warnings -C target-feature=+avx2", "-D warnings -C target-feature=+sse4.2"]
exclude:
- os: macos-11
rustflags: "-D warnings -C target-feature=+avx2"
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
profile: minimal
override: true
- name: Run tests
run: cargo test --no-default-features ${{ matrix.features }} --all-targets --verbose
env:
RUSTFLAGS: ${{ matrix.rustflags }}
test-inlining-x86:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: ["1.38.0", stable, beta, nightly ]
defaults:
run:
working-directory: inlining
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Install cargo-asm
run: cargo install cargo-asm
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
profile: minimal
override: true
- name: Set default toolchain
run: rustup default ${{ matrix.toolchain }}
- name: Check if the expected fns are inlined
run: |
cargo clean;cargo asm|egrep -v $INLINE_IGNORE_PATTERN|diff -u expected-methods-x86-std.txt -
cargo clean;RUSTFLAGS="-C target-feature=+avx2" cargo asm|egrep -v $INLINE_IGNORE_PATTERN|diff -u expected-methods-x86-std-avx2.txt -
cargo clean;cargo asm --no-default-features|egrep -v $INLINE_IGNORE_PATTERN|diff -u empty.txt -
cargo clean;RUSTFLAGS="-C target-feature=+avx2" cargo asm --no-default-features|egrep -v $INLINE_IGNORE_PATTERN|diff -u expected-methods-x86-nostd-avx2.txt -
cargo clean;RUSTFLAGS="-C target-feature=+sse4.2" cargo asm --no-default-features|egrep -v $INLINE_IGNORE_PATTERN|diff -u expected-methods-x86-nostd-sse42.txt -
test-inlining-aarch64-enabled-by-default:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: [nightly, beta, stable]
target: [aarch64-unknown-linux-gnu, aarch64-apple-darwin]
defaults:
run:
working-directory: inlining
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
profile: minimal
target: ${{ matrix.target }}
override: true
- name: Install cargo-asm
run: cargo install cargo-asm
- name: Check if the expected fns are inlined
run: |
cargo clean;cargo asm --target ${{ matrix.target }} --features aarch64_neon|egrep -v $INLINE_IGNORE_PATTERN|diff -u expected-methods-aarch64-neon.txt -
cargo clean;cargo asm --target ${{ matrix.target }} --no-default-features --features aarch64_neon|egrep -v $INLINE_IGNORE_PATTERN|diff -u expected-methods-aarch64-neon.txt -
cargo clean;cargo asm --target ${{ matrix.target }}|egrep -v $INLINE_IGNORE_PATTERN|diff -u expected-methods-aarch64-neon.txt -
cargo clean;cargo asm --target ${{ matrix.target }} --no-default-features|egrep -v $INLINE_IGNORE_PATTERN|diff -u expected-methods-aarch64-neon.txt -
test-doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
- name: Run cargo doc
run: cargo doc --features public_imp
env:
RUSTDOCFLAGS: --cfg docsrs
cross-build-arm-default:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: ["1.38.0", stable, beta, nightly ]
target: [arm-unknown-linux-gnueabi, aarch64-unknown-linux-gnu]
features: ["--features std", ""]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
profile: minimal
override: true
- name: Build
run: cargo build --no-default-features --target ${{ matrix.target }} ${{ matrix.features }} --verbose
cross-buildfeature-aarch64-neon:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: [1.59.0, stable, beta, nightly]
target: [aarch64-unknown-linux-gnu, aarch64-apple-darwin]
features: ["--features std,aarch64_neon", "--features aarch64_neon"]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
profile: minimal
override: true
- name: Build
run: cargo build --no-default-features --target ${{ matrix.target }} ${{ matrix.features }} --verbose
cross-build-i686:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
toolchain: [stable, nightly]
features: ["", "--features std", "--features public_imp", "--features std,public_imp"]
rustflags: ["-D warnings", "-D warnings -C target-feature=+avx2", "-D warnings -C target-feature=+sse4.2"]
target: [i686-unknown-linux-gnu, i686-pc-windows-msvc]
exclude:
- os: ubuntu-latest
target: i686-pc-windows-msvc
- os: windows-latest
target: i686-unknown-linux-gnu
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
profile: minimal
override: true
- name: Run tests
run: cargo build --no-default-features ${{ matrix.features }} --target ${{ matrix.target }} --verbose
env:
RUSTFLAGS: ${{ matrix.rustflags }}
fmt_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt
override: true
- name: Checko formatting
run: cargo fmt -- --check
clippy_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets --all-features
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --no-default-features