CI / build-static (push) Successful in 2m3s
CI / build (map[arch:amd64 deps:gcc goarch:amd64 os:linux prefix:]) (push) Successful in 5m52s
CI / build (map[arch:arm64 deps:gcc-aarch64-linux-gnu libc6-dev-arm64-cross goarch:arm64 os:linux prefix:aarch64-linux-gnu]) (push) Successful in 4m33s
CI / build (map[arch:armhf deps:gcc-arm-linux-gnueabihf libc6-dev-armhf-cross goarch:arm os:linux prefix:arm-linux-gnueabihf]) (push) Successful in 5m11s
Signed-off-by: kaedwen <kaedwen@heinrich.blue>
77 lines
2.4 KiB
YAML
77 lines
2.4 KiB
YAML
# 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: "node:lts-slim"
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: |
|
|
apt-get update
|
|
apt-get install --yes --no-install-recommends make
|
|
- run: make build-static
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: static
|
|
path: static/dist
|
|
build:
|
|
needs: build-static
|
|
runs-on: ubuntu-latest
|
|
container: "node:lts-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@v4
|
|
- 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@v3
|
|
with:
|
|
name: service-${{ matrix.target.os }}-${{ matrix.target.goarch }}
|
|
path: service
|
|
retention-days: 5 |