chore: checkpoint before Python removal

This commit is contained in:
2026-03-26 22:33:59 +00:00
parent 683cec9307
commit e568ddf82a
29972 changed files with 11269302 additions and 2 deletions

View File

@@ -0,0 +1,173 @@
name: build
on:
push:
branches-ignore: [main]
pull_request:
branches: [main]
jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
test-doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- uses: Swatinem/rust-cache@v1
- run: cargo install cargo-deadlinks
- name: doc
env:
RUSTDOCFLAGS: --cfg doc_cfg
run: cargo deadlinks --ignore-fragments -- --all
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
toolchain: stable
- os: macos-latest
target: x86_64-apple-darwin
toolchain: stable
# TODO: also aarch64 / M1
- os: windows-latest
target: x86_64-pc-windows-gnu
toolchain: stable
- os: windows-latest
target: x86_64-pc-windows-msvc
toolchain: beta
# Test both windows-gnu and windows-msvc; use beta rust on one
- os: ubuntu-latest
deps: sudo apt-get update ; sudo apt install gcc-multilib
target: i686-unknown-linux-gnu
toolchain: nightly
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
toolchain: nightly
variant: minimal_versions
steps:
- uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
target: ${{ matrix.target }}
toolchain: ${{ matrix.toolchain }}
override: true
- uses: Swatinem/rust-cache@v1
- run: ${{ matrix.deps }}
- name: Maybe minimal versions
if: ${{ matrix.variant == 'minimal_versions' }}
run: cargo generate-lockfile -Z minimal-versions
- name: Test
run: |
cargo test --lib --target ${{ matrix.target }} ${{ matrix.toolchain == 'nightly' && '--features=nightly' || '' }}
env:
# Enables address sanitization if supported target and nightly.
RUSTFLAGS: |
${{
(
matrix.toolchain == 'nightly' && (
matrix.target == 'aarch64-apple-darwin' ||
matrix.target == 'aarch64-fuchsia' ||
matrix.target == 'aarch64-unknown-linux-gnu' ||
matrix.target == 'x86_64-apple-darwin' ||
matrix.target == 'x86_64-fuchsia' ||
matrix.target == 'x86_64-unknown-freebsd' ||
matrix.target == 'x86_64-unknown-linux-gnu'
)
)
&& '-Z sanitizer=address'
|| ''
}}
test-cross:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: mips-unknown-linux-gnu
toolchain: stable
- os: ubuntu-latest
target: arm-unknown-linux-gnueabi
toolchain: stable
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
toolchain: stable
- os: ubuntu-latest
target: arm-unknown-linux-gnueabi
toolchain: nightly
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
toolchain: nightly
steps:
- uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
target: ${{ matrix.target }}
toolchain: ${{ matrix.toolchain }}
override: true
- uses: Swatinem/rust-cache@v1
- name: Install cross
run: cargo install cross || true
- name: Test
run: |
cross test --no-fail-fast --target ${{ matrix.target }} ${{ matrix.toolchain == 'nightly' && '--features=nightly' || '' }}
test-msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
target: x86_64-unknown-linux-gnu
toolchain: 1.36.0 # MSRV
- uses: Swatinem/rust-cache@v1
- name: Test
run: cargo test --target=x86_64-unknown-linux-gnu --no-default-features --features=std
test-no-std:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
target: thumbv6m-none-eabi
override: true
- uses: Swatinem/rust-cache@v1
- name: Build top-level only
run: cargo build --target=thumbv6m-none-eabi --no-default-features

View File

@@ -0,0 +1,59 @@
name: fuzz
on:
schedule:
# Run every 24h
- cron: "0 0 * * *"
defaults:
run:
working-directory: fuzz
jobs:
fuzz:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
target: [avx2, sse2, ssse3]
steps:
- uses: actions/checkout@v2
- name: setup
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- uses: Swatinem/rust-cache@v1
- run: cargo install cargo-fuzz
- name: Download corpus artifact
run: |
wget https://nightly.link/mcountryman/simd-adler32/workflows/fuzz.yaml/main/corpus.zip
mkdir -p corpus
unzip corpus.zip -d corpus
# keep going if artifact doesn't exist
continue-on-error: true
- name: Run fuzz test (30m)
run: |
cargo fuzz run ${{ matrix.target }} -- -max_total_time=1800
- name: Archive artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: artifacts
path: fuzz/artifacts
# big decision. do we store corpus from failed jobs? for now we don't..
- uses: actions/upload-artifact@v2
with:
name: corpus
path: |
fuzz/corpus/
fuzz/corpus/${{ matrix.target }}

View File

@@ -0,0 +1,36 @@
name: publish
on:
push:
branches: [main]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Configure git user
run: |
git config user.name "GitHub Actions"
git config user.email noreply@github.com
- name: Install cargo-release
uses: actions-rs/install@v0.1
with:
crate: cargo-release
version: latest
- name: Publish
run: |
echo "${{ secrets.CRATES_IO_TOKEN }}" | cargo login
git restore Cargo.lock # FIXME: likely an issue during resolve causing this
cargo release --no-confirm --no-push -x
- name: Push changes
uses: ad-m/github-push-action@master
with:
tags: true
force: true
branch: ${{ github.ref }}
github_token: ${{ secrets.GITHUB_TOKEN }}