forked from seccomp/libseccomp
-
Notifications
You must be signed in to change notification settings - Fork 1
117 lines (107 loc) · 3.72 KB
/
continuous-integration.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
#
# Continuous Integration Workflow for libseccomp
#
# Copyright (c) 2020 Oracle and/or its affiliates.
# Author: Tom Hromatka <[email protected]>
#
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of version 2.1 of the GNU Lesser General Public License as
# published by the Free Software Foundation.
#
# This library is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
# for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this library; if not, see <http://www.gnu.org/licenses>.
#
name: Continuous Integration
on: ["push", "pull_request"]
jobs:
runtests:
runs-on: ubuntu-20.04
name: ${{ matrix.distro }} ${{ matrix.arch }}
# See here for more information:
# https://github.com/marketplace/actions/run-on-architecture#supported-platforms
strategy:
matrix:
include:
- arch: aarch64
distro: ubuntu20.04
- arch: ppc64le
distro: ubuntu20.04
#- arch: amd64
# distro: ubuntu20.04
- arch: aarch64
distro: fedora_latest
steps:
# cython is installed to the following path
- run: echo "/home/runner/.local/bin" >> $GITHUB_PATH
- uses: actions/checkout@v2
- uses: uraimo/[email protected]
name: Build and run tests on ${{ matrix.distro }} on ${{ matrix.arch }}
id: run-tests
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
shell: /bin/sh
# Not required, but speeds up builds
githubToken: ${{ github.token }}
install: |
case "${{ matrix.distro }}" in
ubuntu*|jessie|stretch|buster)
apt-get update -q -y
apt-get install -q -y build-essential valgrind clang lcov gperf astyle codespell
;;
fedora*)
cat /etc/fedora-release
dnf -y update
dnf -y install build-essential valgrind clang lcov gperf astyle codespell
;;
alpine*)
apk update
apk add build-essential valgrind clang lcov gperf astyle codespell
;;
esac
run: |
./autogen.sh
./configure --enable-python
make check-build
make check
# - run: |
# case "${{ matrix.distro }}" in
# ubuntu*|jessie|stretch|buster)
# sudo apt-get update -q -y
# sudo apt-get install -q -y build-essential valgrind clang lcov gperf astyle codespell
# ;;
# fedora*)
# cat /etc/fedora-release
# sudo dnf -y update
# sudo dnf -y install build-essential valgrind clang lcov gperf astyle codespell
# ;;
# alpine*)
# sudo apk update
# sudo apk add build-essential valgrind clang lcov gperf astyle codespell
# ;;
# esac
# - run: |
# python -m pip install --upgrade pip
# pip install cython
# # cython is installed to the following path
# - run: echo "/home/runner/.local/bin" >> $GITHUB_PATH
# - uses: actions/checkout@v2
# - run: ./autogen.sh
# - run: ./configure --enable-python
# - run: make check-build
# - name: Automated tests
# run: LIBSECCOMP_TSTCFG_STRESSCNT=5 make check
# - name: Live tests
# run: LIBSECCOMP_TSTCFG_TYPE=live LIBSECCOMP_TSTCFG_MODE_LIST=c make -C tests check
# - name: Scan build
# if: ${{ matrix.arch }} == "amd64"
# run: |
# make clean
# ./configure
# scan-build --status-bugs make