Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: 'Build Meson Project'
description: 'Configure, build and install meson projects'

inputs:
coverage:
description: 'Whether to enable coverage tracking for the build'
default: 'false'
options:
description: 'Comma-separated list of build options'
default: ''
prefix:
description: 'Installation prefix'
default: ${{ github.workspace }}/opt
pkgconfig-prefix:
description: 'Prefix of the PKG_CONFIG_PATH'
default: ''
build-path:
description: >
Path to the project's build directory
default: 'build'
source-path:
description: >
Path to the project's source directory
default: '.'
build-type:
description: 'Type of the build'
default: 'plain'
build:
description: 'Whether to build the project'
default: ''
install:
description: >
Whether to install the project. If "true", the project will first be
built.
default: 'false'
dist:
description: 'Whether to generate distribution artifacts for the project'
default: 'false'
subprojects:
description: >
Whether to include subprojects (when "install" or "dist" are "true")
default: 'true'
dist-tests:
description: 'Whether to run project tests (when "dist" is "true")'
default: 'false'
install-deb:
description: 'Whether to install generated .deb artifacts'
default: 'false'

outputs:
dist-path:
value: ${{ steps.dist.outputs.dist-path }}

runs:
using: 'composite'
steps:
- name: Build project
working-directory: ${{ inputs.source-path }}
if: >-
(inputs.build == '' && inputs.dist == 'false') ||
inputs.build == 'true' ||
inputs.install == 'true'
run: make
shell: bash
30 changes: 30 additions & 0 deletions .github/actions/run-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 'Run Tests'
description: 'Run project tests and generate coverage report'

inputs:
build-path:
description: >
Path to the project's build directory
default: 'build'
source-path:
description: >
Path to the project's source directory
default: '.'
valgrind:
description: 'Whether to run the tests with valgrind'
default: 'false'
coverage:
description: 'Whether to generate a coverage report'
default: 'false'
gcov:
description: 'Gcov executable to use'
required: false

runs:
using: 'composite'
steps:
- name: Run tests
id: run-tests
working-directory: ${{ inputs.source-path }}
run: go test ./... -v
shell: bash
25 changes: 23 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
directories:
- "**/*"
schedule:
interval: "daily"
interval: "monthly"
groups:
gomod:
patterns:
- "*"
commit-message:
prefix: "build(deps)"

- package-ecosystem: "github-actions"
directories:
- "/"
# Workaround for https://github.com/dependabot/dependabot-core/issues/6345
- "/.github/actions/*"
schedule:
interval: "monthly"
groups:
github-actions:
patterns:
- "*"
commit-message:
prefix: "ci(deps)"
37 changes: 37 additions & 0 deletions .github/linters/licenserc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
header:
license:
spdx-id: Apache-2.0-short
content: |
SPDX-License-Identifier: Apache-2.0

pattern: |
Licensed under the Apache License, Version 2.0 \(the "License"\);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

paths-ignore:
- '**/.*'
- '**/*.md'
- '**/*.txt'
- '**/*.build'
- '**/*.pc.in'
- '**/*.toml'
- '.github'
- 'LICENSE'
- 'NOTICE'
- 'third-party'
- 'build*'
- 'bin'
- 'Makefile'
- 'go.mod'
- 'go.sum'

comment: on-failure
1 change: 1 addition & 0 deletions .github/linters/os-packages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["pkgconf"]
58 changes: 0 additions & 58 deletions .github/workflows/build.yml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/lint.yml

This file was deleted.

86 changes: 86 additions & 0 deletions .github/workflows/pr-build-and-verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Build and Verify

on:
pull_request:
branches: ["main"]
types: [synchronize, labeled]

workflow_dispatch:

concurrency:
group: >-
${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions: read-all

jobs:
check-pr-status:
name: Check PR status
uses: nubificus/vaccel/.github/workflows/check-pr-status.yml@main
secrets: inherit

test-build:
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
needs: check-pr-status
name: Test Build
if: needs.check-pr-status.outputs.expects-checks == 'true'
uses: nubificus/vaccel/.github/workflows/test-build.yml@main
with:
options: ''
valgrind: false
secrets: inherit

# verify-build:
# needs: check-pr-status
# name: Verify Build
# if: needs.check-pr-status.outputs.expects-checks == 'true'
# uses: nubificus/vaccel/.github/workflows/verify-build.yml@main
# with:
# options: ''
# valgrind: false
# skip-examples: true
# secrets: inherit

validate-files-and-commits:
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
needs: check-pr-status
name: Validate Files and Commits
if: needs.check-pr-status.outputs.expects-checks == 'true'
uses: nubificus/vaccel/.github/workflows/validate-files-and-commits.yml@main
secrets: inherit

validate-code:
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
needs: check-pr-status
name: Validate Code
if: needs.check-pr-status.outputs.expects-checks == 'true'
uses: ./.github/workflows/validate-code.yml
secrets: inherit

# generate-coverage:
# needs:
# - check-pr-status
# - test-build
# - verify-build
# - validate-files-and-commits
# - validate-code
# name: Generate Coverage Report
# uses: ./.github/workflows/coverage-report.yml
# with:
# comment-diff: true

# Dummy job for setting required checks
jobs-completed:
needs:
- check-pr-status
- test-build
- validate-files-and-commits
- validate-code
name: Jobs Completed
if: >-
always() &&
(needs.check-pr-status.outputs.is-approved == 'true' ||
(needs.check-pr-status.outputs.expects-checks == 'true' &&
!contains(needs.*.result, 'failure') &&
!contains(needs.*.result, 'cancelled')))
runs-on: base-2204-amd64
steps:
- run: exit 0
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Loading
Loading