Update codeql.yml #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: cooljeanius/emacs-apple | |
on: | |
push: | |
branches: | |
- "**/*" | |
pull_request: | |
jobs: | |
test: | |
runs-on: macos-latest | |
steps: | |
- name: checkout | |
uses: actions/[email protected] | |
- run: brew update | |
- run: brew install make automake gettext texinfo gawk gdb coreutils gnu-sed gnu-which clang-build-analyzer clang-format libstxxl | |
env: | |
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 | |
HOMEBREW_VERBOSE: 1 | |
HOMEBREW_VERBOSE_USING_DOTS: 1 | |
- name: Initial build | |
run: | | |
if test -n "${{ matrix.compiler }}"; then \ | |
echo "This is the ${{ matrix.compiler }} build."; \ | |
which -a ${{ matrix.compiler }} || gwhich -a ${{ matrix.compiler }}; \ | |
else \ | |
echo "matrix.compiler unset (possibly wrong variable?)"; \ | |
fi | |
sh ./autogen.sh | |
env | uniq | sort | uniq | |
if test "${{ matrix.compiler }}" = "gcc"; then \ | |
./configure --enable-silent-rules --disable-autodepend --enable-gcc-warnings --enable-better-debugging --with-x-toolkit=no --disable-dependency-tracking --with-ns --enable-gcc-link-time-optimization CC=gcc CXX=g++ OBJC=gcc OBJCXX=g++; \ | |
elif test "${{ matrix.compiler }}" = "clang"; then \ | |
./configure --enable-silent-rules --disable-autodepend --enable-gcc-warnings --enable-better-debugging --with-x-toolkit=no --disable-dependency-tracking --with-ns --enable-clang-link-time-optimization CC=clang CXX=clang++ OBJC=clang OBJCXX=clang++; \ | |
else \ | |
./configure --enable-silent-rules --disable-autodepend --enable-gcc-warnings --enable-better-debugging --with-x-toolkit=no --disable-dependency-tracking --with-ns; \ | |
fi | |
if test -x "$(which gmake)" && test -x "$(which nproc)" && test -n "$(nproc)"; then \ | |
echo "attempting parallel build with $(nproc) jobs..."; \ | |
gmake -j"$(nproc)" --output-sync only_temacs; \ | |
else \ | |
make only_temacs; \ | |
fi | |
cd lisp && make update-subdirs | |
- run: make all_only_c | |
if: "${{ success() }}" | |
- name: Build docs | |
if: "${{ success() }}" | |
env: | |
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 | |
HOMEBREW_VERBOSE: 1 | |
HOMEBREW_VERBOSE_USING_DOTS: 1 | |
run: | | |
if test -d doc && test -w doc && test -x "$(which makeinfo)" && test -x "$(which brew)" && test -x "$(which nproc)" && test -n "$(nproc)" && test "$(nproc)" -ge 2 && test -x "$(which make)" && test -r doc/Makefile && test -x "$(which texi2dvi)" && test -x "$(which texi2pdf)" && test -x "$(which dvips)"; then \ | |
echo "using $(which makeinfo) for makeinfo with the following version info: $(makeinfo --version)"; \ | |
brew install texlive; \ | |
echo "nproc says we can use $(nproc) build jobs."; \ | |
make -j"$(nproc)" -C doc || make -C doc || (make -C doc/emacs && make -C doc/lispintro && make -C doc/lispref && make -C doc/man); \ | |
if [ $? -ge 1 ]; then \ | |
echo "giving doc/misc another try"; \ | |
pushd doc/misc; \ | |
make echo-info; \ | |
make dvi; \ | |
make html; \ | |
make pdf; \ | |
make ps; \ | |
make dist; \ | |
popd; \ | |
else \ | |
echo "so much for doc/misc..."; \ | |
fi; \ | |
else \ | |
echo "skipping building docs (due to 1 of many possible reasons)..."; \ | |
fi | |
- name: Apple stuff | |
if: "${{ success() }}" | |
run: | | |
make install_source | |
make dumpemacs | |
make emacswrapper | |
if test "${{ matrix.compiler }}" = "clang" || test -n "$(gcc --version | grep clang)"; then \ | |
make apple_check MAC_VERS_CFLAGS="-mmacosx-version-min=10.7 -stdlib=libc++"; \ | |
else \ | |
make -ki apple_check; \ | |
fi | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: | |
- clang | |
- gcc |