From a040c329b7bf30fa9ba9adc834c72ba2bf797c66 Mon Sep 17 00:00:00 2001 From: Adrian Wielgosik <4729533+adrian17@users.noreply.github.com> Date: Fri, 2 Dec 2022 23:53:57 +0100 Subject: [PATCH] Revert "ci: Move to direct cargo commands instead of using actions-rs/cargo" This reverts commit 872dee65e75f27237eb6e2bdc21ba1039acafe97. --- .github/workflows/release_nightly.yml | 15 +++++++++++--- .github/workflows/test_rust.yml | 30 +++++++++++++++++++++------ 2 files changed, 36 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release_nightly.yml b/.github/workflows/release_nightly.yml index 74d4080de..32028591b 100644 --- a/.github/workflows/release_nightly.yml +++ b/.github/workflows/release_nightly.yml @@ -124,7 +124,10 @@ jobs: sudo apt install -y libasound2-dev libxcb-shape0-dev libxcb-xfixes0-dev libgtk-3-dev - name: Cargo build - run: cargo build --package ruffle_desktop --release ${{matrix.DESKTOP_FEATURES && '--features' }} ${{matrix.DESKTOP_FEATURES}} ${{ matrix.target && '--target' }} ${{ matrix.target }} + uses: actions-rs/cargo@v1 + with: + command: build + args: --package ruffle_desktop --release ${{matrix.DESKTOP_FEATURES && '--features' }} ${{matrix.DESKTOP_FEATURES}} ${{ matrix.target && '--target' }} ${{ matrix.target }} env: RUSTFLAGS: ${{ matrix.RUSTFLAGS }} MACOSX_DEPLOYMENT_TARGET: ${{ matrix.MACOSX_DEPLOYMENT_TARGET }} @@ -162,7 +165,10 @@ jobs: - name: Build Safari Web Extension stub binary if: runner.os == 'macOS' - run: cargo build --package ruffle_web_safari --release ${{ matrix.target && '--target' }} ${{ matrix.target }} + uses: actions-rs/cargo@v1 + with: + command: build + args: --package ruffle_web_safari --release ${{ matrix.target && '--target' }} ${{ matrix.target }} env: RUSTFLAGS: ${{ matrix.RUSTFLAGS }} MACOSX_DEPLOYMENT_TARGET: ${{ matrix.MACOSX_DEPLOYMENT_TARGET }} @@ -307,7 +313,10 @@ jobs: # wasm-bindgen-cli version must match wasm-bindgen crate version. # Be sure to update in test_web.yml, web/Cargo.toml and web/README.md. - name: Install wasm-bindgen - run: cargo install wasm-bindgen-cli --version 0.2.83 + uses: actions-rs/cargo@v1 + with: + command: install + args: wasm-bindgen-cli --version 0.2.83 - name: Setup conda uses: conda-incubator/setup-miniconda@v2 diff --git a/.github/workflows/test_rust.yml b/.github/workflows/test_rust.yml index b25047d2e..fb34c824b 100644 --- a/.github/workflows/test_rust.yml +++ b/.github/workflows/test_rust.yml @@ -62,29 +62,47 @@ jobs: shared-key: "desktop" - name: Check formatting - run: cargo fmt --all -- --check + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check - name: Lint AS3 playerglobals if: runner.os == 'Linux' && matrix.rust_version == 'stable' - run: cargo run -p build_playerglobal -- lint + uses: actions-rs/cargo@v1 + with: + command: run + args: -p build_playerglobal -- lint - name: Check clippy - run: cargo clippy --all --all-features --tests -- -D warnings + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --all --all-features --tests -- -D warnings - name: Check documentation - run: cargo doc --no-deps --all-features + uses: actions-rs/cargo@v1 + with: + command: doc + args: --no-deps --all-features env: RUSTDOCFLAGS: -D warnings - name: Run tests with image tests if: runner.os == 'Linux' || runner.os == 'Windows' - run: cargo test --locked --features imgtests + uses: actions-rs/cargo@v1 env: XDG_RUNTIME_DIR: '' # dummy value, just to silence warnings about it missing + with: + command: test + args: --locked --features imgtests - name: Run tests without image tests if: ${{ !(runner.os == 'Linux' || runner.os == 'Windows') }} - run: cargo test --locked + uses: actions-rs/cargo@v1 + with: + command: test + args: --locked - name: Upload images if: failure()