Skip to content

Commit

Permalink
ci: split build job into webpack and vite
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed May 3, 2024
1 parent 9602ad1 commit 134aa22
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 12 deletions.
38 changes: 32 additions & 6 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,43 @@ on:
branches: [ master ]

jobs:
build:
name: Build (node-${{ matrix.node-version }})
build-webpack:
name: Build webpack (node-${{ matrix.node-version }})
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20]
include:
- node-version: '20'

steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: npm ci
- name: Build
run: make build
- name: Upload build
uses: actions/upload-artifact@v3.1.2
with:
name: build-webpack
path: dist/*

build-vite:
name: Build vite (node-${{ matrix.node-version }})
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20]
python-version: ['3.9']
include:
- node-version: '20'
python-version: '3.9'

steps:
- uses: actions/checkout@v4
Expand All @@ -30,11 +56,11 @@ jobs:
- name: Install
run: npm ci
- name: Build
run: npm run build
run: make build-vite
- name: Upload build
uses: actions/upload-artifact@v3.1.2
with:
name: build
name: build-vite
path: dist/*

test:
Expand Down
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@ else
androidflag :=
endif

build: install static/logo.png static/logo.svg
prebuild: install static/logo.png static/logo.svg

build: prebuild
npm run build ${androidflag}

vite-build:
dev: prebuild
npm run serve ${androidflag}

build-vite: prebuild
npx vite build

vite-dev:
dev-vite: prebuild
npx vite

static/logo.%: media/logo/logo.%
Expand All @@ -30,9 +35,6 @@ install:
uninstall:
rm -r node_modules/

dev:
npm run serve ${androidflag}

test:
npm test

Expand Down

1 comment on commit 134aa22

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are screenshots of this commit:

Screenshots using aw-server v0.12.3b11 (click to expand)

Screenshots using aw-server-rust master (click to expand)

Screenshots using aw-server-rust v0.12.3b11 (click to expand)

Please sign in to comment.