summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/linux-build.yml51
-rw-r--r--.github/workflows/mac-build.yml63
-rw-r--r--.github/workflows/onefiledist.yml138
-rw-r--r--.github/workflows/win-build.yml85
4 files changed, 337 insertions, 0 deletions
diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml
new file mode 100644
index 0000000..92e17b6
--- /dev/null
+++ b/.github/workflows/linux-build.yml
@@ -0,0 +1,51 @@
+name: Linux
+on: [push]
+jobs:
+ gcc:
+ runs-on: ubuntu-20.04
+ strategy:
+ matrix:
+ cfgopt:
+ - ""
+ - "CFLAGS=-DTCL_NO_DEPRECATED=1"
+ - "CFLAGS=-DTCL_UTF_MAX=3"
+ - "--disable-shared"
+ - "--enable-symbols"
+ - "--enable-symbols=mem"
+ defaults:
+ run:
+ shell: bash
+ working-directory: unix
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Prepare
+ run: |
+ touch tclStubInit.c tclOOStubInit.c tclOOScript.h
+ working-directory: generic
+ - name: Configure ${{ matrix.cfgopt }}
+ run: |
+ mkdir "${HOME}/install dir"
+ ./configure ${CFGOPT} "--prefix=$HOME/install dir" || (cat config.log && exit 1)
+ env:
+ CFGOPT: ${{ matrix.cfgopt }}
+ - name: Build
+ run: |
+ make all
+ - name: Build Test Harness
+ run: |
+ make tcltest
+ - name: Run Tests
+ run: |
+ make test
+ env:
+ ERROR_ON_FAILURES: 1
+ - name: Test-Drive Installation
+ run: |
+ make install
+ - name: Create Distribution Package
+ run: |
+ make dist
+ - name: Convert Documentation to HTML
+ run: |
+ make html-tcl
diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml
new file mode 100644
index 0000000..bf3c420
--- /dev/null
+++ b/.github/workflows/mac-build.yml
@@ -0,0 +1,63 @@
+name: macOS
+on: [push]
+jobs:
+ xcode:
+ runs-on: macos-11.0
+ defaults:
+ run:
+ shell: bash
+ working-directory: macosx
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Prepare
+ run: |
+ touch tclStubInit.c tclOOStubInit.c tclOOScript.h
+ working-directory: generic
+ - name: Build
+ run: make all
+ env:
+ CFLAGS: -arch x86_64 -arch arm64e
+ - name: Run Tests
+ run: make test styles=develop
+ env:
+ ERROR_ON_FAILURES: 1
+ MAC_CI: 1
+ clang:
+ runs-on: macos-11.0
+ strategy:
+ matrix:
+ cfgopt:
+ - ""
+ - "--disable-shared"
+ - "--enable-symbols"
+ - "--enable-symbols=mem"
+ defaults:
+ run:
+ shell: bash
+ working-directory: unix
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Prepare
+ run: |
+ touch tclStubInit.c tclOOStubInit.c tclOOScript.h
+ mkdir "$HOME/install dir"
+ working-directory: generic
+ - name: Configure ${{ matrix.cfgopt }}
+ # Note that macOS is always a 64 bit platform
+ run: ./configure --enable-64bit --enable-dtrace --enable-framework ${CFGOPT} "--prefix=$HOME/install" || (cat config.log && exit 1)
+ env:
+ CFLAGS: -arch x86_64 -arch arm64e
+ CFGOPT: ${{ matrix.cfgopt }}
+ - name: Build
+ run: |
+ make all tcltest
+ env:
+ CFLAGS: -arch x86_64 -arch arm64e
+ - name: Run Tests
+ run: |
+ make test
+ env:
+ ERROR_ON_FAILURES: 1
+ MAC_CI: 1
diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml
new file mode 100644
index 0000000..a60428d
--- /dev/null
+++ b/.github/workflows/onefiledist.yml
@@ -0,0 +1,138 @@
+name: Build Binaries
+on: [push]
+jobs:
+ linux:
+ name: Linux
+ runs-on: ubuntu-16.04
+ defaults:
+ run:
+ shell: bash
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Prepare
+ run: |
+ touch generic/tclStubInit.c generic/tclOOStubInit.c
+ mkdir 1dist
+ echo "VER_PATH=$(cd tools; pwd)/addVerToFile.tcl" >> $GITHUB_ENV
+ working-directory: .
+ - name: Configure
+ run: ./configure --disable-symbols --disable-shared --enable-zipfs
+ working-directory: unix
+ - name: Build
+ run: |
+ make tclsh
+ make shell SCRIPT="$VER_PATH $GITHUB_ENV"
+ echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV
+ working-directory: unix
+ - name: Package
+ run: |
+ cp ../unix/tclsh tclsh${TCL_PATCHLEVEL}_unofficial
+ chmod +x tclsh${TCL_PATCHLEVEL}_unofficial
+ tar -cf tclsh${TCL_PATCHLEVEL}_unofficial.tar tclsh${TCL_PATCHLEVEL}_unofficial
+ working-directory: 1dist
+ - name: Upload
+ uses: actions/upload-artifact@v2
+ with:
+ name: Tclsh ${{ env.TCL_PATCHLEVEL }} Linux single-file build (unofficial)
+ path: 1dist/*.tar
+ macos:
+ name: macOS
+ runs-on: macos-11.0
+ defaults:
+ run:
+ shell: bash
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Checkout create-dmg
+ uses: actions/checkout@v2
+ with:
+ repository: create-dmg/create-dmg
+ ref: v1.0.8
+ path: create-dmg
+ - name: Prepare
+ run: |
+ mkdir 1dist
+ touch generic/tclStubInit.c generic/tclOOStubInit.c || true
+ wget https://github.com/culler/macher/releases/download/v1.3/macher
+ sudo cp macher /usr/local/bin
+ sudo chmod a+x /usr/local/bin/macher
+ echo "VER_PATH=$(cd tools; pwd)/addVerToFile.tcl" >> $GITHUB_ENV
+ echo "CREATE_DMG=$(cd create-dmg;pwd)/create-dmg" >> $GITHUB_ENV
+ echo "CFLAGS=-arch x86_64 -arch arm64e" >> $GITHUB_ENV
+ - name: Configure
+ run: ./configure --disable-symbols --disable-shared --enable-zipfs
+ working-directory: unix
+ - name: Build
+ run: |
+ make tclsh
+ make shell SCRIPT="$VER_PATH $GITHUB_ENV"
+ echo "TCL_BIN=`pwd`/tclsh" >> $GITHUB_ENV
+ echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV
+ working-directory: unix
+ - name: Package
+ run: |
+ mkdir contents
+ cp $TCL_BIN contents/tclsh${TCL_PATCHLEVEL}_unofficial
+ chmod +x contents/tclsh${TCL_PATCHLEVEL}_unofficial
+ cat > contents/README.txt <<EOF
+ This is a single-file executable developer preview of Tcl $TCL_PATCHLEVEL
+
+ It is not intended as an official release at all, so it is unsigned and unnotarized.
+ Use strictly at your own risk.
+
+ To run it, you need to copy the executable out and run:
+ xattr -d com.apple.quarantine tclsh${TCL_PATCHLEVEL}_unofficial
+ to mark the executable as runnable on your machine.
+ EOF
+ $CREATE_DMG \
+ --volname "Tcl $TCL_PATCHLEVEL (unofficial)" \
+ --window-pos 200 120 \
+ --window-size 800 400 \
+ "Tcl-$TCL_PATCHLEVEL-(unofficial).dmg" \
+ "contents/"
+ working-directory: 1dist
+ - name: Upload
+ uses: actions/upload-artifact@v2
+ with:
+ name: Tclsh ${{ env.TCL_PATCHLEVEL }} macOS single-file build (unofficial)
+ path: 1dist/*.dmg
+ win:
+ name: Windows
+ runs-on: windows-latest
+ defaults:
+ run:
+ shell: bash
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Install MSYS2
+ uses: msys2/setup-msys2@v2
+ - name: Prepare
+ run: |
+ touch generic/tclStubInit.c generic/tclOOStubInit.c
+ echo "VER_PATH=$(cd tools; pwd)/addVerToFile.tcl" >> $GITHUB_ENV
+ mkdir 1dist
+ working-directory: .
+ - name: Configure
+ run: ./configure --disable-symbols --disable-shared --enable-zipfs
+ working-directory: win
+ - name: Build
+ run: |
+ make binaries libraries
+ echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV
+ working-directory: win
+ - name: Get Exact Version
+ run: |
+ ./tclsh*.exe $VER_PATH $GITHUB_ENV
+ working-directory: win
+ - name: Set Executable Name
+ run: |
+ cp ../win/tclsh*.exe tclsh${TCL_PATCHLEVEL}_unofficial.exe
+ working-directory: 1dist
+ - name: Upload
+ uses: actions/upload-artifact@v2
+ with:
+ name: Tclsh ${{ env.TCL_PATCHLEVEL }} Windows single-file build (unofficial)
+ path: '1dist/*_unofficial.exe'
diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml
new file mode 100644
index 0000000..5148a47
--- /dev/null
+++ b/.github/workflows/win-build.yml
@@ -0,0 +1,85 @@
+name: Windows
+on: [push]
+jobs:
+ msvc:
+ runs-on: windows-latest
+ defaults:
+ run:
+ shell: powershell
+ working-directory: win
+ strategy:
+ matrix:
+ cfgopt:
+ - ""
+ - "CHECKS=nodep"
+ - "OPTS=static"
+ - "OPTS=symbols"
+ - "OPTS=memdbg"
+ # Using powershell means we need to explicitly stop on failure
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Init MSVC
+ uses: ilammy/msvc-dev-cmd@v1
+ - name: Build ${{ matrix.cfgopt }}
+ run: |
+ &nmake -f makefile.vc ${{ matrix.cfgopt }} all
+ if ($lastexitcode -ne 0) {
+ throw "nmake exit code: $lastexitcode"
+ }
+ - name: Build Test Harness ${{ matrix.cfgopt }}
+ run: |
+ &nmake -f makefile.vc ${{ matrix.cfgopt }} tcltest
+ if ($lastexitcode -ne 0) {
+ throw "nmake exit code: $lastexitcode"
+ }
+ - name: Run Tests ${{ matrix.cfgopt }}
+ run: |
+ &nmake -f makefile.vc ${{ matrix.cfgopt }} test
+ if ($lastexitcode -ne 0) {
+ throw "nmake exit code: $lastexitcode"
+ }
+ env:
+ ERROR_ON_FAILURES: 1
+ CI_BUILD_WITH_MSVC: 1
+ gcc:
+ runs-on: windows-latest
+ defaults:
+ run:
+ shell: bash
+ working-directory: win
+ strategy:
+ matrix:
+ cfgopt:
+ - ""
+ - "CFLAGS=-DTCL_NO_DEPRECATED=1"
+ - "--disable-shared"
+ - "--enable-symbols"
+ - "--enable-symbols=mem"
+ # Using powershell means we need to explicitly stop on failure
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Install MSYS2 and Make
+ run: choco install msys2 make
+ - name: Prepare
+ run: |
+ touch tclStubInit.c tclOOStubInit.c tclOOScript.h
+ mkdir "${HOME}/install dir"
+ working-directory: generic
+ - name: Configure ${{ matrix.cfgopt }}
+ run: |
+ ./configure ${CFGOPT} "--prefix=$HOME/install dir" || (cat config.log && exit 1)
+ env:
+ CFGOPT: --enable-64bit ${{ matrix.cfgopt }}
+ - name: Build
+ run: make all
+ - name: Build Test Harness
+ run: make tcltest
+ - name: Run Tests
+ run: make test
+ env:
+ ERROR_ON_FAILURES: 1
+
+# If you add builds with Wine, be sure to define the environment variable
+# CI_USING_WINE when running them so that broken tests know not to run.