diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2020-11-22 00:42:33 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2020-11-22 00:42:33 (GMT) |
commit | 48e8b9077922fe4f18c2c36fcd557b5996ef010a (patch) | |
tree | aac734f79a7ded46bd97ee2b27d7d0b1247f4afb /.github | |
parent | a6c1ce56ebc91c013dfc23d88b40c9deb0ebe31b (diff) | |
parent | 5cdbf004f4bdff1275fd3c1a8300c91d4f68f58c (diff) | |
download | tk-48e8b9077922fe4f18c2c36fcd557b5996ef010a.zip tk-48e8b9077922fe4f18c2c36fcd557b5996ef010a.tar.gz tk-48e8b9077922fe4f18c2c36fcd557b5996ef010a.tar.bz2 |
Merge 8.5; add Github Actions builds for Windows and macOS
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/mac-build.yml | 164 | ||||
-rw-r--r-- | .github/workflows/win-build.yml | 154 |
2 files changed, 318 insertions, 0 deletions
diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml new file mode 100644 index 0000000..2760be9 --- /dev/null +++ b/.github/workflows/mac-build.yml @@ -0,0 +1,164 @@ +name: macOS +on: [push] +env: + ERROR_ON_FAILURES: 1 +jobs: + with-Xcode: + runs-on: macos-latest + defaults: + run: + shell: bash + working-directory: tk/macosx + steps: + - name: Check out Tk + uses: actions/checkout@v2 + with: + path: tk + - name: Check out Tcl + uses: actions/checkout@v2 + with: + repository: tcltk/tcl + ref: core-8-branch + path: tcl + - name: Prepare checked out repositories + run: | + touch tk/generic/tkStubInit.c + mkdir build + echo "BUILD_DIR=`cd build && pwd`" >> $GITHUB_ENV + echo "DESTDIR=`cd build && pwd`" >> $GITHUB_ENV + working-directory: . + - name: Build Tcl + run: | + make all + working-directory: tcl/macosx + - name: Build + run: | + make all install || { + echo "::error::Failure during Build" + exit 1 + } + - name: Run Tests + run: | + make test styles=develop | tee out-tests.txt || { + echo "::error::Failure during Test" + exit 1 + } + cat out-tests.txt | grep -q "Failed[[:space:]][[:space:]]*[1-9]" && { + echo "::error::Failure during Test" + exit 1 + } + env: + MAC_CI: 1 + Unix-like: + runs-on: macos-latest + strategy: + matrix: + symbols: + - 'no' + - 'mem' + options: + - '--enable-aqua' + - '--disable-aqua' + defaults: + run: + shell: bash + working-directory: tk/unix + steps: + - name: Check out Tk + uses: actions/checkout@v2 + with: + path: tk + - name: Check out Tcl + uses: actions/checkout@v2 + with: + repository: tcltk/tcl + ref: core-8-branch + path: tcl + - name: Prepare checked out repositories + run: | + touch tkStubInit.c + mkdir "$HOME/install dir" + echo "USE_XVFB=$SET_DISPLAY" >> $GITHUB_ENV + working-directory: tk/generic + env: + SET_DISPLAY: ${{ contains(matrix.options, '--disable-aqua') }} + - name: Add X11 (if required) + if: ${{ env.USE_XVFB }} + # This involves black magic + run: | + brew cask install xquartz + sudo /opt/X11/lib/X11/xinit/privileged_startx.d/10-tmpdirs || true + working-directory: . + - name: Build Tcl + # Note that macOS is always a 64 bit platform + run: | + ./configure --enable-64bit ${CFGOPT} "--prefix=$HOME/install dir" || { + cat config.log + echo "::error::Failure during Tcl Configure" + exit 1 + } + make all || { + echo "::error::Failure during Tcl Build" + exit 1 + } + make install || { + echo "::error::Failure during Tcl Install" + exit 1 + } + working-directory: tcl/unix + env: + CFGOPT: --enable-symbols=${{ matrix.symbols }} + - name: Configure (symbols=${{ matrix.symbols }} ${{matrix.options }}) + # Note that macOS is always a 64 bit platform + run: | + ./configure --enable-64bit ${CFGOPT} "--prefix=$HOME/install dir" || { + cat config.log + echo "::error::Failure during Configure" + exit 1 + } + env: + CFGOPT: --enable-symbols=${{ matrix.symbols }} ${{matrix.options }} + - name: Build + run: | + make all tktest || { + echo "::error::Failure during Build" + exit 1 + } + - name: Run Tests + run: | + if [ $USE_XVFB == true ]; then + function runXvfb { + PATH=$PATH:/opt/X11/bin + Xvfb $1 & + XVFB_PID=$! + echo Launched Xvfb $1 as process $XVFB_PID >&2 + trap "echo killing process $XVFB_PID... >&2; kill $XVFB_PID" 0 + export DISPLAY=$1 + sleep 2 + } + else + function runXvfb { + : do nothing + } + fi + ( runXvfb :0; make test-classic; exit $? ) | tee out-classic.txt || { + echo "::error::Failure during Test" + exit 1 + } + ( runXvfb :0; make test-ttk; exit $? ) | tee out-ttk.txt || { + echo "::error::Failure during Test" + exit 1 + } + cat out-classic.txt out-ttk.txt | grep -q "Failed[[:space:]][[:space:]]*[1-9]" && { + echo "::error::Failure during Test" + exit 1 + } + env: + MAC_CI: 1 + - name: Carry out trial installation + run: | + make install || { + cat config.log + echo "::error::Failure during Install" + exit 1 + } diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml new file mode 100644 index 0000000..6c02a9e --- /dev/null +++ b/.github/workflows/win-build.yml @@ -0,0 +1,154 @@ +name: Windows +on: [push] +env: + ERROR_ON_FAILURES: 1 +jobs: + MSVC: + runs-on: windows-latest + defaults: + run: + shell: powershell + working-directory: tk/win + # Using powershell means we need to explicitly stop on failure + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + path: tk + - name: Checkout + uses: actions/checkout@v2 + with: + repository: tcltk/tcl + ref: core-8-branch + path: tcl + - name: Make Install Location + working-directory: . + shell: bash + run: | + mkdir install + cd install + echo "INSTALLDIR=`pwd`" >> $GITHUB_ENV + - name: Init MSVC + uses: ilammy/msvc-dev-cmd@v1 + - name: Build Tcl + run: | + &nmake -f makefile.vc release install + if ($lastexitcode -ne 0) { + throw "nmake exit code: $lastexitcode" + } + working-directory: tcl/win + - name: Build + run: | + &nmake -f makefile.vc all + if ($lastexitcode -ne 0) { + throw "nmake exit code: $lastexitcode" + } + - name: Build Test Harness + run: | + &nmake -f makefile.vc tktest + if ($lastexitcode -ne 0) { + throw "nmake exit code: $lastexitcode" + } + - name: Run Tests + run: | + nmake -f makefile.vc test-classic | tee out-classic.txt || { + echo "::error::Failure during Test" + exit 1 + } + nmake -f makefile.vc test-ttk | tee out-ttk.txt || { + echo "::error::Failure during Test" + exit 1 + } + cat out-classic.txt out-ttk.txt | grep -q "Failed [1-9]" && { + echo "::error::Failure during Test" + exit 1 + } + env: + CI_BUILD_WITH_MSVC: 1 + shell: bash + - name: Build Help + run: | + &nmake -f makefile.vc htmlhelp + if ($lastexitcode -ne 0) { + throw "nmake exit code: $lastexitcode" + } + - name: Install + run: | + &nmake -f makefile.vc install + if ($lastexitcode -ne 0) { + throw "nmake exit code: $lastexitcode" + } + MSYS-gcc: + runs-on: windows-latest + defaults: + run: + shell: bash + working-directory: win + strategy: + matrix: + symbols: + - "no" + - "mem" + - "all" + # Using powershell means we need to explicitly stop on failure + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v2 + with: + repository: tcltk/tcl + ref: core-8-branch + path: tcl + - name: Install MSYS2, Make + run: choco install -y msys2 make + - name: Prepare + run: | + touch tkStubInit.c + mkdir "${HOME}/install_dir" + echo "INSTALL_DIR=${HOME}/install_dir" >> $GITHUB_ENV + working-directory: generic + - name: Configure and Build Tcl + run: | + ./configure ${CFGOPT} "--prefix=$INSTALL_DIR" || { + cat config.log + echo "::warning::Failure during Tcl Configure" + exit 1 + } + make all install || { + echo "::warning::Failure during Tcl Build" + exit 1 + } + echo "TCL_CONFIG_PATH=`pwd`" >> $GITHUB_ENV + env: + CFGOPT: --enable-64bit --enable-symbols=${{ matrix.symbols }} + working-directory: tcl/win + - name: Configure (symbols=${{ matrix.symbols }}) + run: | + ./configure ${CFGOPT} "--prefix=$HOME/INSTALL_DIR" "--with-tcl=$TCL_CONFIG_PATH" || { + cat config.log + echo "::error::Failure during Configure" + exit 1 + } + env: + CFGOPT: --enable-64bit --enable-symbols=${{ matrix.symbols }} + - name: Build + run: | + make all tktest || { + echo "::error::Failure during Build" + exit 1 + } + - name: Run Tests + run: | + make test-classic | tee out-classic.txt || { + echo "::error::Failure during Test" + exit 1 + } + make test-ttk | tee out-ttk.txt || { + echo "::error::Failure during Test" + exit 1 + } + cat out-classic.txt out-ttk.txt | grep -q "Failed [1-9]" && { + echo "::error::Failure during Test" + exit 1 + } |