Skip to content

Commit

Permalink
ci: use matrix build
Browse files Browse the repository at this point in the history
  • Loading branch information
tinyzimmer committed Nov 5, 2023
1 parent 21947a6 commit 4ced1c2
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 35 deletions.
34 changes: 16 additions & 18 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,21 @@ on:

env:
WEBMESH_VERSION: main
CACHE_DEP_PATH: yarn.lock

jobs:
build:
name: Build
runs-on: ${{ vars.BUILD_PLATFORM == '' && 'ubuntu-latest' || vars.BUILD_PLATFORM }}
name: Build Package
strategy:
matrix:
target: [linux, mac, win]
include:
- target: linux
runner: ${{ vars.LINUX_BUILD_PLATFORM }}
- target: mac
runner: ${{ vars.MACOS_BUILD_PLATFORM }}
- target: win
runner: ${{ vars.WINDOWS_BUILD_PLATFORM }}
runs-on: ${{ matrix.runner }}
permissions:
contents: 'read'
id-token: 'write'
Expand All @@ -36,7 +45,7 @@ jobs:
with:
go-version: stable
check-latest: true
cache: ${{ !startswith(vars.BUILD_PLATFORM, 'self-hosted') }}
cache: ${{ !startswith(matrix.runner, 'self-hosted') }}
cache-dependency-path: webmesh/go.sum

- name: Setup Node
Expand All @@ -45,24 +54,13 @@ jobs:
check-latest: true
node-version-file: .nvmrc

- name: Install Wine on Hosted Ubuntu Runners
if: ${{ startswith(vars.BUILD_PLATFORM, 'ubuntu') }}
run: |
set -ex
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y wine64 wine32
- name: Install UPX on Hosted macOS Runners
if: ${{ startswith(vars.BUILD_PLATFORM, 'macos') }}
run: brew install upx

- name: Build Webmesh Daemon
- name: Build Webmesh Helper Daemon
if: ${{ matrix.target != 'linux' }}
env:
PARALLEL: 6
run: cd webmesh && make dist-webmeshd

- name: Build Electron App
env:
GH_TOKEN: ${{ github.token }}
run: yarn && yarn build:all
run: yarn && yarn build:${{ matrix.target }}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 0 additions & 17 deletions include/linux/webmeshd.service

This file was deleted.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"test": "echo \"No test specified\" && exit 0",
"dev": "quasar dev --mode electron",
"build": "rm -rf dist/ ; quasar build --modern --mode electron",
"build:win": "rm -rf dist/ ; quasar build --modern --mode electron --target win",
"build:mac": "rm -rf dist/ ; quasar build --modern --mode electron --target mac",
"build:linux": "rm -rf dist/ ; quasar build --modern --mode electron --target linux",
"build:all": "rm -rf dist/ ; quasar build --modern --mode electron --target all",
"clean": "rm -rf dist/ node_modules/ && yarn"
},
Expand Down

0 comments on commit 4ced1c2

Please sign in to comment.