Skip to content

Commit

Permalink
chore: migrate to node 16 workspaces (#941)
Browse files Browse the repository at this point in the history
* chore: migrate to node 16 workspaces

* chore: remove private flag
  • Loading branch information
Jomik authored May 24, 2021
1 parent d2b2a9b commit 5e5682b
Show file tree
Hide file tree
Showing 11 changed files with 141 additions and 10,503 deletions.
96 changes: 47 additions & 49 deletions .github/workflows/manual_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,58 @@ name: Manual Build

on:
workflow_dispatch:

# Very similar to the release build.
# Feel free to merge those into a single yaml

jobs:
build-valetudo:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install
run: npm ci
- name: Build Valetudo armv7
run: npm run build -w backend
- name: Build Valetudo armv7 lowmem
run: npm run build_armv7_lowmem -w backend
- name: Build Valetudo aarch64
run: npm run build_aarch64 -w backend
- name: UPX-compress valetudo binaries
run: npm run upx

- uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install
run: npm ci
- name: Build Valetudo armv7
run: npm run build --workspace=backend
- name: Build Valetudo armv7 lowmem
run: npm run build_armv7_lowmem --workspace=backend
- name: Build Valetudo aarch64
run: npm run build_aarch64 --workspace=backend
- name: UPX-compress valetudo binaries
run: npm run upx

- name: Upload armv7 build
uses: actions/upload-artifact@v2
with:
name: valetudo-armv7
path: ./build/armv7/valetudo
- name: Upload armv7 lowmem build
uses: actions/upload-artifact@v2
with:
name: valetudo-armv7-lowmem
path: ./build/armv7/valetudo_lowmem
- name: Upload armv7 upx build
uses: actions/upload-artifact@v2
with:
name: valetudo-armv7.upx
path: ./build/armv7/valetudo.upx
- name: Upload armv7 lowmem upx build
uses: actions/upload-artifact@v2
with:
name: valetudo-armv7-lowmem.upx
path: ./build/armv7/valetudo_lowmem.upx
- name: Upload aarch64 build
uses: actions/upload-artifact@v2
with:
name: valetudo-aarch64
path: ./build/aarch64/valetudo
- name: Upload aarch64 upx build
uses: actions/upload-artifact@v2
with:
name: valetudo-aarch64.upx
path: ./build/aarch64/valetudo.upx

- name: Upload armv7 build
uses: actions/upload-artifact@v2
with:
name: valetudo-armv7
path: ./build/armv7/valetudo
- name: Upload armv7 lowmem build
uses: actions/upload-artifact@v2
with:
name: valetudo-armv7-lowmem
path: ./build/armv7/valetudo_lowmem
- name: Upload armv7 upx build
uses: actions/upload-artifact@v2
with:
name: valetudo-armv7.upx
path: ./build/armv7/valetudo.upx
- name: Upload armv7 lowmem upx build
uses: actions/upload-artifact@v2
with:
name: valetudo-armv7-lowmem.upx
path: ./build/armv7/valetudo_lowmem.upx
- name: Upload aarch64 build
uses: actions/upload-artifact@v2
with:
name: valetudo-aarch64
path: ./build/aarch64/valetudo
- name: Upload aarch64 upx build
uses: actions/upload-artifact@v2
with:
name: valetudo-aarch64.upx
path: ./build/aarch64/valetudo.upx
25 changes: 12 additions & 13 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,22 @@ on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run ts-check -w backend -w frontend
- run: npm run lint -w backend -w frontend
- run: npm run build -w backend
- run: npm test -w backend
env:
CI: true
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run ts-check --workspace={frontend,backend}
- run: npm run lint --workspace={frontend,backend}
- run: npm run build --workspace=backend
- run: npm test --workspace=backend
env:
CI: true
142 changes: 70 additions & 72 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,78 +10,76 @@ jobs:

strategy:
matrix:
node-version: [ 16.x ]
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: npm ci
- name: Build Valetudo armv7
run: npm run build -w backend
- name: Build Valetudo armv7 lowmem
run: npm run build_armv7_lowmem -w backend
- name: Build Valetudo aarch64
run: npm run build_aarch64 -w backend
- name: UPX-compress valetudo binaries
run: npm run upx


- name: Upload Valetudo armv7
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/armv7/valetudo
asset_name: valetudo-armv7
asset_content_type: binary/octet-stream
- name: Upload Valetudo armv7.upx
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/armv7/valetudo.upx
asset_name: valetudo-armv7.upx
asset_content_type: binary/octet-stream
- name: Upload Valetudo armv7 lowmem
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/armv7/valetudo_lowmem
asset_name: valetudo-armv7-lowmem
asset_content_type: binary/octet-stream
- name: Upload Valetudo armv7 lowmem.upx
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/armv7/valetudo_lowmem.upx
asset_name: valetudo-armv7-lowmem.upx
asset_content_type: binary/octet-stream
- name: Upload Valetudo aarch64
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/aarch64/valetudo
asset_name: valetudo-aarch64
asset_content_type: binary/octet-stream
- name: Upload Valetudo aarch64.upx
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/aarch64/valetudo.upx
asset_name: valetudo-aarch64.upx
asset_content_type: binary/octet-stream
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: npm ci
- name: Build Valetudo armv7
run: npm run build --workspace=backend
- name: Build Valetudo armv7 lowmem
run: npm run build_armv7_lowmem --workspace=backend
- name: Build Valetudo aarch64
run: npm run build_aarch64 --workspace=backend
- name: UPX-compress valetudo binaries
run: npm run upx

- name: Upload Valetudo armv7
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/armv7/valetudo
asset_name: valetudo-armv7
asset_content_type: binary/octet-stream
- name: Upload Valetudo armv7.upx
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/armv7/valetudo.upx
asset_name: valetudo-armv7.upx
asset_content_type: binary/octet-stream
- name: Upload Valetudo armv7 lowmem
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/armv7/valetudo_lowmem
asset_name: valetudo-armv7-lowmem
asset_content_type: binary/octet-stream
- name: Upload Valetudo armv7 lowmem.upx
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/armv7/valetudo_lowmem.upx
asset_name: valetudo-armv7-lowmem.upx
asset_content_type: binary/octet-stream
- name: Upload Valetudo aarch64
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/aarch64/valetudo
asset_name: valetudo-aarch64
asset_content_type: binary/octet-stream
- name: Upload Valetudo aarch64.upx
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/aarch64/valetudo.upx
asset_name: valetudo-aarch64.upx
asset_content_type: binary/octet-stream
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.1.0
v16.2.0
Empty file modified backend/index.js
100644 → 100755
Empty file.
Loading

0 comments on commit 5e5682b

Please sign in to comment.