Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,10 @@ updates:
time: "10:00"
timezone: America/Los_Angeles
open-pull-requests-limit: 10
- package-ecosystem: rust-toolchain
directory: "/"
schedule:
interval: daily
time: "10:00"
timezone: America/Los_Angeles
open-pull-requests-limit: 10
5 changes: 1 addition & 4 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,7 @@ jobs:
src/rust/target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: dtolnay/rust-toolchain@stable
- name: build
run: cargo build
working-directory: ./src/rust
5 changes: 1 addition & 4 deletions .github/workflows/build_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,7 @@ jobs:
src/rust/target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: dtolnay/rust-toolchain@stable
- name: build
run: cargo build
working-directory: ./src/rust
8 changes: 3 additions & 5 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
paths:
- '.github/workflows/format.yml'
- 'rust-toolchain.toml'
- 'src/**.c'
- 'src/**.h'
- 'src/rust/**'
Expand All @@ -12,6 +13,7 @@ on:
types: [opened, synchronize, reopened]
paths:
- '.github/workflows/format.yml'
- 'rust-toolchain.toml'
- 'src/**.c'
- 'src/**.h'
- 'src/rust/**'
Expand Down Expand Up @@ -43,11 +45,7 @@ jobs:
${{ matrix.workdir }}/target
key: ${{ runner.os }}-cargo-${{ hashFiles('${{ matrix.workdir }}/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- uses: dtolnay/rust-toolchain@stable
- name: dependencies
run: sudo apt update && sudo apt install libtesseract-dev libavformat-dev libavdevice-dev libswscale-dev yasm
- name: rustfmt
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/test_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ on:
push:
paths:
- ".github/workflows/test.yml"
- "rust-toolchain.toml"
- "src/rust/**"
tags-ignore:
- "*.*"
pull_request:
types: [opened, synchronize, reopened]
paths:
- ".github/workflows/test.yml"
- "rust-toolchain.toml"
- "src/rust/**"
jobs:
test_rust:
Expand All @@ -29,10 +31,7 @@ jobs:
src/rust/lib_ccxr/target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: dtolnay/rust-toolchain@stable
- name: Test main module
run: cargo test
working-directory: ./src/rust
Expand Down
10 changes: 10 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Pinned so that a new stable rustc cannot introduce clippy lints that fail
# PRs which did not touch the offending code. Bumping this is a deliberate
# change; Dependabot opens a PR when a new release is available, and any new
# lints get fixed there, once, instead of in every open PR.
[toolchain]
channel = "1.98.1"
components = ["rustfmt", "clippy"]
# The MSVC builds cross-compile with `cargo build --target` (windows/rust.bat),
# so the target std must exist for the pinned toolchain.
targets = ["x86_64-pc-windows-msvc", "i686-pc-windows-msvc"]
Loading