aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/run.sh
blob: 3f6b00431a82dde33af27430782118761ffb262d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env bash
# Copyright 2020 syzkaller project authors. All rights reserved.
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.

export HOME="$PWD"
mkdir -p .cache
set -o pipefail
# Run the specified command and convert error messages to github format:
# https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
$1 "${@:2}" | \
	sed -E "s#/syzkaller/gopath/src/github.com/google/syzkaller/#\n#g" | \
	sed -E 's#\s*([a-zA-Z0-9._/-]+):([0-9]+):(([0-9]+):)? (.+)#\0\n::error file=\1,line=\2,col=0\4::\5#'