From 44d6954a2c2a27e19f2488ada7c8e79da56385e2 Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Sun, 24 Sep 2023 13:54:12 -0700 Subject: [PATCH] feat(actions): init actions --- .github/workflows/build.yml | 47 +++++++++++++++++++++++++++++++++++++ backend/src/request_data.rs | 6 ++--- package.json | 3 ++- 3 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e1cf6ac --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,47 @@ +name: Build + +on: + push: + paths: + - '.github/workflows/build.yml' + - 'package.json' + - 'backend/**/*' + - 'frontend/**/*' + pull_request: + paths: + - '.github/workflows/build.yml' + - 'package.json' + - 'backend/**/*' + - 'frontend/**/*' + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + +jobs: + build: + runs-on: ${{ matrix.platform }} + + strategy: + fail-fast: false + matrix: + platform: [windows-latest, ubuntu-latest, macos-latest] + + steps: + - uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + + - uses: actions/checkout@v2 + + - name: Install dependencies + run: cd frontend && bun install + + - name: Build + run: cd .. && bun run build + + - name: Upload + uses: actions/upload-artifact@v2 + with: + name: procchi + path: backend/target/release/{procchi,procchi.exe} \ No newline at end of file diff --git a/backend/src/request_data.rs b/backend/src/request_data.rs index 69d271a..0c41ac5 100644 --- a/backend/src/request_data.rs +++ b/backend/src/request_data.rs @@ -1,5 +1,5 @@ -pub struct MemoryHistoryRequest {} +pub struct _MemoryHistoryRequest {} -pub struct CPUHistoryRequest {} +pub struct _CPUHistoryRequest {} -pub struct NetworkHistoryRequest {} \ No newline at end of file +pub struct _NetworkHistoryRequest {} \ No newline at end of file diff --git a/package.json b/package.json index b079f02..4fee9db 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "procchi", "scripts": { - "start": "cd ./frontend && bun run build && cd ../backend && cargo run -- -u test -k test" + "start": "cd ./frontend && bun run build && cd ../backend && cargo run -- -u test -k test", + "build": "cd ./frontend && bun run build && cd ../backend && cargo build --release" } } \ No newline at end of file