diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..10c074443 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,35 @@ +name: C/C++ CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: install ctags + run: sudo apt-get install -y universal-ctags + - name: install shellcheck + run: sudo apt-get install -y shellcheck + - name: clone seqcexit + run: git clone https://github.com/lcn2/seqcexit + - name: install seqcexit + run: cd seqcexit && make install + - name: clone picky + run: git clone https://github.com/xexyl/picky + - name: install picky + run: cd picky && make && cp -p picky /usr/local/bin + - name: make + run: make + - name: make slow_prep + run: make slow_prep + - name: make clobber all test + run: make clobber all test + - name: make clobber + run: make clobber diff --git a/Makefile b/Makefile index 8f2f042cf..85d01c05c 100644 --- a/Makefile +++ b/Makefile @@ -558,7 +558,7 @@ reset_min_timestamp: soup/Makefile # prep: test_ioccc/prep.sh ${Q} ${RM} -f ${TMP_BUILD_LOG} - ${Q} ./test_ioccc/prep.sh -l "${TMP_BUILD_LOG}"; \ + ${Q} ./test_ioccc/prep.sh -m${MAKE} -l "${TMP_BUILD_LOG}"; \ EXIT_CODE="$$?"; \ ${MV} -f ${TMP_BUILD_LOG} ${BUILD_LOG}; \ if [[ $$EXIT_CODE -ne 0 ]]; then \ @@ -576,7 +576,7 @@ prep: test_ioccc/prep.sh # slow_prep: test_ioccc/prep.sh ${Q} ${RM} -f ${TMP_BUILD_LOG} - ${Q} ./test_ioccc/prep.sh; \ + ${Q} ./test_ioccc/prep.sh -m${MAKE}; \ EXIT_CODE="$$?"; \ if [[ $$EXIT_CODE -ne 0 ]]; then \ echo; \ @@ -605,7 +605,7 @@ build: release pull: release release: test_ioccc/prep.sh ${Q} ${RM} -f ${TMP_BUILD_LOG} - ${Q} ./test_ioccc/prep.sh -e -o -l "${TMP_BUILD_LOG}"; \ + ${Q} ./test_ioccc/prep.sh -m${MAKE} -e -o -l "${TMP_BUILD_LOG}"; \ EXIT_CODE="$$?"; \ ${MV} -f ${TMP_BUILD_LOG} ${BUILD_LOG}; \ if [[ $$EXIT_CODE -ne 0 ]]; then \ diff --git a/test_ioccc/prep.sh b/test_ioccc/prep.sh index 9612a02c7..596c41ea1 100755 --- a/test_ioccc/prep.sh +++ b/test_ioccc/prep.sh @@ -64,7 +64,7 @@ while getopts :hv:Veom:M:l: flag; do V) echo "$PREP_VERSION" exit 1 ;; - m) MAKE="$OPTARG"; + m) export MAKE="$OPTARG"; ;; M) MAKEFILE="$OPTARG"; ;; @@ -316,7 +316,7 @@ make_bug_report() { EXIT_CODE="$CODE" FAILURE_SUMMARY="$FAILURE_SUMMARY - make bug_report-txl $EXIT_CODE: $MAKE bug_report-txl -L $BUG_REPORT_LOGFILE: non-zero exit code: $status" + $MAKE bug_report-txl $EXIT_CODE: $MAKE bug_report-txl -L $BUG_REPORT_LOGFILE: non-zero exit code: $status" if [[ -z "$LOGFILE" ]]; then write_echo "$0: Warning: EXIT_CODE is now: $EXIT_CODE" 1>&2 fi