mirror of
https://git.proxmox.com/git/fwupd
synced 2026-01-06 20:32:40 +00:00
For some reason the Azure mirror is failing *again* with systemd. This doesn't seem to affect the Circle CI builds this time though.
111 lines
3.2 KiB
YAML
111 lines
3.2 KiB
YAML
name: Continuous Integration
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
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 --hook-stage commit --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: |
|
|
sudo ./contrib/ci/fwupd_setup_helpers.py install-dependencies -o ubuntu --yes
|
|
python3 -m pip install --user "meson >= 0.60.0"
|
|
- name: Check ABI
|
|
run: ./contrib/ci/check-abi $(git describe --abbrev=0 --tags) $(git rev-parse HEAD)
|
|
|
|
openbmc:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Refresh dependencies
|
|
run: sudo apt update
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo ./contrib/ci/fwupd_setup_helpers.py install-dependencies -o ubuntu --yes
|
|
python3 -m pip install --user "meson >= 0.60.0"
|
|
- name: Build
|
|
run: |
|
|
./contrib/build-openbmc.sh
|
|
ninja -C ..
|
|
|
|
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
|
|
|
|
macos:
|
|
strategy:
|
|
matrix:
|
|
os: [ macos-10.15, macos-11 ]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: install dependencies
|
|
run: brew install meson gcab libusb gobject-introspection sqlite libarchive json-glib curl gnutls protobuf-c vala
|
|
- uses: actions/checkout@v2
|
|
- name: configure
|
|
run: ./contrib/ci/build_macos.sh
|
|
- name: build
|
|
run: ninja -C build-macos
|
|
|
|
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@v3
|
|
if: failure() && steps.build.outcome == 'success'
|
|
with:
|
|
name: artifacts
|
|
path: ./out/artifacts
|
|
|