Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cargo-make to supported tools #146

Merged
merged 1 commit into from
Jun 26, 2023
Merged

Add cargo-make to supported tools #146

merged 1 commit into from
Jun 26, 2023

Conversation

joshka
Copy link
Contributor

@joshka joshka commented Jun 25, 2023

This cuts between 2-4 minutes from CI time over using cargo-binstall (depending on the platform).

@joshka
Copy link
Contributor Author

joshka commented Jun 25, 2023

Error in the windows build (attempting to fix by adding: "bin": "${package}${exe}" to the manifest:

info: downloading https://github.com/sagiegurari/cargo-make/releases/download/0.36.11/cargo-make-v0.36.11-x86_64-pc-windows-msvc.zip
info: verifying sha256 checksum for cargo-make-v0.36.11-x86_64-pc-windows-msvc.zip
Archive:  tmp
  inflating: cargo-make.exe          
  inflating: LICENSE                 
  inflating: makers.exe              
  inflating: README.md               
mv: cannot stat 'cargo-make-v0.36.11-x86_64-pc-windows-msvc/cargo-make.exe': No such file or directory

@joshka
Copy link
Contributor Author

joshka commented Jun 25, 2023

Re-ran ./tools/manifest.sh cargo-make

@joshka
Copy link
Contributor Author

joshka commented Jun 25, 2023

Tested in https://github.com/joshka/test-install-cargo-make/actions/runs/5372200083/jobs/9745437037

https://github.com/joshka/test-install-cargo-make/blob/89a07cffa64e425df1d929f5d985348b4a5164dc/.github/workflows/ci.yml#L1-L17

on:
    push:
      branches:
        - main
name: CI
jobs:
    test:
        runs-on: ubuntu-latest
        steps:
        - name: Checkout
          uses: actions/checkout@v3
        - name: install cargo make
          uses: taiki-e/install-action@370d6b7a85900451456cc58b71ebdbe965d20d8e
          with:
            tool: cargo-make
        - name: cargo make test
          run: cargo make test

Succeeds:


1s
Run taiki-e/install-action@370d6b7a85900451456cc58b71ebdbe965d20d8e
  with:
    tool: cargo-make
    checksum: true
Run bash --noprofile --norc "${GITHUB_ACTION_PATH:?}/main.sh"
  bash --noprofile --norc "${GITHUB_ACTION_PATH:?}/main.sh"
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    INPUT_TOOL: cargo-make
    INPUT_CHECKSUM: true
info: installing cargo-make@latest
info: downloading https://github.com/sagiegurari/cargo-make/releases/download/0.36.11/cargo-make-v0.36.11-x86_64-unknown-linux-musl.zip
info: verifying sha256 checksum for cargo-make-v0.36.11-x86_64-unknown-linux-musl.zip
Archive:  tmp
   creating: cargo-make-v0.36.11-x86_64-unknown-linux-musl/
  inflating: cargo-make-v0.36.11-x86_64-unknown-linux-musl/LICENSE  
  inflating: cargo-make-v0.36.11-x86_64-unknown-linux-musl/README.md  
  inflating: cargo-make-v0.36.11-x86_64-unknown-linux-musl/cargo-make  
  inflating: cargo-make-v0.36.11-x86_64-unknown-linux-musl/makers  
info: cargo-make installed at /home/runner/.cargo/bin/cargo-make
+ cargo make --version
cargo-make 0.36.11

1s
Run cargo make test
  cargo make test
  shell: /usr/bin/bash -e {0}
[cargo-make] INFO - cargo make 0.36.11
[cargo-make] INFO - Calling cargo metadata to extract project info
[cargo-make] INFO - Cargo metadata done
[cargo-make] INFO - Project: test-install-cargo-make
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: test
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: legacy-migration
[cargo-make] INFO - Running Task: test
[cargo-make] INFO - Execute Command: "echo" "hello" "world"
hello world
[cargo-make] INFO - ==================Time Summary==================
[cargo-make] INFO - [Setup Env]:                49.85%     1.34 seconds
[cargo-make] INFO - [Setup Env - Crate Info]:   39.70%     1.06 seconds
[cargo-make] INFO - [Setup Env - Rust]:         9.81%      0.26 seconds
[cargo-make] INFO - [Setup Env - Git]:          0.30%      0.01 seconds
[cargo-make] INFO - [Load Makefiles]:           0.22%      0.01 seconds
[cargo-make] INFO - legacy-migration:           0.07%      0.00 seconds
[cargo-make] INFO - test:                       0.04%      0.00 seconds
[cargo-make] INFO - [Setup Env - Duckscript]:   0.00%      0.00 seconds
[cargo-make] INFO - [Setup Env - CI]:           0.00%      0.00 seconds
[cargo-make] INFO - [Setup Env - Project]:      0.00%      0.00 seconds
[cargo-make] INFO - [Setup Env - Vars]:         0.00%      0.00 seconds
[cargo-make] INFO - ================================================
[cargo-make] INFO - Build Done in 1.35 seconds.

@NobodyXu
Copy link
Collaborator

This cuts between 2-4 minutes from CI time over using cargo-binstall (depending on the platform).

I didn't know that cargo-binstall is so slow installing cargo-make, in my experience it usually a few seconds on CI, unless it reaches GitHub rate limit.
P.S. You can try passing GITHUB_TOKEN to speedup resolution.

@NobodyXu NobodyXu merged commit fd8cc5b into taiki-e:main Jun 26, 2023
@joshka
Copy link
Contributor Author

joshka commented Jun 26, 2023

I was pretty surprised by binstall being that slow too!

@joshka joshka deleted the cargo-make branch June 26, 2023 03:51
@taiki-e
Copy link
Owner

taiki-e commented Jun 26, 2023

Thanks! Published in 2.12.0.

@joshka
Copy link
Contributor Author

joshka commented Jun 26, 2023

Thanks - confirmed that it works in https://github.com/joshka/test-install-cargo-make/actions/runs/5373770445/jobs/9748477866

        - name: checkout
          uses: actions/checkout@v3
        - name: install cargo make
          uses: taiki-e/install-action@cargo-make
        - name: cargo make run
          run: cargo make run
info: installing cargo-make@latest
info: downloading https://github.com/sagiegurari/cargo-make/releases/download/0.36.11/cargo-make-v0.36.11-x86_64-unknown-linux-musl.zip
info: verifying sha256 checksum for cargo-make-v0.36.11-x86_64-unknown-linux-musl.zip
Archive:  tmp
   creating: cargo-make-v0.36.11-x86_64-unknown-linux-musl/
  inflating: cargo-make-v0.36.11-x86_64-unknown-linux-musl/LICENSE  
  inflating: cargo-make-v0.36.11-x86_64-unknown-linux-musl/README.md  
  inflating: cargo-make-v0.36.11-x86_64-unknown-linux-musl/cargo-make  
  inflating: cargo-make-v0.36.11-x86_64-unknown-linux-musl/makers  
info: cargo-make installed at /home/runner/.cargo/bin/cargo-make
+ cargo make --version
cargo-make 0.36.11
[cargo-make] INFO - cargo make 0.36.11
[cargo-make] INFO - Calling cargo metadata to extract project info
[cargo-make] INFO - Cargo metadata done
[cargo-make] INFO - Project: test-install-cargo-make
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: run
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: legacy-migration
[cargo-make] INFO - Running Task: run
[cargo-make] INFO - Execute Command: "cargo" "run"
   Compiling test-install-cargo-make v0.1.0 (/home/runner/work/test-install-cargo-make/test-install-cargo-make)
    Finished dev [unoptimized + debuginfo] target(s) in 4.65s
     Running `target/debug/test-install-cargo-make`
Hello, world!
[cargo-make] INFO - ==================Time Summary==================
[cargo-make] INFO - run:                        52.88%     4.75 seconds
[cargo-make] INFO - [Setup Env]:                23.52%     2.12 seconds
[cargo-make] INFO - [Setup Env - Crate Info]:   20.10%     1.81 seconds
[cargo-make] INFO - [Setup Env - Rust]:         3.29%      0.30 seconds
[cargo-make] INFO - [Setup Env - Git]:          0.11%      0.01 seconds
[cargo-make] INFO - [Load Makefiles]:           0.08%      0.01 seconds
[cargo-make] INFO - legacy-migration:           0.02%      0.00 seconds
[cargo-make] INFO - [Setup Env - Duckscript]:   0.00%      0.00 seconds
[cargo-make] INFO - [Setup Env - CI]:           0.00%      0.00 seconds
[cargo-make] INFO - [Setup Env - Project]:      0.00%      0.00 seconds
[cargo-make] INFO - [Setup Env - Vars]:         0.00%      0.00 seconds
[cargo-make] INFO - ================================================
[cargo-make] INFO - Build Done in 6.88 seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants