forked from fwupd/fwupd
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (75 loc) · 2.24 KB
/
main.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
name: Continuous Integration
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
pre-commit:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Refresh dependencies
run: sudo apt update
- name: Install dependencies
run: sudo apt install shellcheck clang-format -y
- name: Run pre-commit hooks
run: |
./contrib/setup
source venv/bin/activate
sed -i "/no-commit-to-branch/,+1d" .pre-commit-config.yaml
pre-commit run --all-files
abi:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Refresh dependencies
run: sudo apt update
- name: Install dependencies
run: ./contrib/ci/generate_dependencies.py | sudo xargs apt install -y
- name: Check ABI
run: ./contrib/ci/check-abi $(git describe --abbrev=0 --tags) $(git rev-parse HEAD)
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [fedora, debian-x86_64, arch, debian-i386, void]
steps:
- uses: actions/checkout@v2
- name: Docker login
run: docker login docker.pkg.github.com -u $GITHUB_ACTOR -p $GITHUB_TOKEN
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Build in container
env:
CI_NETWORK: true
CI: true
run: |
echo $GITHUB_WORKSPACE
docker run --privileged -e CI=true -t -v $GITHUB_WORKSPACE:/github/workspace docker.pkg.github.com/fwupd/fwupd/fwupd-${{matrix.os}}:latest
fuzzing:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'fwupd'
dry-run: false
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'fwupd'
fuzz-seconds: 300
dry-run: false
- name: Upload Crash
uses: actions/upload-artifact@v1
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
path: ./out/artifacts