-
Notifications
You must be signed in to change notification settings - Fork 31
97 lines (93 loc) · 2.71 KB
/
deb-debian.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: deb packaging Debian
on:
push:
branches: [ "master", "devel", "citest", "citest-deb" ]
tags:
- '**'
pull_request:
branches: [ "master", "devel" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
image: [11, stable]
container:
image: debian:${{ matrix.image }}
steps:
- uses: actions/checkout@v4
- name: install prereq.
run:
apt-get update &&
apt-get install -y check devscripts debhelper pkg-config
- name: debuild
run: util/deb_build.sh
- name: list packages
run: ls ..
# https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
- name: copy artifacts
run: |
mkdir -v artifacts
mv -v ../*.deb ../*.gz ../*.xz artifacts/
# https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions
#- name: set env
# run: echo "ADFLIB_TAG=${GITHUB_REF#refs/*/}" | tr / _ >> $GITHUB_ENV
#- name: Test
# run: |
# echo $ADFLIB_TAG
# echo ${{ env.ADFLIB_TAG }}
- uses: actions/upload-artifact@v4
with:
# name: adflib-${{ env.ADFLIB_TAG }}-deb-debian
name: adflib-debian-${{ matrix.image }}
path: |
artifacts/
- name: archive examples/tests
run: |
mkdir -v artifact-tests
tar cvzf artifact-tests/examples_tests.tgz examples/tests/
- uses: actions/upload-artifact@v4
with:
name: adflib-examples-tests-${{ matrix.image }}
path: |
artifact-tests
test:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
image: [11, stable]
container:
image: debian:${{ matrix.image }}
steps:
- uses: actions/download-artifact@v4
with:
# name: adflib-${{ env.ADFLIB_TAG }}-deb-debian
name: adflib-debian-${{ matrix.image }}
path: .
- name: list packages extracted from the artifact
run: ls -l
- name: install packages
run:
apt-get update &&
for DEB in `ls *.deb` ;
do
echo ${PWD}/$DEB ;
done |
xargs apt-get install -y
- name: check installation
run:
dpkg -l 'libadf*' ;
dpkg -l 'libadf*' | grep "libadf" |
cut -d' ' -f 3 | cut -d':' -f 1 | xargs dpkg -L
- uses: actions/download-artifact@v4
with:
# name: adflib-${{ env.ADFLIB_TAG }}-deb-debian
name: adflib-examples-tests-${{ matrix.image }}
path: .
- name: extract examples/tests
run: tar xvzf examples_tests.tgz
- name: test installed command-line utils
run: |
./examples/tests/test_examples_basic.sh /usr/bin
./examples/tests/test-all-examples.sh /usr/bin