actions-rs / meta

🦀 GitHub Actions for Rust - recipes, discussions, questions and ideas
https://github.com/actions-rs
Creative Commons Zero v1.0 Universal
353 stars 15 forks source link

How to handle multiple crates scattered throughout my repo? #30

Open mnp opened 4 years ago

mnp commented 4 years ago

Do the checklist before filing an issue:

Motivation

I have a monorepo with various languages, rust included, at different levels. I don't see how the actions should be used in this case. My brute force approach is to define a Makefile target that recurses my repo like this,

SUBDIRS = $(dir $(shell find . -name Cargo.toml))
test-rust:
        for dir in $(SUBDIRS); do ( cd $$dir && cargo test --verbose); done

... and then call make test-rust from the GH action, after setting up the environment. This seems hacky.

Workflow example

/shrug -- I'm thinking there should be a --recursive-find-crate sort of option.

Additional context

There are existing discussions around pointing to one particular workspace or crate: #27 and #28 which seem germane but don't solve my problem.

Any advise?

lskatz commented 2 years ago

I checked out my repo to a new path and I cannot figure out how to change the path for cargo build either

      - uses: actions/checkout@v3
        with:
          path: fasten
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
      - uses: actions-rs/cargo@v1
        with:
          command: build
          args: --release --all-features