Skip to content

Commit 3046380

Browse files
committed
Update lint_master.yml
1 parent 5976714 commit 3046380

File tree

4 files changed

+143
-73
lines changed

4 files changed

+143
-73
lines changed

.github/workflows/lint_master.yml

Lines changed: 93 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- master # Push events on master branch
7+
- issue_2083
78

89
jobs:
910
ts_lint:
@@ -13,84 +14,104 @@ jobs:
1314
uses: actions/checkout@v2
1415
- name: libudev-dev
1516
run: sudo apt-get install -y libudev-dev
16-
- name: install ruby
17-
uses: ruby/setup-ruby@v1
17+
- name: install node
18+
uses: actions/setup-node@master
1819
with:
19-
ruby-version: "3.0"
20-
bundler-cache: true
21-
- name: install ruby:gem::dotenv
22-
run: gem install dotenv
23-
- name: install ruby:gem::json
24-
run: gem install json
25-
- uses: actions-rs/toolchain@v1
20+
node-version: "current"
21+
- name: Set up Rust toolchain
22+
uses: actions-rs/toolchain@v1
2623
with:
2724
toolchain: stable
2825
override: true
26+
- name: Rust Cache
27+
uses: Swatinem/rust-cache@v2.7.3
28+
- name: cargo install nj-cli
29+
run: cargo install nj-cli
2930
- name: enable corepack for yarnpkg upgrade
3031
run: corepack enable
32+
- name: Install Build CLI tool
33+
run: cargo install --path=cli
34+
- name: install wasm-pack
35+
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
3136
- name: JS/TS linting
32-
run: rake lint:js
37+
run: cargo chipmunk lint shared binding wrapper wasm client app
3338
- name: typescript checking
34-
run: rake tsc
35-
rust_lint:
36-
runs-on: ubuntu-latest
37-
steps:
38-
- name: Checkout
39-
uses: actions/checkout@v2
40-
- name: libudev-dev
41-
run: sudo apt-get install -y libudev-dev
42-
- name: install ruby
43-
uses: ruby/setup-ruby@v1
44-
with:
45-
ruby-version: "3.0"
46-
bundler-cache: true
47-
- name: install ruby:gem::dotenv
48-
run: gem install dotenv
49-
- name: install ruby:gem::json
50-
run: gem install json
51-
- uses: actions-rs/toolchain@v1
52-
with:
53-
toolchain: stable
54-
override: true
55-
- name: Rust linting
56-
run: rake lint:rust
57-
integration_tests:
58-
runs-on: ubuntu-latest
59-
steps:
60-
- name: Checkout
61-
uses: actions/checkout@v2
62-
- name: libudev-dev
63-
run: sudo apt-get install -y libudev-dev
64-
- name: install ruby
65-
uses: ruby/setup-ruby@v1
66-
with:
67-
ruby-version: "3.0"
68-
bundler-cache: true
69-
- name: install ruby:gem::dotenv
70-
run: gem install dotenv
71-
- name: install ruby:gem::json
72-
run: gem install json
73-
- uses: actions-rs/toolchain@v1
74-
with:
75-
toolchain: stable
76-
override: true
77-
- name: enable corepack for yarnpkg upgrade
7839
run: |
79-
npm install tslib
80-
corepack enable
81-
- name: Run integration tests
82-
run: rake test:js
83-
unit_tests:
84-
runs-on: ubuntu-latest
85-
steps:
86-
- name: Checkout
87-
uses: actions/checkout@v2
88-
- name: libudev-dev
89-
run: sudo apt-get install -y libudev-dev
90-
- name: install ruby
91-
uses: ruby/setup-ruby@v1
92-
with:
93-
ruby-version: "3.0"
94-
bundler-cache: true
95-
- name: Run unit tests on indexer
96-
run: rake test:rust
40+
cargo chipmunk install shared client app
41+
cargo chipmunk build binding wrapper wasm
42+
43+
- name: TypeScript check - Client Application
44+
working-directory: application/client
45+
run: yarn run check
46+
47+
- name: TypeScript check - Holder Application
48+
working-directory: application/holder
49+
run: yarn run check
50+
51+
- name: TypeScript check - Platform Application
52+
working-directory: application/platform
53+
run: yarn run check
54+
55+
56+
# rust_lint:
57+
# runs-on: ubuntu-latest
58+
# steps:
59+
# - name: Checkout
60+
# uses: actions/checkout@v2
61+
# - name: libudev-dev
62+
# run: sudo apt-get install -y libudev-dev
63+
# - name: install ruby
64+
# uses: ruby/setup-ruby@v1
65+
# with:
66+
# ruby-version: "3.0"
67+
# bundler-cache: true
68+
# - name: install ruby:gem::dotenv
69+
# run: gem install dotenv
70+
# - name: install ruby:gem::json
71+
# run: gem install json
72+
# - uses: actions-rs/toolchain@v1
73+
# with:
74+
# toolchain: stable
75+
# override: true
76+
# - name: Rust linting
77+
# run: rake lint:rust
78+
# integration_tests:
79+
# runs-on: ubuntu-latest
80+
# steps:
81+
# - name: Checkout
82+
# uses: actions/checkout@v2
83+
# - name: libudev-dev
84+
# run: sudo apt-get install -y libudev-dev
85+
# - name: install ruby
86+
# uses: ruby/setup-ruby@v1
87+
# with:
88+
# ruby-version: "3.0"
89+
# bundler-cache: true
90+
# - name: install ruby:gem::dotenv
91+
# run: gem install dotenv
92+
# - name: install ruby:gem::json
93+
# run: gem install json
94+
# - uses: actions-rs/toolchain@v1
95+
# with:
96+
# toolchain: stable
97+
# override: true
98+
# - name: enable corepack for yarnpkg upgrade
99+
# run: |
100+
# npm install tslib
101+
# corepack enable
102+
# - name: Run integration tests
103+
# run: rake test:js
104+
# unit_tests:
105+
# runs-on: ubuntu-latest
106+
# steps:
107+
# - name: Checkout
108+
# uses: actions/checkout@v2
109+
# - name: libudev-dev
110+
# run: sudo apt-get install -y libudev-dev
111+
# - name: install ruby
112+
# uses: ruby/setup-ruby@v1
113+
# with:
114+
# ruby-version: "3.0"
115+
# bundler-cache: true
116+
# - name: Run unit tests on indexer
117+
# run: rake test:rust

