From 068daf2ac2bfe05858abcfb7e1af6c2e45ff067a Mon Sep 17 00:00:00 2001 From: Raj Shah Date: Thu, 9 Jun 2022 04:41:05 +0000 Subject: [PATCH] Restore deleted workflows --- .github/workflows/linux-build.yml | 52 +++++++++++ .github/workflows/mac-build.yml | 64 +++++++++++++ .github/workflows/onefiledist.yml | 144 ++++++++++++++++++++++++++++++ .github/workflows/win-build.yml | 88 ++++++++++++++++++ 4 files changed, 348 insertions(+) create mode 100644 .github/workflows/linux-build.yml create mode 100644 .github/workflows/mac-build.yml create mode 100644 .github/workflows/onefiledist.yml create mode 100644 .github/workflows/win-build.yml diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml new file mode 100644 index 000000000000..c365faae532f --- /dev/null +++ b/.github/workflows/linux-build.yml @@ -0,0 +1,52 @@ +name: Linux +on: [push] +jobs: + gcc: + runs-on: ubuntu-20.04 + strategy: + matrix: + cfgopt: + - "" + - "CFLAGS=-DTCL_UTF_MAX=3" + - "CFLAGS=-DTCL_NO_DEPRECATED=1" + - "--disable-shared" + - "--enable-symbols" + - "--enable-symbols=mem" + - "--enable-symbols=all" + 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 000000000000..30c16afaa4cf --- /dev/null +++ b/.github/workflows/mac-build.yml @@ -0,0 +1,64 @@ +name: macOS +on: [push] +jobs: + xcode: + runs-on: macos-11 + 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 + strategy: + matrix: + cfgopt: + - "" + - "--disable-shared" + - "--enable-symbols" + - "--enable-symbols=mem" + - "--enable-symbols=all" + 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-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 000000000000..8bd8ed27f272 --- /dev/null +++ b/.github/workflows/onefiledist.yml @@ -0,0 +1,144 @@ +name: Build Binaries +on: [push] +jobs: + linux: + name: Linux + runs-on: ubuntu-18.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}_snapshot + chmod +x tclsh${TCL_PATCHLEVEL}_snapshot + tar -cf tclsh${TCL_PATCHLEVEL}_snapshot.tar tclsh${TCL_PATCHLEVEL}_snapshot + working-directory: 1dist + - name: Upload + uses: actions/upload-artifact@v2 + with: + name: Tclsh ${{ env.TCL_PATCHLEVEL }} Linux single-file build (snapshot) + path: 1dist/*.tar + macos: + name: macOS + runs-on: macos-11 + 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}_snapshot + chmod +x contents/tclsh${TCL_PATCHLEVEL}_snapshot + cat > contents/README.txt <> $GITHUB_ENV + mkdir 1dist + working-directory: . + - name: Configure + run: ./configure $CFGOPT + 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}_snapshot.exe + working-directory: 1dist + - name: Upload + uses: actions/upload-artifact@v2 + with: + name: Tclsh ${{ env.TCL_PATCHLEVEL }} Windows single-file build (snapshot) + path: '1dist/*_snapshot.exe' diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml new file mode 100644 index 000000000000..e3c991e76e39 --- /dev/null +++ b/.github/workflows/win-build.yml @@ -0,0 +1,88 @@ +name: Windows +on: [push] +env: + ERROR_ON_FAILURES: 1 +jobs: + msvc: + runs-on: windows-2022 + defaults: + run: + shell: powershell + working-directory: win + strategy: + matrix: + cfgopt: + - "" + - "OPTS=utf16" + - "CHECKS=nodep" + - "OPTS=static" + - "OPTS=symbols" + - "OPTS=symbols STATS=compdbg,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" + } + gcc: + runs-on: windows-2022 + defaults: + run: + shell: msys2 {0} + working-directory: win + strategy: + matrix: + cfgopt: + - "" + - "CFLAGS=-DTCL_UTF_MAX=3" + - "CFLAGS=-DTCL_NO_DEPRECATED=1" + - "--disable-shared" + - "--enable-symbols" + - "--enable-symbols=mem" + - "--enable-symbols=all" + # Using powershell means we need to explicitly stop on failure + steps: + - name: Install MSYS2 + uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + install: git mingw-w64-x86_64-toolchain make + - 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 }} + 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 + +# 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.