Skip to content

Commit

Permalink
Merge branch 'main' into tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaIng committed Mar 18, 2023
2 parents b3acd79 + 1bff965 commit 8dc58a1
Show file tree
Hide file tree
Showing 55 changed files with 4,287 additions and 3,436 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ assignees: ''
4. See error

**Error log**
<!-- If possible, enable debug logging in the config file -->
<!-- Run `journalctl -u dietpi-dashboard` to get -->

**Additional context**
Expand Down
11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
],
"timezone": "America/Chicago",
"schedule": [
"before 5:00am"
],
"packageRules": [
{
"matchUpdateTypes": [
"minor",
"patch",
"pin",
"digest"
],
"automerge": true
}
]
}
26 changes: 0 additions & 26 deletions .github/workflows/dependabot-auto-merge.yml

This file was deleted.

153 changes: 64 additions & 89 deletions .github/workflows/push-build.yml
Original file line number Diff line number Diff line change
@@ -1,105 +1,80 @@
name: Build
on: push
on:
push:
workflow_dispatch:
inputs:
debug_enabled:
description: 'Run the build with tmate debugging enabled'
required: false
default: false

jobs:
build:
if: "!startsWith(github.event.head_commit.message, 'docs') && !startsWith(github.event.head_commit.message, 'style')"
fmt_clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup pnpm
run: corepack enable
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- name: Lint (rustfmt)
working-directory: src/backend
run: cargo fmt -- --check
- name: Install other Rust targets
run: |
rustup target add x86_64-unknown-linux-musl
rustup target add arm-unknown-linux-musleabihf
rustup target add armv7-unknown-linux-musleabihf
rustup target add aarch64-unknown-linux-musl
- name: Restore Rust cache
uses: Swatinem/rust-cache@v1
with:
working-directory: src/backend
- name: Lint (clippy)
working-directory: src/backend
run: |
mkdir dist
cargo clippy --all-targets --all-features -- -D warnings
- name: Install Rust dependencies
run: cargo install cross set-cargo-version
- name: Install Yarn Dependencies
working-directory: src/frontend
run: yarn install
- name: Change frontend version to commit hash
working-directory: src/frontend
run: npm version $(git describe --tags) --allow-same-version
- name: Change backend version to commit hash
run: set-cargo-version src/backend/Cargo.toml $(git describe --tags | cut -c 2-)
- name: Build frontend
working-directory: src/frontend
run: yarn build
- name: Compress frontend files
run: make compress
- name: Build x86_64
working-directory: src/backend
run: cross build --release --target x86_64-unknown-linux-musl --features compression
- name: Delete build artifacts
run: |
rm -r src/backend/target/release/build/*
rm src/backend/target/release/deps/*.so
- name: Build armv6l
working-directory: src/backend
run: cross build --release --target arm-unknown-linux-musleabihf --features compression
- name: Build armv7l
working-directory: src/backend
run: cross build --release --target armv7-unknown-linux-musleabihf --features compression
- name: Build aarch64
working-directory: src/backend
run: cross build --release --target aarch64-unknown-linux-musl --features compression
- uses: actions/upload-artifact@v2
with:
name: dietpi-dashboard-x86_64
path: src/backend/target/x86_64-unknown-linux-musl/release/dietpi-dashboard
- uses: actions/upload-artifact@v2
with:
name: dietpi-dashboard-armv6l
path: src/backend/target/arm-unknown-linux-musleabihf/release/dietpi-dashboard
- uses: actions/upload-artifact@v2
run: cargo clippy --all-targets --all-features -- -D warnings

build:
runs-on: ubuntu-latest
strategy:
matrix:
job:
- { target: x86_64-unknown-linux-musl, pretty: x86_64, backend: false }
- { target: arm-unknown-linux-musleabihf, pretty: armv6l, backend: false }
- { target: armv7-unknown-linux-musleabihf, pretty: armv7l, backend: false }
- { target: aarch64-unknown-linux-musl, pretty: aarch64, backend: false }
- { target: x86_64-unknown-linux-musl, pretty: x86_64-backend, backend: true }
- { target: arm-unknown-linux-musleabihf, pretty: armv6l-backend, backend: true }
- { target: armv7-unknown-linux-musleabihf, pretty: armv7l-backend, backend: true }
- { target: aarch64-unknown-linux-musl, pretty: aarch64-backend, backend: true }
steps:
- uses: actions/checkout@v3
with:
name: dietpi-dashboard-armv7l
path: src/backend/target/armv7-unknown-linux-musleabihf/release/dietpi-dashboard
- uses: actions/upload-artifact@v2
fetch-depth: 0
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
id: toolchain
with:
name: dietpi-dashboard-aarch64
path: src/backend/target/aarch64-unknown-linux-musl/release/dietpi-dashboard
- name: Build x86_64 (backend only)
working-directory: src/backend
run: cross build --release --target x86_64-unknown-linux-musl --no-default-features
- name: Build armv6l (backend only)
working-directory: src/backend
run: cross build --release --target arm-unknown-linux-musleabihf --no-default-features
- name: Build armv7l (backend only)
working-directory: src/backend
run: cross build --release --target armv7-unknown-linux-musleabihf --no-default-features
- name: Build aarch64 (backend only)
working-directory: src/backend
run: cross build --release --target aarch64-unknown-linux-musl --no-default-features
- uses: actions/upload-artifact@v2
targets: ${{ matrix.job.target }}
components: clippy, rustfmt
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
name: dietpi-dashboard-x86_64-backend
path: src/backend/target/x86_64-unknown-linux-musl/release/dietpi-dashboard
- uses: actions/upload-artifact@v2
node-version: 18
- name: Enable pnpm
run: corepack enable
- uses: taiki-e/install-action@v2
with:
name: dietpi-dashboard-armv6l-backend
path: src/backend/target/arm-unknown-linux-musleabihf/release/dietpi-dashboard
- uses: actions/upload-artifact@v2
tool: just,cross
- uses: Swatinem/rust-cache@v2
with:
name: dietpi-dashboard-armv7l-backend
path: src/backend/target/armv7-unknown-linux-musleabihf/release/dietpi-dashboard
- uses: actions/upload-artifact@v2
key: ${{ matrix.job.pretty }}-${{ steps.toolchain.outputs.cachekey }}
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- name: Install set-cargo-version
run: cargo install set-cargo-version
- name: Change frontend version to commit hash
working-directory: frontend
run: npm version $(git describe --tags) --allow-same-version
- name: Change backend version to commit hash
run: set-cargo-version Cargo.toml $(git describe --tags | cut -c 2-)
- name: Build DietPi-Dashboard
run: |
just ci ${{ matrix.job.target }} ${{ matrix.job.backend }}
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: dietpi-dashboard-aarch64-backend
path: src/backend/target/aarch64-unknown-linux-musl/release/dietpi-dashboard

name: dietpi-dashboard-${{ matrix.job.pretty }}
path: target/${{ matrix.job.target }}/release/dietpi-dashboard
16 changes: 7 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ dist/
dietpi-dashboard
.DS_Store
target/
src/backend/.cargo/
.cargo/

# Yarn
.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
frontend/.yarn/*
!frontend/.yarn/cache
!frontend/.yarn/patches
!frontend/.yarn/plugins
!frontend/.yarn/releases
!frontend/.yarn/versions
6 changes: 3 additions & 3 deletions .versionrc
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"packageFiles": [
{
"filename": "src/frontend/package.json",
"filename": "frontend/package.json",
"type": "json"
}
],
"bumpFiles": [
{
"filename": "src/frontend/package.json",
"filename": "frontend/package.json",
"type": "json"
},
{
"filename": "src/backend/Cargo.toml",
"filename": "Cargo.toml",
"updater": "standard-version-toml.js"
}
]
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [0.6.1](https://github.com/ravenclaw900/DietPi-Dashboard/compare/v0.6.0...v0.6.1) (2022-08-15)


### Features

* **backend:** make warp listen on both IPv4 and IPv6 ([#216](https://github.com/ravenclaw900/DietPi-Dashboard/issues/216)) ([8bcf1b2](https://github.com/ravenclaw900/DietPi-Dashboard/commit/8bcf1b25ed62930f2164e84f122dbc852f103242))
* **backend:** store files in binary as compressed ([#263](https://github.com/ravenclaw900/DietPi-Dashboard/issues/263)) ([cd80f5a](https://github.com/ravenclaw900/DietPi-Dashboard/commit/cd80f5a6b01856bbe6f361199ad07d1140e1f62d))
* **dashboard:** add CPU temperature ([#232](https://github.com/ravenclaw900/DietPi-Dashboard/issues/232)) ([6567d10](https://github.com/ravenclaw900/DietPi-Dashboard/commit/6567d10b2f88aca09c8292d85f479a397c3a5a1e))


### Bug Fixes

* **backend:** add error handling ([#247](https://github.com/ravenclaw900/DietPi-Dashboard/issues/247)) ([1acbd83](https://github.com/ravenclaw900/DietPi-Dashboard/commit/1acbd8303997517769249dc235585b4e7b7cf954))
* **backend:** quit socket_handler if there's a websocket error ([#312](https://github.com/ravenclaw900/DietPi-Dashboard/issues/312)) ([5bb4142](https://github.com/ravenclaw900/DietPi-Dashboard/commit/5bb41421f98170754c7f42ac512ba7ef258a6394))
* **backend:** remove useless `take` call when getting software ([711952e](https://github.com/ravenclaw900/DietPi-Dashboard/commit/711952e97260d0da7ae23d9f690673260265d94c))
* **backend:** replace blocking functions with async functions ([#270](https://github.com/ravenclaw900/DietPi-Dashboard/issues/270)) ([aa6e69f](https://github.com/ravenclaw900/DietPi-Dashboard/commit/aa6e69fcddb78af1a3b25bc9a08f8249447ca406))
* **dashboard:** fix error about cpu temp when changing nodes ([495fe5e](https://github.com/ravenclaw900/DietPi-Dashboard/commit/495fe5e48113613f957ba47693c32cf6d9b840f0))
* **dashboard:** fix typescript errors ([0c1934c](https://github.com/ravenclaw900/DietPi-Dashboard/commit/0c1934c2ccb88eed2c2286c6fac63c106e892488))
* **deps:** update rust crate serde to 1.0.140 ([#309](https://github.com/ravenclaw900/DietPi-Dashboard/issues/309)) ([0dc7565](https://github.com/ravenclaw900/DietPi-Dashboard/commit/0dc756501283f23d04f4947c0b61fd4b25f30fb5))
* **deps:** update rust crate tracing-subscriber to 0.3.15 ([#310](https://github.com/ravenclaw900/DietPi-Dashboard/issues/310)) ([79e8be4](https://github.com/ravenclaw900/DietPi-Dashboard/commit/79e8be473e97a2ad7bef2d12be8aa677d678ba57))
* **filebrowser:** fix "couldn't get parent of path" error ([7817b65](https://github.com/ravenclaw900/DietPi-Dashboard/commit/7817b655db767ff1f4cf9b91df253c389069287e))
* **filebrowser:** give file editor black background on dark mode without syntax highlighting ([07be869](https://github.com/ravenclaw900/DietPi-Dashboard/commit/07be869c97418e1c1a7fa42081438d6a8ac05d7f)), closes [#218](https://github.com/ravenclaw900/DietPi-Dashboard/issues/218)
* **frontend:** make websocket reconnect ([#325](https://github.com/ravenclaw900/DietPi-Dashboard/issues/325)) ([0db5fb0](https://github.com/ravenclaw900/DietPi-Dashboard/commit/0db5fb0a842e126a12a0f484c43fe58e819776d1))
* **services:** fix dashboard sometimes crashing when reloading services page ([657f5e9](https://github.com/ravenclaw900/DietPi-Dashboard/commit/657f5e964b55b482dd99402069d8df9239bd0d97))

## [0.6.0](https://github.com/ravenclaw900/DietPi-Dashboard/compare/v0.5.0...v0.6.0) (2022-04-08)


Expand Down

0 comments on commit 8dc58a1

Please sign in to comment.