try matrix

This commit is contained in:
kaedwen committed 2023-07-09 08:41:27 +02:00
1 parent 71226a8032
commit b61e6d1ac5
1 file changed
+28 -10
+28 -10
View File
@@ -15,7 +15,7 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel # A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs: jobs:
build: build-static:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: "debian:stable-slim" container: "debian:stable-slim"
steps: steps:
@@ -25,19 +25,37 @@ jobs:
node-version: 18 node-version: 18
cache-dependency-path: static cache-dependency-path: static
cache: npm cache: npm
- name: Build Frontend - run: npm --prefix static ci && npm --prefix static run build
run: npm --prefix static ci && npm --prefix static run build - uses: actions/upload-artifact@v3
with:
name: static
path: static/dist
build:
needs: build-static
runs-on: ubuntu-latest
container: "debian:stable-slim"
strategy:
matrix:
target:
- arch: amd64
deps: []
- arch: armhf
deps: gcc-arm-linux-gnueabihf libc6-dev-armhf-cross
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4 - uses: actions/setup-go@v4
with: with:
go-version: 'stable' go-version: 'stable'
- name: Prepare Backend - run: |
run: | dpkg --add-architecture ${{ matrix.target.arch }}
apt-get update apt-get update
apt-get install --yes --no-install-recommends make gcc libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev apt-get install --yes --no-install-recommends make gcc libgstreamer1.0-dev:${{ matrix.target.arch }} libgstreamer-plugins-base1.0-dev:${{ matrix.target.arch }} ${{ matrix.target.deps }}
- name: Build Backend - uses: actions/download-artifact@master
run: make build-static with:
- name: Archive artifacts name: static
uses: actions/upload-artifact@v3 path: static/dist
- run: make build-static
- uses: actions/upload-artifact@v3
with: with:
name: binary name: binary
path: service path: service