Skip to content

Commit

Permalink
Merge pull request #1985 from AmmarAbouZor/build-cli-tool
Browse files Browse the repository at this point in the history
CLI Tool for Build System
  • Loading branch information
AmmarAbouZor authored Aug 9, 2024
2 parents 2c213a7 + 513ebe0 commit 2168eb5
Show file tree
Hide file tree
Showing 56 changed files with 6,217 additions and 6 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/build_cli_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# This action runs the checks for pull requests using the build CLI Tool.
name: Build CLI Tool Checks

# Using the tool in GitHub Actions stills work in progress and will be invoked manually
# until it's ready to replace the current rake workflows.
on:
workflow_dispatch:

jobs:
all_lint:
name: Run all lints using CLI tool
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Latest Rust
run: |
rustup update --no-self-update ${{ env.RUST_CHANNEL }}
rustup default ${{ env.RUST_CHANNEL }}
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Install wasm-pack
run: cargo install wasm-pack
- name: Install nj-cli
run: cargo install nj-cli
- name: Install Build CLI tool
run: cargo install --path=cli
- name: libudev-dev
run: sudo apt-get install -y libudev-dev
- name: enable corepack for yarnpkg upgrade
run: corepack enable
- name: Run Lints
run: cargo chipmunk lint -r
all_test:
name: Run all tests using CLI tool
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Latest Rust
run: |
rustup update --no-self-update ${{ env.RUST_CHANNEL }}
rustup default ${{ env.RUST_CHANNEL }}
- name: Rust Cache
uses: Swatinem/[email protected]
- name: Install wasm-pack
run: cargo install wasm-pack
- name: Install nj-cli
run: cargo install nj-cli
- name: Install Build CLI tool
run: cargo install --path=cli
- name: libudev-dev
run: sudo apt-get install -y libudev-dev
- name: enable corepack for yarnpkg upgrade
run: |
npm install tslib
corepack enable
- name: Run Tests
run: cargo chipmunk test -r
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,8 @@ application/sandbox/serial/render/lib/views/dialog/port.available
sandbox
sandbox.backup
**/holder/release
scripts/tools/file_checklists/*.*
scripts/tools/file_checklists/*.*

# CLI build tool files #
########################
.build_chksum_*
3 changes: 0 additions & 3 deletions application/apps/indexer/sources/src/command/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ use tokio::{
use tokio_stream::StreamExt;
use tokio_util::codec::{self, FramedRead, LinesCodec};

#[cfg(windows)]
use std::os::windows::process::CommandExt;

lazy_static! {
static ref GROUP_RE: Regex =
Regex::new(r#"".*?""#).expect("Regex must compile (fail with GROUP_RE)");
Expand Down
2 changes: 2 additions & 0 deletions application/apps/indexer/sources/src/serial/serialport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ impl SerialSource {
.stop_bits(stop_bits(&config.stop_bits))
.open_native_async()
{
// We get warning on windows because `port` doesn't need to be mutated there
#[cfg_attr(windows, allow(unused_mut))]
Ok(mut port) => {
#[cfg(unix)]
if let Err(err) = port.set_exclusive(config.exclusive) {
Expand Down
1 change: 1 addition & 0 deletions application/apps/rustcore/ts-bindings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"types": "./dist/index.d.ts",
"scripts": {
"build": "node_modules/.bin/tsc -p tsconfig.json",
"prod": "node_modules/.bin/tsc -p tsconfig.json",
"test_cancel": "node_modules/.bin/electron node_modules/jasmine-ts/lib/index.js ./spec/session.cancel.spec.ts",
"lint": "node_modules/.bin/eslint . --ext .ts --max-warnings=0",
"check": "node_modules/.bin/tsc -p tsconfig.json --noemit"
Expand Down
3 changes: 2 additions & 1 deletion application/apps/rustcore/wasm-bindings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"scripts": {
"build": "node_modules/.bin/webpack",
"start": "node_modules/.bin/webpack-dev-server",
"test": "node_modules/.bin/karma start"
"test": "node_modules/.bin/karma start",
"test_win": "node_modules\\.bin\\karma start"
},
"author": "",
"license": "MIT",
Expand Down
1 change: 1 addition & 0 deletions application/holder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"electron": "npm run build && ./node_modules/.bin/electron --inspect ./dist/app.js",
"electron-win": "node_modules/.bin/electron --inspect ./dist/app.js",
"build": "node_modules/.bin/tsc -p tsconfig.json",
"prod": "node_modules/.bin/tsc -p tsconfig.json",
"start": "npm run build-ts && npm run electron",
"postinstall": "electron-builder install-app-deps",
"build-darwin-arm64": "node_modules/.bin/electron-builder --mac --dir --config=./electron.config.darwin.arm64.json",
Expand Down
1 change: 1 addition & 0 deletions application/platform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
},
"scripts": {
"build": "node_modules/.bin/tsc -p tsconfig.json",
"prod": "node_modules/.bin/tsc -p tsconfig.json",
"lint": "node_modules/.bin/eslint . --ext .ts --max-warnings=0 ",
"check": "node_modules/.bin/tsc -p tsconfig.json --noemit"
},
Expand Down
6 changes: 6 additions & 0 deletions cli/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/target
**/*.rs.bk
*.out
lineMetadata.json
vim-markdown-preview.html
.DS_Store
Loading

0 comments on commit 2168eb5

Please sign in to comment.