Skip to content

Commit

Permalink
Added a GH workflow to run
Browse files Browse the repository at this point in the history
  • Loading branch information
tomuben committed Nov 15, 2024
1 parent 0a2684d commit 392e9d9
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/oft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Check Bazel Tests

on:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name:
run:

- name: Run HTML Report
run: |
bash .github/workflow/scripts/run_oft.sh ./exaudfclient base -o html -f ./oft_report.html || echo failed
- name: Run Plaintext Report
run: |
bash .github/workflow/scripts/run_oft.sh ./exaudfclient base
- uses: actions/upload-artifact@v4
if: always()
with:
name: "oft_report.html"
path: oft_report.html
27 changes: 27 additions & 0 deletions .github/workflows/scripts/run_oft.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

set -o errexit
set -o nounset
set -o pipefail

oft_version="4.1.0"

base_dir="$1"
shift 1
src_dir="$2"
shift 1
additional_options=$@
readonly base_dir
readonly oft_jar="$HOME/.m2/repository/org/itsallcode/openfasttrace/openfasttrace/$oft_version/openfasttrace-$oft_version.jar"

if [ ! -f "$oft_jar" ]; then
echo "Downloading OpenFastTrace $oft_version"
mvn --batch-mode org.apache.maven.plugins:maven-dependency-plugin:3.3.0:get -Dartifact=org.itsallcode.openfasttrace:openfasttrace:$oft_version
fi

# Trace all
java -jar "$oft_jar" trace \
$additional_options \
-a feat,req,dsn \
"$base_dir/doc" \
"$base_dir/$src_dir"

0 comments on commit 392e9d9

Please sign in to comment.