46 lines
1.4 KiB
YAML
46 lines
1.4 KiB
YAML
# Gitea Actions (GitHub Actions compatible): tests + .deb packages for amd64, arm64 and armhf.
|
||
name: build
|
||
|
||
on:
|
||
push:
|
||
branches: [main, master]
|
||
tags: ["v*"]
|
||
pull_request:
|
||
|
||
jobs:
|
||
test:
|
||
runs-on: ubuntu-latest
|
||
container: rust:1-trixie
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
- run: apt-get update && apt-get install -y --no-install-recommends nodejs
|
||
- run: rustup component add rustfmt clippy
|
||
- run: ./dev.sh check
|
||
- run: cargo test --locked --all-targets
|
||
|
||
deb:
|
||
needs: test
|
||
runs-on: ubuntu-latest
|
||
container: rust:1-trixie
|
||
strategy:
|
||
matrix:
|
||
arch: [amd64, arm64, armhf]
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
- name: Cross-compilation tools
|
||
run: |
|
||
apt-get update && apt-get install -y --no-install-recommends python3-pip
|
||
pip3 install --break-system-packages ziglang
|
||
cargo install cargo-deb cargo-zigbuild --locked
|
||
rustup target add x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu armv7-unknown-linux-gnueabihf
|
||
- name: Build .deb
|
||
# the job already runs in a rust container – build directly (no Docker-in-Docker)
|
||
env:
|
||
BUILD_IN_DOCKER: "0"
|
||
BUILD_METHOD: zigbuild
|
||
run: scripts/build-deb.sh ${{ matrix.arch }}
|
||
- uses: actions/upload-artifact@v3
|
||
with:
|
||
name: simply-dvb-${{ matrix.arch }}
|
||
path: dist/*.deb
|