From 59e8254d87e875d999e5b6ed667f418abdb94169 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 20 Nov 2020 15:09:17 +0000 Subject: Advanced build; this one works and is full function --- .github/workflows/linux-build.yml | 164 ++++++++++++++++++++++++++++++++------ unix/tkConfig.h.in | 25 +++++- 2 files changed, 159 insertions(+), 30 deletions(-) diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index de234fd..fc16e31 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -1,47 +1,159 @@ -name: Linux +name: Linux Build and Test on: [push] +defaults: + run: + shell: bash + working-directory: tk/unix +env: + ERROR_ON_FAILURES: 1 jobs: - gcc: - runs-on: ubuntu-20.04 + build: + runs-on: ubuntu-latest strategy: matrix: - cfgopt: + compiler: + - "gcc" + - "clang" + symbols: + - "no" + - "mem" + disables: - "" - "--disable-shared" - "--disable-xft" - "--disable-xss" - - "--enable-symbols" - defaults: - run: - shell: bash - working-directory: unix steps: - name: Checkout uses: actions/checkout@v2 - - name: Prepare - run: touch ../doc/man.macros tkStubInit.c;sudo apt-get install tcl8.6-dev libxss-dev - working-directory: generic - - name: Configure ${{ matrix.cfgopt }} + with: + path: tk + - name: Checkout Tcl + uses: actions/checkout@v2 + with: + repository: tcltk/tcl + ref: core-8-branch + path: tcl + - name: Setup Environment (compiler=${{ matrix.compiler }}) run: | - mkdir "${HOME}/install" - ./configure ${CFGOPT} "--prefix=$HOME/install" -with-tcl=/usr/lib/tcl8.6 || (cat config.log && exit 1) + sudo apt-get install tcl8.6-dev libx11-dev libxss-dev + mkdir "$HOME/install dir" + touch tk/doc/man.macros tk/generic/tkStubInit.c + echo "TEST_INSTALL_DIR=$HOME/install dir" >> $GITHUB_ENV + echo "CFGOPT=$CFGOPT --with-tcl=/usr/lib/tcl8.6" >> $GITHUB_ENV + echo "CC=$COMPILER" >> $GITHUB_ENV + echo "TOOL_DIR=$(cd tcl/tools;pwd)" >> $GITHUB_ENV + echo "BUILD_CONFIG_ID=$OPTS" >> $GITHUB_ENV + working-directory: "." env: - CFGOPT: ${{ matrix.cfgopt }} + CFGOPT: --enable-symbols=${{ matrix.symbols }} ${{ matrix.disables }} + COMPILER: ${{ matrix.compiler }} + OPTS: ${{ matrix.compiler }}-${{ matrix.symbols }}${{ matrix.disables }} + - name: Configure (symbols=${{ matrix.symbols }} opts=${{ matrix.disables }}) + run: | + ./configure $CFGOPT "--prefix=$TEST_INSTALL_DIR" || { + cat config.log + echo "::error::Failure during Configure" + exit 1 + } - name: Build run: | - make binaries libraries + make binaries libraries || { + echo "::error::Failure during Build" + exit 1 + } - name: Build Test Harness run: | - make tktest -# - name: Run Tests -# run: | -# make test + make tktest || { + echo "::error::Failure during Build" + exit 1 + } - name: Test-Drive Installation run: | - make install + make install || { + echo "::error::Failure during Install" + exit 1 + } - name: Create Distribution Package run: | - make dist -# - name: Convert Documentation to HTML -# run: | -# make html-tk + make dist || { + echo "::error::Failure during Distribute" + exit 1 + } + - name: Convert Documentation to HTML + run: | + make html-tk TOOL_DIR=$TOOL_DIR || { + echo "::error::Failure during Distribute" + exit 1 + } + - name: Discover Version ID + if: ${{ env.BUILD_CONFIG_ID == 'gcc-no' }} + run: | + cd /tmp/dist + echo "VERSION=`ls -d tk* | sed 's/tk//'`" >> $GITHUB_ENV + - name: Upload Source Distribution + if: ${{ env.BUILD_CONFIG_ID == 'gcc-no' }} + uses: actions/upload-artifact@v2 + with: + name: Tk ${{ env.VERSION }} Source distribution (unofficial) + path: | + /tmp/dist/tk* + !/tmp/dist/tk*/html/** + - name: Upload Documentation Distribution + if: ${{ env.BUILD_CONFIG_ID == 'gcc-no' }} + uses: actions/upload-artifact@v2 + with: + name: Tk ${{ env.VERSION }} HTML documentation (unofficial) + path: /tmp/dist/tk*/html + test: + runs-on: ubuntu-latest + strategy: + matrix: + compiler: + - "gcc" + symbols: + - "no" + - "mem" + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + path: tk + - name: Setup Environment (compiler=${{ matrix.compiler }}) + run: | + sudo apt-get install tcl8.6-dev libx11-dev libxss-dev xvfb + mkdir "$HOME/install dir" + touch tk/doc/man.macros tk/generic/tkStubInit.c + echo "TEST_INSTALL_DIR=$HOME/install dir" >> $GITHUB_ENV + echo "CFGOPT=$CFGOPT --with-tcl=/usr/lib/tcl8.6" >> $GITHUB_ENV + echo "CC=$COMPILER" >> $GITHUB_ENV + working-directory: "." + env: + CFGOPT: --enable-symbols=${{ matrix.symbols }} + COMPILER: ${{ matrix.compiler }} + - name: Configure (symbols=${{ matrix.symbols }}) + run: | + ./configure $CFGOPT "--prefix=$TEST_INSTALL_DIR" || { + cat config.log + echo "::error::Failure during Configure" + exit 1 + } + - name: Build + run: | + make binaries libraries tktest || { + echo "::error::Failure during Build" + exit 1 + } + - name: Run Tests + run: | + xvfb-run --auto-servernum make test-classic | tee out-classic.txt || { + echo "::error::Failure during Test" + exit 1 + } + xvfb-run --auto-servernum make test-ttk | tee out-ttk.txt || { + echo "::error::Failure during Test" + exit 1 + } + cat out-classic.txt out-ttk.txt | grep -q "Failed 0" || { + echo "::error::Failure during Test" + exit 1 + } diff --git a/unix/tkConfig.h.in b/unix/tkConfig.h.in index 918f9c2..eb1d61e 100644 --- a/unix/tkConfig.h.in +++ b/unix/tkConfig.h.in @@ -4,6 +4,9 @@ #ifndef _TKCONFIG #define _TKCONFIG +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + /* Is pthread_attr_get_np() declared in ? */ #undef ATTRGETNP_NOT_DECLARED @@ -19,6 +22,9 @@ /* Do we have access to Darwin CoreFoundation.framework? */ #undef HAVE_COREFOUNDATION +/* Is 'DIR64' in ? */ +#undef HAVE_DIR64 + /* Do we have the intptr_t type? */ #undef HAVE_INTPTR_T @@ -145,6 +151,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -193,9 +202,17 @@ /* Do we want to use the threaded memory allocator? */ #undef USE_THREAD_ALLOC -/* Define to 1 if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -#undef WORDS_BIGENDIAN +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif /* Are Darwin SUSv3 extensions available? */ #undef _DARWIN_C_SOURCE @@ -244,7 +261,7 @@ /* Define to `int' if does not define. */ #undef pid_t -/* Define to `unsigned' if does not define. */ +/* Define to `unsigned int' if does not define. */ #undef size_t /* Do we want to use the strtod() in compat? */ -- cgit v0.12