-
Notifications
You must be signed in to change notification settings - Fork 701
65 lines (54 loc) · 1.63 KB
/
autopkgtest.yaml
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
# SPDX-FileCopyrightText: 2021 Andrea Pappacoda <[email protected]>
#
# SPDX-License-Identifier: Apache-2.0
name: autopkgtest
on:
push:
paths-ignore: pistache.io/**
pull_request:
paths-ignore: pistache.io/**
# This ensures that jobs get canceled when force-pushing
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# The default Debian shell (dash) is faster than bash at running scripts,
# and using bash when it is not needed doesn't make sense.
defaults:
run:
shell: sh
jobs:
test:
runs-on: ubuntu-latest
container:
image: debian:testing
steps:
- name: Install dependencies
run: |
apt -y update
apt -y install autopkgtest dpkg-dev --no-install-recommends
- name: Checkout
uses: actions/checkout@v4
- name: Checkout Debian data
uses: actions/checkout@v4
with:
repository: pistacheio/pistache
ref: debian
path: debian
- name: Create .orig tarball
run: |
repo_name=$(echo ${{ github.repository }} | cut -d / -f 2)
debian_version=$(dpkg-parsechangelog --show-field Version | awk -F - 'sub(FS $NF,x)')
cd ..
tar --exclude-vcs --exclude=debian -cvzf pistache_"$debian_version".orig.tar.gz "$repo_name"
- name: Build Debian package source
run: dpkg-source --build .
- name: Run autopkgtest
run: |
exit_code=0
autopkgtest ../pistache_*.dsc -- null || exit_code=$?
if [ $exit_code -eq 16 ]
then
echo "::warning::autopkgtest failed, but it's not your fault"
else
exit $exit_code
fi