-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #195 from evelikov/ci
Remove .in files, enable more warnings, add build/codeql CI
- Loading branch information
Showing
23 changed files
with
325 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: 'setup Alpine' | ||
description: 'Setup an Alpine container for running CI' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Install dependencies | ||
shell: sh | ||
run: | | ||
apk update | ||
apk add \ | ||
build-base \ | ||
eudev-dev \ | ||
git \ | ||
libusb-dev \ | ||
linux-headers \ | ||
meson |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: 'setup Archlinux' | ||
description: 'Setup an Archlinux container for running CI' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
# Enable multilib, for building 32bit binaries | ||
echo -e '[multilib]\nInclude = /etc/pacman.d/mirrorlist' >> /etc/pacman.conf | ||
# Semi-regularly the packager key may have (temporarily) expired. | ||
# Somewhat robust solution is to wipe the local keyring and | ||
# regenerate/reinstall it prior to any other packages on the system. | ||
rm -rf /etc/pacman.d/gnupg | ||
pacman-key --init | ||
pacman-key --populate | ||
pacman --noconfirm -Sy archlinux-keyring | ||
pacman --noconfirm -Su \ | ||
base-devel \ | ||
git \ | ||
lib32-libusb \ | ||
lib32-systemd \ | ||
libusb \ | ||
linux-headers \ | ||
multilib-devel \ | ||
meson \ | ||
systemd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: 'setup Debian' | ||
description: 'Setup a Debian container for running CI' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
dpkg --add-architecture i386 | ||
apt-get update | ||
apt-get install --yes \ | ||
build-essential \ | ||
crossbuild-essential-i386 \ | ||
gcc \ | ||
git \ | ||
libudev-dev \ | ||
libudev-dev:i386 \ | ||
libusb-1.0-0-dev \ | ||
libusb-1.0-0-dev:i386 \ | ||
linux-libc-dev \ | ||
meson \ | ||
pkgconf \ | ||
pkgconf:i386 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: 'setup Fedora' | ||
description: 'Setup a Fedora container for running CI' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
dnf update -y | ||
dnf install -y \ | ||
gcc \ | ||
git \ | ||
kernel-devel \ | ||
libudev-devel \ | ||
libusb1-devel \ | ||
meson |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: 'setup Ubuntu' | ||
description: 'Setup an Ubuntu container for running CI' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
dpkg --add-architecture i386 | ||
apt-get update | ||
apt-get install --yes \ | ||
build-essential \ | ||
crossbuild-essential-i386 \ | ||
gcc \ | ||
git \ | ||
libudev-dev \ | ||
libudev-dev:i386 \ | ||
libusb-1.0-0-dev \ | ||
libusb-1.0-0-dev:i386 \ | ||
linux-libc-dev \ | ||
meson \ | ||
pkgconf \ | ||
pkgconf:i386 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[binaries] | ||
c = ['gcc', '-m32'] | ||
pkgconfig = 'i686-pc-linux-gnu-pkg-config' | ||
|
||
[host_machine] | ||
system = 'linux' | ||
cpu_family = 'x86' | ||
cpu = 'i686' | ||
endian = 'little' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[binaries] | ||
c = 'i686-linux-gnu-gcc' | ||
pkgconfig = 'i686-linux-gnu-pkg-config' | ||
|
||
[host_machine] | ||
system = 'linux' | ||
cpu_family = 'x86' | ||
cpu = 'i686' | ||
endian = 'little' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[binaries] | ||
c = 'i686-linux-gnu-gcc' | ||
pkgconfig = 'i686-linux-gnu-pkg-config' | ||
|
||
[host_machine] | ||
system = 'linux' | ||
cpu_family = 'x86' | ||
cpu = 'i686' | ||
endian = 'little' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
commit-message: | ||
prefix: "ci" | ||
groups: | ||
all-actions: | ||
patterns: | ||
- "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: CodeQL | ||
|
||
on: | ||
push: | ||
branches: [master, ci-test] | ||
pull_request: | ||
branches: [master] | ||
schedule: | ||
- cron: "30 2 * * 0" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- container: 'ubuntu:24.04' | ||
|
||
container: | ||
image: ${{ matrix.container }} | ||
|
||
steps: | ||
- name: Sparse checkout the local actions | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
with: | ||
sparse-checkout: .github | ||
|
||
- uses: ./.github/actions/setup-ubuntu | ||
if: ${{ startsWith(matrix.container, 'ubuntu') }} | ||
|
||
- name: Checkout the whole project | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Set the environment | ||
run: | | ||
# The second checkout above claims to set safe.directory, yet it | ||
# doesn't quite work. Perhaps our double/sparse checkout is to blame? | ||
git config --global --add safe.directory '*' | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@8214744c546c1e5c8f03dde8fab3a7353211988d # v3.26.7 | ||
with: | ||
languages: cpp | ||
queries: +security-and-quality | ||
|
||
- name: Build | ||
run: | | ||
mkdir build && cd build | ||
meson setup --native-file ../build-dev.ini . .. | ||
meson compile | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@8214744c546c1e5c8f03dde8fab3a7353211988d # v3.26.7 | ||
with: | ||
category: "/language:cpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Build and Test | ||
|
||
on: | ||
push: | ||
branches: [master, ci-test] | ||
pull_request: | ||
branches: [master] | ||
schedule: | ||
- cron: "30 2 * * 0" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- container: 'alpine:latest' | ||
- container: 'archlinux:base-devel' | ||
crossfile: 'arch-cross.ini' | ||
- container: 'debian:unstable' | ||
crossfile: 'debian-cross.ini' | ||
- container: 'fedora:latest' | ||
- container: 'ubuntu:24.04' | ||
crossfile: 'ubuntu-cross.ini' | ||
|
||
container: | ||
image: ${{ matrix.container }} | ||
|
||
steps: | ||
- name: Sparse checkout the local actions | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
with: | ||
sparse-checkout: .github | ||
|
||
- uses: ./.github/actions/setup-alpine | ||
if: ${{ startsWith(matrix.container, 'alpine') }} | ||
- uses: ./.github/actions/setup-archlinux | ||
if: ${{ startsWith(matrix.container, 'archlinux') }} | ||
- uses: ./.github/actions/setup-debian | ||
if: ${{ startsWith(matrix.container, 'debian') }} | ||
- uses: ./.github/actions/setup-fedora | ||
if: ${{ startsWith(matrix.container, 'fedora') }} | ||
- uses: ./.github/actions/setup-ubuntu | ||
if: ${{ startsWith(matrix.container, 'ubuntu') }} | ||
|
||
- name: Checkout the whole project | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Set the environment | ||
run: | | ||
# The second checkout above claims to set safe.directory, yet it | ||
# doesn't quite work. Perhaps our double/sparse checkout is to blame? | ||
git config --global --add safe.directory '*' | ||
- name: configure | ||
run: | | ||
mkdir build && cd build | ||
meson setup --native-file ../build-dev.ini . .. | ||
- name: build | ||
run: meson compile -C build | ||
|
||
- name: install | ||
run: meson install -C build --destdir $PWD/inst | ||
|
||
- name: distcheck | ||
run: meson dist -C build | ||
|
||
- name: configure (32bit) | ||
if: ${{ matrix.crossfile != '' }} | ||
run: | | ||
cp .github/cross-files/${{ matrix.crossfile }} cross.ini | ||
mkdir build32 && cd build32 | ||
meson setup --native-file ../build-dev.ini --cross-file ../cross.ini . .. | ||
- name: build (32bit) | ||
if: ${{ matrix.crossfile != '' }} | ||
run: meson compile -C build32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,7 @@ | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
# Copyright (c) 2014-2021 Greg Kroah-Hartman <[email protected]> | ||
# Copyright (c) 2009 Greg Kroah-Hartman <[email protected]> | ||
*.o | ||
|
||
*~ | ||
*.swp | ||
.deps/ | ||
Makefile | ||
Makefile.in | ||
config.h | ||
config.h.in | ||
config.log | ||
config.status | ||
configure | ||
stamp-h1 | ||
aclocal.m4 | ||
autom4te.cache/ | ||
depcomp | ||
install-sh | ||
missing | ||
compile | ||
lsusb | ||
lsusb.py | ||
lsusb.8 | ||
usb-devices.1 | ||
usbreset | ||
usbhid-dump.8 | ||
*.gz | ||
*.bz2 | ||
build* |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[project options] | ||
werror = true | ||
|
||
[built-in options] | ||
buildtype = 'debugoptimized' |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.