-
Notifications
You must be signed in to change notification settings - Fork 38
81 lines (68 loc) · 2.08 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# vim: sw=2
on:
push:
pull_request:
release:
types: [published]
check_suite:
types: [rerequested]
jobs:
test:
runs-on: ubuntu-20.04
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v3
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install -y eatmydata
sudo eatmydata apt-get install -y --no-install-suggests --no-install-recommends build-essential devscripts equivs
mk-build-deps -irs sudo -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y"
- name: Build
run: |
make -j$(nproc)
- name: Clean
run: |
make clean
- name: Build (package)
run: |
dch -l+`git rev-parse --short HEAD` "actions package build"
debuild -b
test-package:
strategy:
matrix:
os: ["buster", "bullseye", "testing", "unstable"]
cpu: ["i386", "amd64", "armhf", "aarch64"]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install tools for dch update
run: |
sudo apt-get update
sudo apt install -y --no-install-suggests --no-install-recommends devscripts
- name: Update debian changelog
env:
OS_RELEASE: ${{ matrix.os }}
run: |
git checkout HEAD -- debian/changelog
git fetch --tags https://github.com/LinuxCNC/mesaflash
ref=`git describe --tags --always | sed -e 's/^release\///;s/^v//;s/-/+/g'`
DEBEMAIL=noreply@github.com dch -v "${ref}+${OS_RELEASE}-1" "Build from github actions"
head debian/changelog
- name: Build Debian package
uses: dawidd6/action-debian-package@v1
with:
source_directory: .
artifacts_directory: output
os_distribution: ${{ matrix.os }}
cpu_architecture: ${{ matrix.cpu }}
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
path: output
name: debs-${{ matrix.os }}-${{ matrix.cpu }}