gcc and other compilers create dependency files that are included in
the Makefile for builds subsequent to the first build after a clean
checkout.
Dependency files produced by gcc look like this:
parse.o: parse.c config-host.h compiler/compiler.h parse.h flist.h \
debug.h lib/types.h log.h lib/output_buffer.h options.h optgroup.h \
minmax.h lib/ieee754.h lib/pow2.h lib/types.h
The Makefile rule for .o files manipulates the gcc dependencies file to
look like this:
parse.o: parse.c config-host.h compiler/compiler.h parse.h flist.h \
debug.h lib/types.h log.h lib/output_buffer.h options.h optgroup.h \
minmax.h lib/ieee754.h lib/pow2.h lib/types.h
parse.c:
config-host.h:
compiler/compiler.h:
parse.h:
flist.h:
debug.h:
lib/types.h:
log.h:
lib/output_buffer.h:
options.h:
optgroup.h:
minmax.h:
lib/ieee754.h:
lib/pow2.h:
lib/types.h:
For some reason the GitHub Actions Windows Cygwin sed does not execute
-e 's/\\$$//' properly to remove the backslashes at the end of each
line. On this platform the dependencies file after processing looks
like:
parse.o: parse.c config-host.h compiler/compiler.h parse.h flist.h \
debug.h lib/types.h log.h lib/output_buffer.h options.h optgroup.h \
minmax.h lib/ieee754.h lib/pow2.h lib/types.h
parse.c:
config-host.h:
compiler/compiler.h:
parse.h:
flist.h:
\:
debug.h:
lib/types.h:
log.h:
lib/output_buffer.h:
options.h:
optgroup.h:
\:
minmax.h:
lib/ieee754.h:
lib/pow2.h:
lib/types.h:
Once these dependency files are created subsequent invocations of make
(i.e., 'make test') produce Makefile parsing errors like:
parse.d:9: *** missing separator. Stop.
All of this works fine on GitHub Actions msys2 and AppVeyor's Cygwin and
msys2.
Work around this problem by deleting the dependencies files before
running the tests.
For more details describing the processing of dependency files see
https://scottmcpeak.com/autodepend/autodepend.html
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
with:
name: ${{ matrix.build }}-installer
path: os\windows\*.msi
+ - name: Remove dependency files to resolve Makefile Cygwin sed issue (Windows)
+ if: ${{ startsWith(matrix.build, 'windows-cygwin') }}
+ run: rm *.d */*.d */*/*.d
+ shell: bash
- name: Smoke test
run: ${{matrix.shell}} ./ci/actions-smoke-test.sh
- name: Full test