Skip to content

Commit

Permalink
feat: pop install (#149)
Browse files Browse the repository at this point in the history
* scaffold pop install

* include scripts

* implement script execution

* update script

* links

* fix formatting

* feat: installation process in rust code

* feat: flag --skip-confirmation

* refactor: avoid repetition

* test: pop install CI

* fix: merge main

* docs: remove Substrate word

* fix: remove sudo from commands and merge install.yml

* chore: merge and refactor .yml

* chore: add debian too

* chore: pop install CI only on main

* fix: in CI run install pop and run pop install separately

* refactor: dependencies in enum

* refactor: dependencies in enum

* refactor: sort enum

* chore: feedback

* chore: test in ci for arch and redhat and some fixes

* chore: change in ci

* fix: ci arch distribution

* chore: change ci to only triggers in main

* fix: command help message

* refactor: remove unnecesary prefix and merge commands

* refactor: remove unnecesary code

* chore: fix formatting

---------

Co-authored-by: Abhishek Shah <[email protected]>
  • Loading branch information
AlexD10S and weezy20 authored May 10, 2024
1 parent a50f0ca commit cc83f41
Show file tree
Hide file tree
Showing 9 changed files with 411 additions and 15 deletions.
72 changes: 71 additions & 1 deletion .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,73 @@ defaults:
shell: bash

jobs:
arch:
runs-on: ubuntu-latest
container: archlinux:latest
steps:
- uses: actions/checkout@v4
- name: Install prerequisites
run: pacman -Syu --needed --noconfirm cmake curl git base-devel
- name: Install Rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Install Pop
run: |
. "$HOME/.cargo/env"
cargo install --locked --path ./crates/pop-cli
- name: Run Pop install
run: |
. "$HOME/.cargo/env"
pop install -y
debian:
runs-on: ubuntu-latest
container: debian
steps:
- uses: actions/checkout@v4
- name: Install prerequisites
run: apt-get update && apt-get -y install build-essential cmake curl git
- name: Install Rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Install Pop
run: |
. "$HOME/.cargo/env"
cargo install --locked --path ./crates/pop-cli
- name: Run Pop Install
run: |
. "$HOME/.cargo/env"
pop install -y
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install prerequisites
run: brew update && brew install cmake openssl protobuf
- name: Install Rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Install Pop
run: |
. "$HOME/.cargo/env"
cargo install --locked --path ./crates/pop-cli
- name: Run Pop Install
run: |
. "$HOME/.cargo/env"
pop install -y
redhat:
runs-on: ubuntu-latest
container: redhat/ubi8
steps:
- uses: actions/checkout@v4
- name: Install prerequisites
run: yum update -y && yum install -y perl-IPC-Cmd clang curl git make cmake protobuf-compiler gcc pkg-config openssl-devel
- name: Install Rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Install Pop
run: |
. "$HOME/.cargo/env"
cargo install --locked --path ./crates/pop-cli
- name: Run Pop install
run: |
. "$HOME/.cargo/env"
pop install -y
ubuntu:
runs-on: ubuntu-latest
container: ubuntu
Expand All @@ -24,4 +91,7 @@ jobs:
run: |
. "$HOME/.cargo/env"
cargo install --locked --path ./crates/pop-cli
pop --version
- name: Run Pop install
run: |
. "$HOME/.cargo/env"
pop install -y
12 changes: 12 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ cliclack = "0.2"
console = "0.15"
strum = "0.26"
strum_macros = "0.26"
os_info = { version = "3", default-features = false }
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ You can install Pop CLI as follows:
```shell
cargo install --locked --git https://github.com/r0gue-io/pop-cli
```

> For detailed instructions on how to install Pop CLI, please refer to our documentation: https://learn.onpop.io/pop/v/pop-cli/welcome/installing-pop-cli
> :information_source: A [crates.io](https://crates.io/crates/pop-cli) version will be available soon!
## Getting Started
Expand Down
2 changes: 2 additions & 0 deletions crates/pop-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ duct.workspace = true
tempfile.workspace = true
url.workspace = true
tokio.workspace = true
reqwest.workspace = true
os_info.workspace = true

# pop-cli
clap.workspace = true
Expand Down
Loading

0 comments on commit cc83f41

Please sign in to comment.