diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..64af6a7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,44 @@ +name: Build + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup HEMTT + uses: arma-actions/hemtt@v1 + + - name: Run HEMTT check + run: | + # Run hemtt check and capture output + OUTPUT=$(hemtt check 2>&1) || true + echo "$OUTPUT" + + # Filter out L-S29 (false positives for dynamically defined functions) + # and fail if any other warnings remain + WARNINGS=$(echo "$OUTPUT" | grep -E "warning\[" | grep -v "L-S29" || true) + if [ -n "$WARNINGS" ]; then + echo "" + echo "::error::Lint warnings found:" + echo "$WARNINGS" + exit 1 + fi + + - name: Run HEMTT build + run: hemtt build + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: ocap-build + path: .hemttout/build/ + retention-days: 7 diff --git a/.hemtt/project.toml b/.hemtt/project.toml index 5fd5250..ca67668 100644 --- a/.hemtt/project.toml +++ b/.hemtt/project.toml @@ -15,3 +15,6 @@ command_case = false banned_commands = false undefined = false format_args = false +# Optimization suggestions - not critical +if_assign = false +select_parse_number = false