forked from tcltk/tcl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bcdee6f
commit 383e486
Showing
4 changed files
with
348 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <<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}_snapshot | ||
to mark the executable as runnable on your machine. | ||
EOF | ||
$CREATE_DMG \ | ||
--volname "Tcl $TCL_PATCHLEVEL (snapshot)" \ | ||
--window-pos 200 120 \ | ||
--window-size 800 400 \ | ||
"Tcl-$TCL_PATCHLEVEL-(snapshot).dmg" \ | ||
"contents/" | ||
working-directory: 1dist | ||
- name: Upload | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: Tclsh ${{ env.TCL_PATCHLEVEL }} macOS single-file build (snapshot) | ||
path: 1dist/*.dmg | ||
win: | ||
name: Windows | ||
runs-on: windows-2019 | ||
defaults: | ||
run: | ||
shell: msys2 {0} | ||
env: | ||
CC: gcc | ||
CFGOPT: --disable-symbols --disable-shared | ||
steps: | ||
- name: Install MSYS2 | ||
uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: UCRT64 | ||
install: git mingw-w64-ucrt-x86_64-toolchain make zip | ||
- name: Checkout | ||
uses: actions/checkout@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 $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' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |