mirror of
https://git.proxmox.com/git/fwupd
synced 2026-03-27 12:15:28 +00:00
113 lines
3.3 KiB
YAML
113 lines
3.3 KiB
YAML
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
|
|
|
|
build-freebsd:
|
|
runs-on: macos-latest
|
|
name: build-freebsd-package
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Find tag
|
|
id: tagger
|
|
uses: jimschubert/query-tag-action@v1
|
|
- name: Build
|
|
id: test
|
|
uses: vmactions/freebsd-vm@v0.1.4
|
|
with:
|
|
usesh: true
|
|
mem: 8192
|
|
prepare: |
|
|
pkg install -y git python3 glib meson pkgconf gobject-introspection \
|
|
vala gtk-doc json-glib gpgme gnutls sqlite3 curl gcab libarchive \
|
|
libelf libgpg-error gettext-tools gtk-update-icon-cache atk pango \
|
|
binutils gcc
|
|
sync: rsync
|
|
run: ./contrib/ci/build_freebsd_package.sh
|
|
--GITHUB_SHA=${GITHUB_SHA}
|
|
--GITHUB_REPOSITORY_OWNER=${GITHUB_REPOSITORY_OWNER}
|
|
--GITHUB_REPOSITORY=${GITHUB_REPOSITORY}
|
|
--GITHUB_TAG=${{steps.tagger.outputs.tag}}
|
|
- name: Upload fwupd binary artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Binary package
|
|
path: |
|
|
fwupd*.txz
|
|
|