Kernel sel for llms #6979
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: Beta and nightly Rust | |
on: | |
pull_request: | |
schedule: | |
- cron: '0 5 * * *' | |
workflow_dispatch: | |
env: | |
CARGO_INCREMENTAL: false | |
FORCE_JAVASCRIPT_ACTIONS_TO_NODE20: true | |
jobs: | |
what-to-run: | |
runs-on: ubuntu-latest | |
outputs: | |
os: ${{steps.set-matrix.outputs.os}} | |
steps: | |
- id: set-matrix | |
env: | |
MACOS: $((github.event.workflow_dispatch || github.event.schedule )) | |
run: | | |
if [ "$MACOS" == "true" ] | |
then | |
echo 'os=["ubuntu-latest", "macos-latest"]' >> $GITHUB_OUTPUT | |
else | |
echo ::notice::Skipping macOS checks on PR and commit. Dispatch workflow manually if needed. | |
echo 'os=["ubuntu-latest"]' >> $GITHUB_OUTPUT | |
fi | |
linux: | |
strategy: | |
matrix: | |
rust: [ beta, nightly ] | |
fail-fast: false | |
if: github.event.workflow_dispatch || github.event.schedule | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get current date | |
id: date | |
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.rustup | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
.cached | |
# ~/.cache/sccache | |
key: ${{ runner.os }}-main-${{matrix.rust}}-${{steps.date.outputs.date}}-d | |
# - name: "Setup sccache" | |
# run: .travis/setup-sccache.sh | |
- name: Rustup update | |
run: rustup update | |
- name: Native script | |
env: | |
RUST_VERSION: ${{matrix.rust}} | |
run: .travis/regular-tests.sh | |
# - name: Stop sccache server | |
# run: sccache --stop-server || true | |
warnings: | |
strategy: | |
matrix: | |
rust: [ 1.75.0, beta ] | |
os: [ ubuntu-latest, macOS-latest ] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
env: | |
RUSTFLAGS: "-D warnings" | |
RUST_VERSION: ${{matrix.rust}} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Rustup update | |
run: | | |
ROOT=. .travis/ci-system-setup.sh | |
- name: cargo check, -D warnings | |
if: runner.os == 'Linux' | |
run: cargo check -p test-tflite | |
cargo-clippy: | |
needs: what-to-run | |
strategy: | |
matrix: | |
os: ${{fromJson(needs.what-to-run.outputs.os)}} | |
rust: [ stable, beta, nightly ] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
env: | |
RUST_VERSION: ${{matrix.rust}} | |
RUSTFLAGS: "-D warnings --force-warn unknown_lints" | |
ROOT: . | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Rustup update, install clippy | |
run: | | |
.travis/ci-system-setup.sh | |
rustup +${{matrix.rust}} component add clippy | |
- name: Run cargo-clippy | |
if: runner.os == 'Linux' | |
run: cargo clippy -p test-tflite | |
- name: Run cargo-clippy | |
if: runner.os == 'macos' | |
run: cargo clippy -p test-metal -p tract-metal | |
cargo-deny: | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Rustup update | |
run: rustup update | |
- name: Install cargo-deny | |
run: | | |
curl -L https://github.com/EmbarkStudios/cargo-deny/releases/download/0.14.24/cargo-deny-0.14.24-x86_64-unknown-linux-musl.tar.gz \ | |
| tar -zx --strip-components=1 "cargo-deny-0.14.24-x86_64-unknown-linux-musl/cargo-deny" | |
- name: Run cargo-deny | |
run: .travis/cargo-deny-check.sh |