2 files changed
+48
-13
No files matched your search
+46
-11
@@ -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,20 +25,55 @@ 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:
|
||||||
|
- os: linux
|
||||||
|
arch: amd64
|
||||||
|
goarch: amd64
|
||||||
|
deps: gcc
|
||||||
|
prefix: ''
|
||||||
|
- os: linux
|
||||||
|
arch: armhf
|
||||||
|
goarch: arm
|
||||||
|
deps: gcc-arm-linux-gnueabihf libc6-dev-armhf-cross
|
||||||
|
prefix: arm-linux-gnueabihf
|
||||||
|
- os: linux
|
||||||
|
arch: arm64
|
||||||
|
goarch: arm64
|
||||||
|
deps: gcc-aarch64-linux-gnu libc6-dev-arm64-cross
|
||||||
|
prefix: aarch64-linux-gnu
|
||||||
|
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 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
|
|
||||||
- name: Archive artifacts
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
with:
|
||||||
name: binary
|
name: static
|
||||||
|
path: static/dist
|
||||||
|
- run: |
|
||||||
|
PREFIX="${{ matrix.target.prefix }}"
|
||||||
|
echo "GOOS=${{ matrix.target.os }}" >> $GITHUB_ENV
|
||||||
|
echo "GOARCH=${{ matrix.target.goarch }}" >> $GITHUB_ENV
|
||||||
|
echo "PKG_CONFIG_PATH=/usr/lib/${{ matrix.target.prefix }}/pkgconfig" >> $GITHUB_ENV
|
||||||
|
echo "CC=${PREFIX:+$PREFIX-}gcc" >> $GITHUB_ENV
|
||||||
|
- run: make build-static
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: service-${{ matrix.target.os }}-${{ matrix.target.goarch }}
|
||||||
path: service
|
path: service
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
Reference in new issue
Block a user