From f16595acb2cc69bc509c4984273a5ea2a51d5819 Mon Sep 17 00:00:00 2001 From: Abdenasser Date: Fri, 8 Nov 2024 16:52:21 +0100 Subject: [PATCH 01/11] improve build-check --- .github/workflows/build-check.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index 5e96c33..41e53f2 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -23,11 +23,15 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable - + with: + components: cargo + + - uses: Swatinem/rust-cache@v2 + - name: Install Linux Dependencies run: | sudo apt-get update - sudo apt-get install -y \ + sudo apt-get install --no-install-recommends -y \ build-essential \ pkg-config \ libgtk-3-dev \ @@ -39,10 +43,7 @@ jobs: libwebkit2gtk-4.1-dev - name: Install Dependencies - run: npm install - - - name: Build Frontend - run: npm run build + run: npm ci - name: Build Application - run: npm run tauri build \ No newline at end of file + run: npm run tauri build \ No newline at end of file From 3389941cca72bd1b39a4a9c41ca22822dea6fdf8 Mon Sep 17 00:00:00 2001 From: Abdenasser Date: Fri, 8 Nov 2024 17:03:23 +0100 Subject: [PATCH 02/11] caching linux dependencies between build checks --- .github/workflows/build-check.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index 41e53f2..019123d 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -28,6 +28,15 @@ jobs: - uses: Swatinem/rust-cache@v2 + - name: Cache Linux Dependencies + id: cache-apt + uses: actions/cache@v3 + with: + path: /var/cache/apt/archives + key: ${{ runner.os }}-apt-${{ hashFiles('.github/workflows/build-check.yml') }} + restore-keys: | + ${{ runner.os }}-apt- + - name: Install Linux Dependencies run: | sudo apt-get update From 215b57c7e9fe871357a33e664aeeb3c40c262d75 Mon Sep 17 00:00:00 2001 From: Hanif Ariffin Date: Sat, 9 Nov 2024 00:07:02 +0800 Subject: [PATCH 03/11] Make PID column optional Signed-off-by: Hanif Ariffin --- src/routes/+page.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 5a8c565..f47092d 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -30,7 +30,7 @@ let columns: Column[] = [ { id: "name", label: "Process Name", visible: true, required: true }, - { id: "pid", label: "PID", visible: true, required: true }, + { id: "pid", label: "PID", visible: true, required: false }, { id: "status", label: "Status", From ac9d60053186a6dc7d332877ae7beab76c29a215 Mon Sep 17 00:00:00 2001 From: Abdenasser Date: Fri, 8 Nov 2024 17:16:05 +0100 Subject: [PATCH 04/11] caching linux dependencies between build checks --- .github/workflows/build-check.yml | 32 ++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index 019123d..6a2bd51 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -6,6 +6,12 @@ on: env: CARGO_TERM_COLOR: always + CARGO_INCREMENTAL: 1 + CARGO_NET_RETRY: 10 + RUSTUP_MAX_RETRIES: 10 + RUST_BACKTRACE: 1 + RUSTC_WRAPPER: sccache + CARGO_BUILD_JOBS: ${{ runtime.numCPU }} jobs: build: @@ -21,23 +27,19 @@ jobs: node-version: 'lts/*' cache: 'npm' - - name: Install Rust - uses: dtolnay/rust-toolchain@stable - with: - components: cargo - - - uses: Swatinem/rust-cache@v2 - - name: Cache Linux Dependencies id: cache-apt uses: actions/cache@v3 with: - path: /var/cache/apt/archives - key: ${{ runner.os }}-apt-${{ hashFiles('.github/workflows/build-check.yml') }} + path: | + /var/cache/apt + /var/lib/apt/lists + key: ${{ runner.os }}-apt-${{ hashFiles('**/build-check.yml') }} restore-keys: | ${{ runner.os }}-apt- - name: Install Linux Dependencies + if: steps.cache-apt.outputs.cache-hit != 'true' run: | sudo apt-get update sudo apt-get install --no-install-recommends -y \ @@ -50,6 +52,18 @@ jobs: libjavascriptcoregtk-4.0-dev \ libsoup-3.0-dev \ libwebkit2gtk-4.1-dev + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + components: cargo + target: x86_64-unknown-linux-gnu + profile: minimal + + - uses: Swatinem/rust-cache@v2 + with: + shared-key: "build" + save-if: ${{ github.ref == 'refs/heads/main' }} - name: Install Dependencies run: npm ci From 0c3cebd9421b167aee333c215fe83e3fd55ff02e Mon Sep 17 00:00:00 2001 From: Abdenasser Date: Fri, 8 Nov 2024 17:28:08 +0100 Subject: [PATCH 05/11] fix build check --- .github/workflows/build-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index 6a2bd51..b31f188 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -11,7 +11,7 @@ env: RUSTUP_MAX_RETRIES: 10 RUST_BACKTRACE: 1 RUSTC_WRAPPER: sccache - CARGO_BUILD_JOBS: ${{ runtime.numCPU }} + CARGO_BUILD_JOBS: 2 jobs: build: From b16c61addbe0e5eba958100237448b8cf64e25ba Mon Sep 17 00:00:00 2001 From: Abdenasser Date: Fri, 8 Nov 2024 17:33:53 +0100 Subject: [PATCH 06/11] fix build check --- .github/workflows/build-check.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index b31f188..750cc2d 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -62,11 +62,12 @@ jobs: - uses: Swatinem/rust-cache@v2 with: + workspaces: "./src-tauri -> target" shared-key: "build" - save-if: ${{ github.ref == 'refs/heads/main' }} - name: Install Dependencies run: npm ci - name: Build Application - run: npm run tauri build \ No newline at end of file + working-directory: ./src-tauri + run: cargo build --verbose \ No newline at end of file From 9020137e7b044d61de295e59c3995c50e1582f9a Mon Sep 17 00:00:00 2001 From: Abdenasser Date: Fri, 8 Nov 2024 17:37:37 +0100 Subject: [PATCH 07/11] fix build check --- .github/workflows/build-check.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index 750cc2d..8147220 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -58,7 +58,13 @@ jobs: with: components: cargo target: x86_64-unknown-linux-gnu - profile: minimal + + - name: Install sccache + run: | + SCCACHE_VERSION=v0.7.7 + curl -L "https://github.com/mozilla/sccache/releases/download/${SCCACHE_VERSION}/sccache-${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz" | tar xz + sudo mv sccache-*/sccache /usr/local/bin/sccache + echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV - uses: Swatinem/rust-cache@v2 with: @@ -69,5 +75,4 @@ jobs: run: npm ci - name: Build Application - working-directory: ./src-tauri - run: cargo build --verbose \ No newline at end of file + run: npm run tauri build \ No newline at end of file From 412f6d63f4bbfa0f8660d0d6dce64c5bd214431d Mon Sep 17 00:00:00 2001 From: Abdenasser Date: Fri, 8 Nov 2024 17:52:25 +0100 Subject: [PATCH 08/11] build check --- .github/workflows/build-check.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index 8147220..1cf1952 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -32,15 +32,18 @@ jobs: uses: actions/cache@v3 with: path: | - /var/cache/apt - /var/lib/apt/lists + /var/cache/apt/archives/*.deb + /var/lib/apt/lists/* key: ${{ runner.os }}-apt-${{ hashFiles('**/build-check.yml') }} restore-keys: | ${{ runner.os }}-apt- - name: Install Linux Dependencies - if: steps.cache-apt.outputs.cache-hit != 'true' run: | + sudo rm -rf /var/cache/apt/archives/lock + sudo rm -rf /var/cache/apt/archives/partial + sudo rm -rf /var/lib/apt/lists/lock + sudo rm -rf /var/lib/apt/lists/partial sudo apt-get update sudo apt-get install --no-install-recommends -y \ build-essential \ From e865205282f5219c189e605fa28b66fd4263b093 Mon Sep 17 00:00:00 2001 From: Abdenasser Date: Fri, 8 Nov 2024 18:10:46 +0100 Subject: [PATCH 09/11] decreasing min window size --- src-tauri/tauri.conf.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index c8cb640..e753646 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -39,8 +39,8 @@ "resizable": true, "title": "NeoHtop", "width": 1280, - "minWidth": 1280, - "minHeight": 900 + "minWidth": 1120, + "minHeight": 700 } ], "security": { From 5140ad573bdc54143e36ce07ed229436f3606484 Mon Sep 17 00:00:00 2001 From: Abdenasser Date: Fri, 8 Nov 2024 18:44:57 +0100 Subject: [PATCH 10/11] improve build check's tauri build command --- .github/workflows/build-check.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index 1cf1952..4322e8f 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -78,4 +78,8 @@ jobs: run: npm ci - name: Build Application - run: npm run tauri build \ No newline at end of file + run: | + npm run tauri build -- \ + --target x86_64-unknown-linux-gnu \ + --bundles none \ + --ci \ No newline at end of file From 3b242f49f879c667dccfe3ae8a08b89977ce31ca Mon Sep 17 00:00:00 2001 From: Abdenasser Date: Fri, 8 Nov 2024 18:47:23 +0100 Subject: [PATCH 11/11] improve build check's tauri build command --- .github/workflows/build-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index 4322e8f..0ef31e4 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -81,5 +81,5 @@ jobs: run: | npm run tauri build -- \ --target x86_64-unknown-linux-gnu \ - --bundles none \ + --bundles deb \ --ci \ No newline at end of file