Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tentative solution for CI (Clippy error, deprecated warning) #117

Merged
merged 5 commits into from
Mar 26, 2023
Merged
Changes from 3 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
78 changes: 38 additions & 40 deletions .github/workflows/ci.yml
qryxip marked this conversation as resolved.
Show resolved Hide resolved
qryxip marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: 'Setup `${{ matrix.toolchain }}`'
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}
override: true
profile: minimal
components: rustfmt

- name: 'Override `${{ matrix.toolchain }}'
run: |
~/.cargo/bin/rustup override set ${{ matrix.toolchain }}

- name: cargo-fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: |
~/.cargo/bin/cargo fmt --all -- --check

build:
strategy:
Expand Down Expand Up @@ -66,33 +66,29 @@ jobs:
if: matrix.os == 'windows-2019'

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: 'Setup `${{ matrix.toolchain }}`'
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}
override: true
profile: minimal
components: clippy

- name: 'Override `${{ matrix.toolchain }}`'
run: |
~/.cargo/bin/rustup override set ${{ matrix.toolchain }}

- name: cargo-clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace --all-targets -- -D warnings
run: |
~/.cargo/bin/cargo clippy --workspace --all-targets -- -A renamed-and-removed-lints -D warnings

- name: cargo-build
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --all-targets
run: |
~/.cargo/bin/cargo build --workspace --all-targets

- name: cargo-test
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --no-fail-fast
run: |
~/.cargo/bin/cargo test --workspace --no-fail-fast
env:
RUST_BACKTRACE: full

Expand All @@ -112,18 +108,20 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: 'Setup `${{ matrix.toolchain }}`'
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}
override: true
profile: minimal
components: rustfmt

- name: 'Override `${{ matrix.toolchain }}`'
run: |
~/.cargo/bin/rustup override set ${{ matrix.toolchain }}

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -136,28 +134,28 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup `1.47.0-x86_64-unknown-linux-gnu`
uses: actions-rs/toolchain@v1
- name: Setup `1.60.0-x86_64-unknown-linux-gnu`
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.47.0-x86_64-unknown-linux-gnu
override: true
profile: minimal
toolchain: 1.60.0-x86_64-unknown-linux-gnu

- name: 'Override `1.60.0-x86_64-unknown-linux-gnu'
run: |
~/.cargo/bin/rustup override set 1.60.0-x86_64-unknown-linux-gnu

- name: Setup Python 3.9
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Install `oj`
run: pip install online-judge-tools

- name: cargo-build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --examples
run: |
~/.cargo/bin/cargo build --release --examples

- name: Verify
run: |
Expand Down