cli/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Arguments:
7070
- wrapper: Represents the path `application/apps/rustcore/ts-bindings`
7171
- wasm: Represents the path `application/apps/rustcore/wasm-bindings`
7272
- client: Represents the path `application/client`
73-
- updater: Represents the path `application/apps/precompiled/updater
73+
- updater: Represents the path `application/apps/precompiled/updater`
7474
- app: Represents the path `application/holder`
7575
- cli: Represents the path `cli`
7676

cli/src/cli_args.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,19 @@ pub enum Command {
7373
#[arg(short, long, default_value_t = UiMode::default(), help = UI_LOG_OPTION_HELP_TEXT, value_enum)]
7474
ui_mode: UiMode,
7575
},
76+
/// Install all or the specified targets
77+
Install {
78+
/// Target to install, by default whole application will be installed
79+
#[arg(index = 1)]
80+
target: Option<Vec<Target>>,
81+
82+
/// Build release version
83+
#[arg(short, long, default_value_t = false)]
84+
production: bool,
85+
86+
#[arg(short, long, default_value_t = UiMode::default(), help = UI_LOG_OPTION_HELP_TEXT, value_enum)]
87+
ui_mode: UiMode,
88+
},
7689
/// Build all or the specified targets
7790
Build {
7891
/// Target to build, by default whole application will be built

cli/src/main.rs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,18 @@ async fn main_process(command: Command) -> Result<(), Error> {
106106
let results = jobs_runner::run(&targets, JobType::Lint).await?;
107107
(JobType::Lint, results)
108108
}
109+
Command::Install {
110+
target,
111+
production,
112+
ui_mode,
113+
} => {
114+
JobsState::init(false);
115+
init_tracker(ui_mode);
116+
resolve_dev_tools()?;
117+
let targets = get_install_targets(target);
118+
let results = jobs_runner::run(&targets, JobType::Install { production }).await?;
119+
(JobType::Install { production }, results)
120+
}
109121
Command::Build {
110122
target,
111123
production,
@@ -266,3 +278,27 @@ fn get_targets_or_all(targets: Option<Vec<Target>>) -> Vec<Target> {
266278
Target::all().to_vec()
267279
}
268280
}
281+
282+
fn get_install_targets(targets: Option<Vec<Target>>) -> Vec<Target> {
283+
// List of targets to allow for the Install job
284+
let allowed_targets = vec![
285+
Target::Shared,
286+
Target::Binding,
287+
Target::Wasm,
288+
Target::Client,
289+
Target::App,
290+
];
291+
292+
if let Some(mut list) = targets {
293+
// Deduplicate provided targets
294+
list.dedup();
295+
// list.clone();
296+
// Filter the list to only include allowed targets
297+
list.into_iter()
298+
.filter(|t| allowed_targets.contains(t))
299+
.collect()
300+
} else {
301+
// If no targets specified, default to all allowed targets
302+
allowed_targets
303+
}
304+
}

0 commit comments

Comments
 (0)