forked from drath/libratbag
CircleCI is limiting how many runs we can do, which results in pipelines randomly failing when we've used up the credits for this month. Let's add a github workflow instead. Unfortunately github workflows are a bit of a toy api, no support for YAML anchors or extending other jobs, so there's a lot of duplication needed to get a job to do something. The actions added in this patch help a bit to make the jobs easier to understand (copied from libwacom). This only runs on Ubuntu right now. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
40 lines
1.3 KiB
YAML
40 lines
1.3 KiB
YAML
# A Github Action to build a repository with meson
|
|
name: "Setup and run meson"
|
|
description: "Setup and run meson"
|
|
inputs:
|
|
builddir:
|
|
description: "The build directory"
|
|
default: "builddir"
|
|
srcdir:
|
|
description: "The source directory"
|
|
default: "."
|
|
meson_args:
|
|
description: "Arguments passed to meson setup"
|
|
default: ""
|
|
meson_skip_test:
|
|
description: "Set to a nonempty string to skip meson test"
|
|
default: ""
|
|
meson_test_args:
|
|
description: "Arguments passed to meson test"
|
|
default: ""
|
|
meson_precmd:
|
|
description: "Set to 'sudo' to run with sudo"
|
|
default: ""
|
|
ninja_args:
|
|
description: "Arguments passed to ninja"
|
|
default: ""
|
|
ninja_precmd:
|
|
description: "Set to 'sudo' to run with sudo"
|
|
default: ""
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- run: |
|
|
${{inputs.meson_precmd}} meson setup ${{inputs.builddir}} ${{inputs.srcdir}} ${{inputs.meson_args}}
|
|
${{inputs.meson_precmd}} meson configure ${{inputs.builddir}}
|
|
${{inputs.ninja_precmd}} ninja -C ${{inputs.builddir}} ${{inputs.ninja_args}}
|
|
if [[ -z "${{inputs.meson_skip_test}}" ]]; then
|
|
${{inputs.meson_precmd}} meson test -C ${{inputs.builddir}} --print-errorlogs ${{inputs.meson_test_args}};
|
|
fi
|
|
shell: bash
|