From 7a1842c251a5cb86ca2ca80de45eb43e8b2c124a Mon Sep 17 00:00:00 2001 From: Padraic Fanning Date: Thu, 14 Jul 2022 20:20:17 -0400 Subject: [PATCH] Use manual invocations of `cargo` --- .github/workflows/ci.yaml | 70 +++++++--------------------------- .github/workflows/cron-ci.yaml | 15 ++------ 2 files changed, 17 insertions(+), 68 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1fa248078..8cc17ae0a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -64,15 +64,9 @@ jobs: if: runner.os == 'macOS' - uses: Swatinem/rust-cache@v1 - name: run rust tests - uses: actions-rs/cargo@v1 - with: - command: test - args: --workspace --exclude rustpython_wasm --verbose ${{ env.CARGO_ARGS }} ${{ env.NON_WASM_PACKAGES }} + run: cargo test --workspace --exclude rustpython_wasm --verbose ${{ env.CARGO_ARGS }} ${{ env.NON_WASM_PACKAGES }} - name: check compilation without threading - uses: actions-rs/cargo@v1 - with: - command: check - args: ${{ env.CARGO_ARGS }} --no-default-features + run: cargo check ${{ env.CARGO_ARGS }} --no-default-features - name: prepare AppleSilicon build uses: dtolnay/rust-toolchain@stable @@ -80,10 +74,7 @@ jobs: target: aarch64-apple-darwin if: runner.os == 'macOS' - name: Check compilation for Apple Silicon - uses: actions-rs/cargo@v1 - with: - command: check - args: --target aarch64-apple-darwin + run: cargo check --target aarch64-apple-darwin if: runner.os == 'macOS' exotic_targets: @@ -99,60 +90,42 @@ jobs: - name: Install gcc-multilib and musl-tools run: sudo apt-get update && sudo apt-get install gcc-multilib musl-tools - name: Check compilation for x86 32bit - uses: actions-rs/cargo@v1 - with: - command: check - args: --target i686-unknown-linux-gnu + run: cargo check --target i686-unknown-linux-gnu - uses: dtolnay/rust-toolchain@stable with: target: aarch64-linux-android - name: Check compilation for android - uses: actions-rs/cargo@v1 - with: - command: check - args: --target aarch64-linux-android + run: cargo check --target aarch64-linux-android - uses: dtolnay/rust-toolchain@stable with: target: i686-unknown-linux-musl - name: Check compilation for musl - uses: actions-rs/cargo@v1 - with: - command: check - args: --target i686-unknown-linux-musl + run: cargo check --target i686-unknown-linux-musl - uses: dtolnay/rust-toolchain@stable with: target: x86_64-unknown-freebsd - name: Check compilation for freebsd - uses: actions-rs/cargo@v1 - with: - command: check - args: --target x86_64-unknown-freebsd + run: cargo check --target x86_64-unknown-freebsd - uses: dtolnay/rust-toolchain@stable with: target: wasm32-unknown-unknown - name: Check compilation for wasm32 - uses: actions-rs/cargo@v1 - with: - command: check - args: --target wasm32-unknown-unknown --no-default-features + run: cargo check --target wasm32-unknown-unknown --no-default-features - uses: dtolnay/rust-toolchain@stable with: target: x86_64-unknown-freebsd - name: Check compilation for freeBSD - uses: actions-rs/cargo@v1 - with: - command: check - args: --target x86_64-unknown-freebsd + run: cargo check --target x86_64-unknown-freebsd - name: Prepare repository for redox compilation run: bash scripts/redox/uncomment-cargo.sh @@ -188,10 +161,7 @@ jobs: if: runner.os == 'macOS' - uses: Swatinem/rust-cache@v1 - name: build rustpython - uses: actions-rs/cargo@v1 - with: - command: build - args: --release --verbose ${{ env.CARGO_ARGS }} + run: cargo build --release --verbose ${{ env.CARGO_ARGS }} - uses: actions/setup-python@v2 with: python-version: "3.10" @@ -248,20 +218,11 @@ jobs: with: components: rustfmt, clippy - name: run rustfmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + run: cargo fmt --all -- --check - name: run clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - args: ${{ env.CARGO_ARGS }} ${{ env.NON_WASM_PACKAGES }} -- -Dwarnings + run: cargo clippy ${{ env.CARGO_ARGS }} ${{ env.NON_WASM_PACKAGES }} -- -Dwarnings - name: run clippy on wasm - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --manifest-path=wasm/lib/Cargo.toml -- -Dwarnings + run: cargo clippy --manifest-path=wasm/lib/Cargo.toml -- -Dwarnings - uses: actions/setup-python@v2 with: python-version: "3.10" @@ -369,9 +330,6 @@ jobs: restore-keys: | ${{ runner.os }}-debug_opt3-${{ hashFiles('**/Cargo.lock') }} - name: build rustpython - uses: actions-rs/cargo@v1 - with: - command: build - args: --release --target wasm32-wasi --features freeze-stdlib,stdlib --verbose + run: cargo build --release --target wasm32-wasi --features freeze-stdlib,stdlib --verbose - name: run snippets run: wasmer run --dir . target/wasm32-wasi/release/rustpython.wasm -- extra_tests/snippets/stdlib_random.py diff --git a/.github/workflows/cron-ci.yaml b/.github/workflows/cron-ci.yaml index 491faf04a..01ba01012 100644 --- a/.github/workflows/cron-ci.yaml +++ b/.github/workflows/cron-ci.yaml @@ -18,10 +18,7 @@ jobs: with: components: llvm-tools-preview - run: sudo apt-get update && sudo apt-get -y install lcov - - uses: actions-rs/cargo@v1 - with: - command: build - args: --release --verbose ${{ env.CARGO_ARGS }} + - run: cargo build --release --verbose ${{ env.CARGO_ARGS }} env: RUSTC_WRAPPER: './scripts/codecoverage-rustc-wrapper.sh' - uses: actions/setup-python@v2 @@ -60,10 +57,7 @@ jobs: - uses: actions/checkout@v2 - uses: dtolnay/rust-toolchain@stable - name: build rustpython - uses: actions-rs/cargo@v1 - with: - command: build - args: --release --verbose + run: cargo build --release --verbose - name: collect tests data run: cargo run --release extra_tests/jsontests.py env: @@ -91,10 +85,7 @@ jobs: - uses: actions/checkout@v2 - uses: dtolnay/rust-toolchain@stable - name: build rustpython - uses: actions-rs/cargo@v1 - with: - command: build - args: --release --verbose + run: cargo build --release --verbose - name: Collect what is left data run: | chmod +x ./whats_left.sh