]> git.ipfire.org Git - people/ms/strongswan.git/blame - .github/workflows/linux.yml
github: Remove build on Ubuntu Xenial (16.04)
[people/ms/strongswan.git] / .github / workflows / linux.yml
CommitLineData
de401e0e
TB
1name: Linux
2
3on: [push, pull_request]
4
5env:
6 # this test case does not actually test anything but tries to access system
7 # directories that might be inaccessible on build hosts
8 TESTS_CASES_EXCLUDE: sw_collector
9 TESTS_REDUCED_KEYLENGTHS: yes
10 CCACHE_BASEDIR: ${{ github.workspace }}
11 CCACHE_COMPRESS: true
12 CCACHE_MAXSIZE: 200M
13 OS_NAME: linux
14
15jobs:
8468b438
TB
16 pre-check:
17 runs-on: ubuntu-latest
18 outputs:
19 should_skip: ${{ steps.skip-check.outputs.should_skip }}
20 steps:
21 - id: skip-check
22 uses: fkirc/skip-duplicate-actions@master
23 with:
24 concurrent_skipping: 'same_content'
25
de401e0e 26 latest:
8468b438
TB
27 needs: pre-check
28 if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
de401e0e
TB
29 runs-on: ubuntu-latest
30 strategy:
31 matrix:
32 test: [ all, default, printf-builtin ]
33 compiler: [ gcc, clang ]
34 leak-detective: [ no, yes ]
35 monolithic: [ no, yes ]
36 exclude:
37 # leaks will show up whether we build monolithic or not
38 - leak-detective: yes
39 monolithic: yes
40 # monolithic builds don't affect the printf-hook implementation
41 - test: printf-builtin
42 monolithic: yes
43 include:
44 - test: apidoc
45 - test: coverage
46 - test: dist
de401e0e
TB
47 - test: nm-no-glib
48 - test: fuzzing
49 compiler: clang
50 monolithic: yes
51 env:
52 LEAK_DETECTIVE: ${{ matrix.leak-detective || 'no' }}
53 MONOLITHIC: ${{ matrix.monolithic || 'no' }}
54 CC: ${{ matrix.compiler || 'gcc' }}
55 TEST: ${{ matrix.test }}
56 steps:
57 - uses: actions/checkout@v2
58 - uses: actions/cache@v2
59 with:
60 path: ~/.ccache
61 # with regards to ccache, monolithic builds don't differ from regular
62 # builds and, similarly, builds with leak-detective only differ in two
63 # files (LD itself and library.c); but different tests build different
64 # dependencies, so different caches are needed
b4a34ff5 65 key: ccache-${{ runner.os }}-${{ env.CC }}-${{ matrix.test }}-${{ github.sha }}
de401e0e 66 restore-keys: |
de401e0e
TB
67 ccache-${{ runner.os }}-${{ env.CC }}-${{ matrix.test }}-
68 ccache-${{ runner.os }}-${{ env.CC }}-
69 - run: |
70 sudo apt-get install -qq ccache
71 echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
72 ccache -z
73 - uses: ./.github/actions/default
74 - run: ccache -s
75 - if: ${{ success() && matrix.test == 'coverage' }}
76 run: bash <(curl -s https://codecov.io/bash)
77 - if: ${{ failure() }}
78 uses: actions/upload-artifact@v2
79 with:
80 name: Logs ${{ github.job }}
81 path: config.log
82 retention-days: 5
83
84 crypto-plugins:
8468b438
TB
85 needs: pre-check
86 if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
de401e0e
TB
87 runs-on: ubuntu-latest
88 strategy:
89 matrix:
90 test: [ botan, wolfssl, openssl, gcrypt ]
91 leak-detective: [ no, yes ]
92 env:
93 LEAK_DETECTIVE: ${{ matrix.leak-detective || 'no' }}
94 TEST: ${{ matrix.test }}
95 steps:
96 - uses: actions/checkout@v2
97 - uses: actions/cache@v2
98 with:
99 path: ~/.ccache
b4a34ff5 100 key: ccache-${{ runner.os }}-${{ env.CC }}-${{ matrix.test }}-${{ github.sha }}
de401e0e 101 restore-keys: |
de401e0e
TB
102 ccache-${{ runner.os }}-${{ env.CC }}-${{ matrix.test }}-
103 ccache-${{ runner.os }}-${{ env.CC }}-
b4a34ff5 104 ccache-${{ runner.os }}-${{ env.CC }}-all-${{ github.sha }}
de401e0e
TB
105 ccache-${{ runner.os }}-${{ env.CC }}-all-
106 ccache-${{ runner.os }}-${{ env.CC }}-
107 - run: |
108 sudo apt-get install -qq ccache
109 echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
110 ccache -z
111 - uses: ./.github/actions/default
112 - run: ccache -s
113 - if: ${{ failure() }}
114 uses: actions/upload-artifact@v2
115 with:
116 name: Logs ${{ github.job }}
117 path: config.log
118 retention-days: 5
119
742e0f21
TB
120 bionic:
121 needs: pre-check
122 if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
123 runs-on: ubuntu-18.04
124 strategy:
125 matrix:
126 test: [ all ]
127 compiler: [ gcc, clang ]
128 include:
129 - test: nm
130 env:
131 LEAK_DETECTIVE: ${{ matrix.leak-detective || 'no' }}
132 CC: ${{ matrix.compiler || 'gcc' }}
133 TEST: ${{ matrix.test }}
134 UBUNTU_BIONIC: yes
135 steps:
136 - uses: actions/checkout@v2
137 - uses: actions/cache@v2
138 with:
139 path: ~/.ccache
b4a34ff5 140 key: ccache-bionic-${{ env.CC }}-${{ matrix.test }}-${{ github.sha }}
742e0f21 141 restore-keys: |
742e0f21
TB
142 ccache-bionic-${{ env.CC }}-${{ matrix.test }}-
143 ccache-bionic-${{ env.CC }}-
144 - run: |
145 sudo apt-get install -qq ccache
146 echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
147 ccache -z
148 - uses: ./.github/actions/default
149 - run: ccache -s
150 - if: ${{ failure() }}
151 uses: actions/upload-artifact@v2
152 with:
153 name: Logs ${{ github.job }}
154 path: config.log
155 retention-days: 5