From 0770381c2b027dd9d50e5b2f3ef60308ff2eb7c1 Mon Sep 17 00:00:00 2001 From: Mizar Date: Sun, 26 Mar 2023 19:51:06 +0900 Subject: [PATCH] ci.yml to use Node16 * `actions/checkout@v3` * `actions/setup-python@v4` * `actions-rs` is unmaintained: * https://github.com/actions-rs/toolchain/issues/219 * https://github.com/actions-rs/cargo/issues/222 * Library Checker: Rust 1.60 * https://judge.yosupo.jp/help --- .github/workflows/ci.yml | 77 +++++++++++++--------------------------- 1 file changed, 25 insertions(+), 52 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9cf89aa..2b2a29f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,21 +22,15 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: 'Setup `${{ matrix.toolchain }}`' - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.toolchain }} - override: true - profile: minimal - components: rustfmt + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain ${{ matrix.toolchain }} --component rustfmt - name: cargo-fmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + run: | + ~/.cargo/bin/cargo fmt --all -- --check build: strategy: @@ -66,35 +60,23 @@ 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 - with: - toolchain: ${{ matrix.toolchain }} - override: true - profile: minimal - components: clippy + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain ${{ matrix.toolchain }} --component clippy - 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 -- -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 - env: - RUST_BACKTRACE: full + run: | + RUST_BACKTRACE=full ~/.cargo/bin/cargo test --workspace --no-fail-fast expander_test: strategy: @@ -112,18 +94,14 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: 'Setup `${{ matrix.toolchain }}`' - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.toolchain }} - override: true - profile: minimal - components: rustfmt + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain ${{ matrix.toolchain }} --component rustfmt - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} @@ -136,17 +114,14 @@ 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 - with: - toolchain: 1.47.0-x86_64-unknown-linux-gnu - override: true - profile: minimal + - name: Setup `1.60.0-x86_64-unknown-linux-gnu` + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain 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' @@ -154,10 +129,8 @@ jobs: 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: |