forked from USBGuard/usbguard
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (50 loc) · 1.99 KB
/
docker.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
##
## Copyright (c) 2022 Sebastian Pipping <[email protected]>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program 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 General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
name: Build on non-Ubuntu Linux using Docker
on:
push:
pull_request:
schedule:
- cron: '0 4 * * 5' # Every Friday at 4am
# Drop permissions to minimum for security
permissions:
contents: read
jobs:
build_docker:
strategy:
fail-fast: false
matrix:
linux_distro:
- Alpine Linux 3.20 # with musl
- CentOS 8.2 # with GCC 8.5.0
- Debian Buster with GCC 9.2 # stock buster has GCC 8.3
- Ubuntu 22.04 # because super popular
- openSUSE Tumbleweed # because GCC 13+
name: Build on ${{ matrix.linux_distro }} using Docker
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Build on ${{ matrix.linux_distro }} using Docker
run: |
set -x
# Create tarballs used by Dockerfile
git submodule update --init
git archive -o usbguard.tar HEAD
( cd src/ThirdParty/PEGTL/ && git archive -o ../../../pegtl.tar HEAD )
( cd src/ThirdParty/Catch/ && git archive -o ../../../catch.tar HEAD )
# Build using Docker
linux_distro="$(tr '[:upper:]' '[:lower:]' <<<"${{ matrix.linux_distro }}" | sed 's,[ .],_,g')"
docker build -f scripts/docker/build_on_"${linux_distro}".Dockerfile .