-
Notifications
You must be signed in to change notification settings - Fork 5
138 lines (113 loc) · 3.23 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: Copyright © 2023 Erez Geva <ErezGeva2@gmail.com>
#
# @author Erez Geva <ErezGeva2@@gmail.com>
# @copyright © 2023 Erez Geva
#
# GitHub Continuous Integration script
# - Main Continuous Integration
# - Build cross packages on Debian
# - Build packages install them in system and
# test with linuxptp and clock simulated network
# to verify proper installation
# - compare ABI
###############################################################################
name: continuous integration
# On evry push and Pull Request (PR)
on: [push, pull_request, workflow_dispatch]
env:
USER: builder
jobs:
ci:
runs-on: ubuntu-24.04
strategy:
matrix:
names: [deb.trixie, deb.bookworm, rpmbuild, pacmanbuild, portage]
fail-fast: false
container:
image: ghcr.io/erezgeva/${{ matrix.names }}:latest
env:
GITHUB_CONTAINER: ${{ matrix.names }}
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: continuous integration
run: |
case "$GITHUB_CONTAINER" in
deb.*)
# Debian place the debian packages in the parent folder
chown -R $USER:$USER ..
;;
*)
chown -R $USER:$USER .
;;
esac
su $USER -c tools/ci.sh
cross:
runs-on: ubuntu-24.04
strategy:
matrix:
names: [deb.trixie, deb.bookworm]
fail-fast: false
container:
image: ghcr.io/erezgeva/${{ matrix.names }}:latest
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: cross build
run: |
chown -R $USER:$USER ..
su $USER -c tools/ci_cross.sh
pkgs:
runs-on: ubuntu-24.04
strategy:
matrix:
names: [deb.trixie, deb.bookworm, rpmbuild, pacmanbuild, portage]
fail-fast: false
container:
image: ghcr.io/erezgeva/${{ matrix.names }}:latest
env:
GITHUB_CONTAINER: ${{ matrix.names }}
steps:
- name: checkout linuxptp repository
uses: actions/checkout@v4
with:
repository: nwtime/linuxptp
path: linuxptp
- name: checkout repository
uses: actions/checkout@v4
with:
path: libptpmgmt
- name: build packages and install them
run: |
chown -R $USER:$USER .
su $USER -c libptpmgmt/tools/ci_build.sh
- name: build linuxptp
run: su $USER -c "make -C linuxptp"
- name: test with linuxptp
run: libptpmgmt/tools/ci_pkgs.sh
- name: test with linuxptp without the development package
if: ${{ matrix.names != 'portage' }}
run: libptpmgmt/tools/ci_pkgs_no_dev.sh
abi:
runs-on: ubuntu-24.04
container:
image: ghcr.io/erezgeva/deb.trixie:latest
steps:
- name: checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: compare ABI
run: |
chown -R $USER:$USER .
su $USER -c tools/ci_abi.sh
- name: save ABI compare report
uses: actions/upload-artifact@v4
with:
name: abi_report
retention-days: 90
path: compat_reports/
- name: Report ABI error
run: su $USER -c tools/ci_abi_err.sh