1

I'm trying to compile all my C projects within an Action on GitHub.

This is the command I'm running:

\! find . -name Makefile -type f -execdir make re \; 2>&1 | grep -qF 'Error 1'

It exits 1 if grep finds 'Error 1', which is what make displays when it fails. Locally it works fine, and I've even pulled a fresh branch to make sure it wasn't some local changes which caused a biased result. But nothing...

This is what is displayed in my pipeline (raw log on Github):

2023-02-21T13:45:13.6257013Z ##[group]Run \! find . -name Makefile -type f -execdir make re \; 2>&1 | grep -qF 'Error 1'
2023-02-21T13:45:13.6257510Z [36;1m\! find . -name Makefile -type f -execdir make re \; 2>&1 | grep -qF 'Error 1'[0m
2023-02-21T13:45:13.6313689Z shell: /usr/bin/bash -e {0}
2023-02-21T13:45:13.6313965Z ##[endgroup]
2023-02-21T13:45:13.6506466Z ##[error]Process completed with exit code 1.

I've also tried putting the script into a build.sh file, but I get a grep: conflicting matchers specified warning, and no error (even if make error is forced)

Tests I've performed:


If there's a better alternative to the command I'm using, which compiles all Makefiles in immediate subdirectories, that would be great too! :)

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.