cargo icon indicating copy to clipboard operation
cargo copied to clipboard

How do I find the build artefacts?

Open eggbean opened this issue 2 years ago • 8 comments

My workflow seems to successfully build but I do not know where the build artefacts are. I tried doing a find \ but it didn't find anything.

How do I determine the location of the compiled binary and man files?

jobs:
  armv7l:
    name: armv7l build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          repository: ogham/exa
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          target: armv7-unknown-linux-gnueabihf
          override: true
      - uses: actions-rs/cargo@v1
        with:
          use-cross: true
          command: build

eggbean avatar Oct 17 '22 23:10 eggbean

+1,i also want to get the output binary seems related to https://github.com/actions-rs/cargo/issues/44

devdailytester avatar Nov 19 '22 12:11 devdailytester

Could you tell me if you figure it out? I have had this project on hold for a month now, as I still cannot find it.

eggbean avatar Nov 19 '22 13:11 eggbean

i know where is the build artifact but i dont know how to move to release or do stuff with it.looking at other actions

devdailytester avatar Nov 19 '22 16:11 devdailytester

You know where it is? What is the location? I can't understand why you can't upload it if you know where it is.

eggbean avatar Nov 20 '22 20:11 eggbean

i dont know how to upload i tried use other,release action. The location is like release\build
just like common cargo build.you can try build locally and get the full view its the same,

devdailytester avatar Nov 21 '22 06:11 devdailytester

I don't know what you mean by release\build. Why is there a backslash? Is that the full path? I cannot find that directory.

If you know where the build artefacts are you can upload them using actions/upload-artifact@v2.

eggbean avatar Nov 21 '22 08:11 eggbean

that is of course not the full path lol. you can try compile in your local machine and see the directory,each platform has its own tweakrs(different output path). thanks will try out that upload action.

devdailytester avatar Nov 22 '22 04:11 devdailytester

https://doc.rust-lang.org/cargo/commands/cargo-build.html#output-options

    - uses: actions-rs/cargo@v1
      with:
        command: build
        args: --release --verbose --package batch --bin kr_timer  --target-dir ./build
    - name: tar
      run: tar cvf kr_timer.tar.gz ./build/release/kr_timer* ./.env.prod

cheolgyu avatar May 22 '23 01:05 cheolgyu