Skip to content

update pipeline

update pipeline #63

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-static:
runs-on: ubuntu-latest
container: "debian:stable-slim"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache-dependency-path: static
cache: npm
- run: |
apt-get update
apt-get install --yes --no-install-recommends make
- run: make build-static
- uses: actions/upload-artifact@v4
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
with:
go-version: 'stable'
- run: |
dpkg --add-architecture ${{ matrix.target.arch }}
apt-get update
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 }}
- uses: actions/download-artifact@master
with:
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
- uses: actions/upload-artifact@v4
with:
name: service-${{ matrix.target.os }}-${{ matrix.target.goarch }}
path: service
retention-days: 5