Skip to content

Act: Build fails with sh: 1: cargo: not found #1321

Closed
@Sellig6792

Description

@Sellig6792

Hello, I've just finished the new version of my project. But when I did the PR an error occurred in the workflow. So I decided to revert the merge and tested the workflow locally with Act. Unfortunately, I discovered that, locally, I had one more error.
For Information MacOS isn't running with Act.

The cross version is the v0.2.5

The Error

| [command]cross build --release --target x86_64-pc-windows-gnu
| info: downloading component 'rust-src'
| info: installing component 'rust-src'
| sh: 1: cargo: not found

The Job:

deploy_building:
  name: Deploy Building
  needs: [ test ]
  strategy:
    matrix:
      os: [ ubuntu-latest ] # Default os for build
      target: [ aarch64-unknown-linux-gnu,
                i686-pc-windows-gnu, x86_64-pc-windows-gnu,
                i686-unknown-linux-gnu, x86_64-unknown-linux-gnu,
                x86_64-apple-darwin ]
      exclude: # Do not build for macOS on Linux
        - target: x86_64-apple-darwin
          os: ubuntu-latest
      include:
        - target: x86_64-apple-darwin
          os: macos-latest
  # Runs on latest ubuntu by default except for windows targets
  runs-on: ${{ matrix.os }}
  steps:
    - name: Checkout
      uses: actions/checkout@v1
    - name: Install rust
      uses: actions-rs/toolchain@v1
      with:
        toolchain: stable
        profile: minimal
        override: true
        target: ${{ matrix.target }}
    - name: Build release
      uses: actions-rs/cargo@v1
      with:
        use-cross: true
        command: build
        args: --release --target ${{ matrix.target }}

Here is the verbose log for only one target (windows x86_64)

Thanks to all the people who will try to solve my problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions