Skip to content

add new local composite actions to simplify workflow script #1226

add new local composite actions to simplify workflow script

add new local composite actions to simplify workflow script #1226

Workflow file for this run

name: Full Build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
env:
# Expected filename: https://zlib.net/zlib-1.3.1.tar.gz
# old site: https://ftp.zx.net.nz/pub/dev/lib/zlib/
# As of 2023-01-21 downloads from zlib.net were coming back corrupted for an unknown reason,
# so we switched fetching zlib from ftp.zx.net.nz instead. As of 2024-08-16 it seems to be
# fine, so we've switched back to zlib.net.
ZLIB_VERSION: 1.3.1
# Expected filename: https://github.com/openssl/openssl/releases/download/openssl-${{env.CK_OPENSSL_VERSION}}/openssl-${{env.CK_OPENSSL_VERSION}}.tar.gz
OPENSSL_VERSION: 3.4.0
# OpenSSL 3.0 and 3.1 aren't properly compatible with Windows on ARM, so we've
# got to use 3.2 or newer for that.
OPENSSL_ARM_VERSION: 3.4.0
# Make tool for openssl builds. Jom works fine with OpenSSL 1.1.1 but is broken with 3.0.10.
# If jom works ideally we use that as it results in shorter build times.
OPENSSL_MAKE: nmake
# Any extra build flags for OpenSSL. -FS is required if using Jom.
# and -D"_WIN32_WINNT=0x502" is required for targeting Windows XP
OPENSSL_EXTRA_BUILD_FLAGS: -D"_WIN32_WINNT=0x502" -FS
# Expected filename: https://www.libssh.org/files/0.10/libssh-0.10.6.tar.xz
LIBSSH_VERSION: 0.10.6
# OpenZinc is available from http://openzinc.com/Downloads/OZ1.zip
# But we don't want to waste the resources of the generous OpenZinc developer,
# so we grab it from a mirror
OPENZINC: https://ftp.zx.net.nz/pub/dev/openzinc/oz1/OZ1.zip
# For building k95crypt.dll - expected to be a .tar.gz file
LIBDES: https://www.mirrorservice.org/sites/ftp.wiretapped.net/pub/security/cryptography/libraries/libdes/libdes.tar.gz
# Kerberos for Windows - current release for modern builds
KFW_x86: https://web.mit.edu/kerberos/dist/kfw/4.1/kfw-4.1-i386.msi
KFW_x86_64: https://web.mit.edu/kerberos/dist/kfw/4.1/kfw-4.1-amd64.msi
# Infozip
#INFOZIP_FTP: https://ftp.zx.net.nz/pub/archive/ftp.info-zip.org/pub/infozip/
INFOZIP_FTP: ftp://ftp.info-zip.org/pub/infozip/
# Use JOM instead of nmake for parallel builds
JOM: https://download.qt.io/official_releases/jom/jom.zip
# Download it from sourceforge distribution page
# expected filename: https://sourceforge.net/projects/regina-rexx/files/regina-rexx/3.9.6/regina-rexx-3.9.6.tar.gz/download
REGINA_VERSION: 3.9.6
# OS/2 Developer's Toolkit v4.5 is available on David Azarewicz's 88watts.net
# *supposedly* with permission from IBM - or so Arca Noae (which David is
# involved with) claims on this page:
# https://www.arcanoae.com/wiki/information-for-developers/
# It is needed only for building the IBM TCP/IP 2.0 TCP/IP backend. The SDK
# for this is also available on the OS/2 Warp 4 CD.
OS2TK45: https://88watts.net/dlfile.php?F=Os2Tk45-
#
# These are the binaries we expect to be generated by any standard build of K95
# This includes the core applications plus the telnet crypto and XYZ-MODEM DLLs.
# ctl3dins.exe is not currently included but perhaps should be.
STANDARD_BUILD_OUTPUTS: k95.exe iksd.exe iksdsvc.exe k95d.exe rlogin.exe telnet.exe textps.exe k95g.exe k95crypt.dll p95.dll
# And these are what we currently expect from standard builds for OS/2
OS2_BUILD_OUTPUTS: k2.exe k2clip.exe k2dc.exe rlogin.exe telnet.exe telnetpm.exe textps.exe p2.dll nullssh.dll
# Where to get the latest official C-Kermit for UNIX/Linux/MacOS X from
# along with its version. The version is only used as a cache key to ensure
# we're not hammering the kermit website or fetching code thats newer than
# what K95 is currently based on.
C_KERMIT_VERSION: 10.0beta11
#C_KERMIT_CODE: https://www.kermitproject.org/ftp/kermit/test/tar/x.tar.gz
C_KERMIT_CODE: https://kermitproject.org/ftp/kermit/pretest/x.tar.gz
jobs:
Get-CACerts-Bundle:
runs-on: windows-latest
steps:
- name: Fetch CA Certs bundle
run: |
curl -Ls https://curl.se/ca/cacert.pem -o ca_certs.pem \
-w "file size=%{size_download}; download time=%{time_total}; error msg=%{errormsg}(%{exitcode})\n"
curl -Ls https://www.mozilla.org/media/MPL/2.0/index.815ca599c9df.txt -o ca_certs.license \
-w "file size=%{size_download}; download time=%{time_total}; error msg=%{errormsg}(%{exitcode})\n"
cat << EOF > ca_certs.readme
ca_certs.pem was exported from the Mozilla CA Certificate Store and is licensed
under the MPL version 2.0.
For more information and updates, see: https://curl.se/docs/caextract.html
EOF
ls -l
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ca_certs
path: |
*.pem
*.readme
*.license
retention-days: 1
Prepare-Docs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: HTMLise Markdown Docs
working-directory: ${{ github.workspace }}
run: |
pip3 install markdown
(
echo ^<html^>
echo ^<head^>^<title^>Kermit 95 SSH Readme^</title^>^</head^>
echo ^<body^>
) > ssh-readme.html
(
echo ^<html^>
echo ^<head^>^<title^>Kermit 95 Change-Log^</title^>^</head^>
echo ^<body^>
) > change-log.html
python -m markdown -x markdown.extensions.fenced_code ${{ github.workspace }}\doc\ssh-readme.md >> ssh-readme.html
python -m markdown -x markdown.extensions.fenced_code ${{ github.workspace }}\doc\changes.md >> change-log.html
(
echo ^</body^>
echo ^</html^>
) >> change-log.html
(
echo ^</body^>
echo ^</html^>
) >> ssh-readme.html
shell: cmd
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: markdown-docs
path: |
change-log.html
ssh-readme.html
retention-days: 1
Build-Wart:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Enable Developer Command Prompt
# You may pin to the exact commit or the version.
# uses: ilammy/msvc-dev-cmd@d8610e2b41c6d0f0c3b4c46dad8df0fd826c68e1
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86
- name: Build ckwart
env:
ROOT: ${{ github.workspace }}
working-directory: kermit/k95
run: |
call ${{ github.workspace }}\setenv.bat
nmake /nologo /e /f ckoker.mak ckwart.exe
if not exist ckwart.exe exit /b 1
move ckwart.exe ..\..\ckwart.exe
shell: cmd
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: wart-x86
path: ${{ github.workspace }}\ckwart.exe
if-no-files-found: error
retention-days: 1
##############################################################################
# Build with Visual C++ 14.x (2015/2017/2019/2022) #
##############################################################################
# This includes the latest compilers available (2022), plus the most recent
# capable of still targeting Windows XP (2017). All support x86, x86-64, ARM32
# and ARM64.
Build-VisualCxx:
needs: [Get-CACerts-Bundle, Prepare-Docs, Build-Wart]
strategy:
matrix:
arch:
- id: x86
- id: x64
- id: x64_arm
# temporary setup Windows SDK version for 32-bit ARM to 10.0.22621.0 because
# latest SDK version 10.0.26100.0 doesn't contains 32-bit ARM files
sdk: 10.0.22621.0
- id: x64_arm64
version:
- vs: 2019
image: windows-2019
- vs: 2022
image: windows-2022
runs-on: ${{matrix.version.image}}
name: Build-VS${{matrix.version.vs}} (${{matrix.arch.id}})
steps:
- uses: actions/checkout@v4
- name: Select env configuration
id: cfg
run: |
if [[ "${{ matrix.arch.id }}" = "x64_arm" || "${{ matrix.arch.id }}" = "x64_arm64" ]]; then
echo "openssl=${{ env.OPENSSL_ARM_VERSION }}" >> "$GITHUB_OUTPUT"
echo "k4w=." >> "$GITHUB_OUTPUT"
else
echo "openssl=${{ env.OPENSSL_VERSION }}" >> "$GITHUB_OUTPUT"
echo "k4w=kerberos\current\Kerberos" >> "$GITHUB_OUTPUT"
fi
shell: bash
- name: Enable Developer Command Prompt
# You may pin to the exact commit or the version.
# uses: ilammy/msvc-dev-cmd@d8610e2b41c6d0f0c3b4c46dad8df0fd826c68e1
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch.id }}
vsversion: ${{matrix.version.vs}}
sdk: ${{ matrix.arch.sdk }}
#spectre: # set true to use VC libraries with sepctre mitigations
- name: Load Build Tools
uses: "./.github/actions/load-tools"
with:
nocache: ${{ vars.NOCACHE }}
##########################################################################
# Build optional dependencies (zlib, openssl, libssh) #
##########################################################################
- name: Cache Optional Dependencies
uses: "./.github/actions/cache"
id: cache-optional-dependencies
with:
path: |
${{github.workspace}}\zlib\current
${{github.workspace}}\openssl\current
${{github.workspace}}\libssh\current
${{github.workspace}}\libssh\current-gssapi
${{github.workspace}}\libdes\des
${{github.workspace}}\libdes\Release
${{github.workspace}}\libdes\Debug
${{github.workspace}}\kerberos\current
${{github.workspace}}\rexx
key: vs${{matrix.version.vs}}-${{ matrix.arch.id }}+zlib-${{env.ZLIB_VERSION}}+openssl-${{steps.cfg.outputs.openssl}}+${{env.OPENSSL_MAKE}}+libssh-${{env.LIBSSH_VERSION}}+dynamic+regina-${{env.REGINA_VERSION}}+rexxre+ver3
nocache: ${{ vars.NOCACHE }}
- name: Get libssh url group
if: steps.cache-optional-dependencies.outputs.cache-hit != 'true'
id: libssh-group
run: echo "val=${LIBSSH_VERSION%.*}" >> "$GITHUB_OUTPUT"
shell: bash
- name: Get dependencies
if: steps.cache-optional-dependencies.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}
run: |
# Get and unpack zlib
mkdir zlib
cd zlib
wget https://zlib.net/zlib-${{env.ZLIB_VERSION}}.tar.gz -outfile zlib-${{env.ZLIB_VERSION}}.tar.gz
7z x zlib-${{env.ZLIB_VERSION}}.tar.gz
7z x zlib-${{env.ZLIB_VERSION}}.tar
del zlib-${{env.ZLIB_VERSION}}.tar
del zlib-${{env.ZLIB_VERSION}}.tar.gz
ren zlib-${{env.ZLIB_VERSION}} current
dir current
cd ..
# Get and unpack openssl
cd openssl
wget "https://github.com/openssl/openssl/releases/download/openssl-${{steps.cfg.outputs.openssl}}/openssl-${{steps.cfg.outputs.openssl}}.tar.gz" -outfile openssl-${{steps.cfg.outputs.openssl}}.tar.gz
7z x openssl-${{steps.cfg.outputs.openssl}}.tar.gz
7z x openssl-${{steps.cfg.outputs.openssl}}.tar
del openssl-${{steps.cfg.outputs.openssl}}.tar
del openssl-${{steps.cfg.outputs.openssl}}.tar.gz
ren openssl-${{steps.cfg.outputs.openssl}} current
dir current
cd ..
# Get and unpack libssh
cd libssh
wget https://www.libssh.org/files/${{steps.libssh-group.outputs.val}}/libssh-${{env.LIBSSH_VERSION}}.tar.xz -outfile libssh-${{env.LIBSSH_VERSION}}.tar.xz
7z x libssh-${{env.LIBSSH_VERSION}}.tar.xz
7z x libssh-${{env.LIBSSH_VERSION}}.tar
del libssh-${{env.LIBSSH_VERSION}}.tar
del libssh-${{env.LIBSSH_VERSION}}.tar.xz
ren libssh-${{env.LIBSSH_VERSION}} current
cd current
mkdir build
cd ..
dir current
cd ..
# Get and unpack libdes
cd libdes
wget ${{env.LIBDES}} -outfile libdes.tar.gz
7z x libdes.tar.gz
7z x libdes.tar
del libdes.tar
del libdes.tar.gz
dir
cd ..
# Get KFW
echo Get KFW...
cd kerberos
if ("${{matrix.arch.id}}" -eq "x86") {
echo x86 platform: ${{env.KFW_x86}}
wget ${{env.KFW_x86}} -outfile kfw.msi
} else {
echo x86-64 platform: ${{env.KFW_x86}}
wget ${{env.KFW_x86_64}} -outfile kfw.msi
}
start-process msiexec -argumentlist "/a kfw.msi /qn TARGETDIR=${{github.workspace}}\kerberos\current" -wait
dir current
cd ..
# CD into the rexx directory
cd rexx
# Get Regina REXX
# need use -UserAgent "Wget" to skip advertising pages and normaly download
Invoke-WebRequest -UserAgent "Wget" -OutFile regina.tar.gz -Uri https://sourceforge.net/projects/regina-rexx/files/regina-rexx/${{env.REGINA_VERSION}}/regina-rexx-${{env.REGINA_VERSION}}.tar.gz/download
7z x regina.tar.gz
7z x regina.tar
del regina.tar
del regina.tar.gz
ren regina-rexx-${{env.REGINA_VERSION}} regina
dir regina
# RexxRE: Regular expressions for Regina REXX!
# expected filename: http://home.interlog.com/~ptjm/rexxre101.zip
# Should the original ever go down (its not been updated in over 20 years),
# a mirror is here:
# https://ftp.zx.net.nz/pub/dev/rexx/ptjm/rexxre101.zip
# Get RexxRE
wget http://home.interlog.com/~ptjm/rexxre101.zip -outfile rexxre.zip
7z x rexxre.zip
del rexxre.zip
dir rexxre
# CD out of the rexx directory
cd ..
# Install perl modules required by OpenSSL build
cpan -i Text::Template
shell: powershell
- name: Build zlib (x86/x86-64)
if: steps.cache-optional-dependencies.outputs.cache-hit != 'true' && (matrix.arch.id == 'x86' || matrix.arch.id == 'x64')
working-directory: zlib/current
run: |
cmake .
nmake -f win32\Makefile.msc
shell: cmd
- name: Build zlib (arm32/arm64)
if: steps.cache-optional-dependencies.outputs.cache-hit != 'true' && (matrix.arch.id == 'x64_arm' || matrix.arch.id == 'x64_arm64')
working-directory: zlib/current
run: |
cmake . -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release
nmake
shell: cmd
- name: Build openssl (x86)
if: steps.cache-optional-dependencies.outputs.cache-hit != 'true' && matrix.arch.id == 'x86'
working-directory: openssl/current
run: |
set PATH=%PATH%;${{github.workspace}}\tools\jom;${{github.workspace}}\tools\nasm
echo %PATH%
perl Configure VC-WIN32 zlib-dynamic --with-zlib-include=${{github.workspace}}\zlib\current ${{env.OPENSSL_EXTRA_BUILD_FLAGS}}
REM The linker by default marks the subsystem version too high for XP
REM and there isn't a way to fix that from the configure script, so
REM do it the hard way.
sed -i "s/subsystem:console/subsystem:console,5.01/g" makefile
${{env.OPENSSL_MAKE}}
shell: cmd
- name: Build openssl (x86-64)
if: steps.cache-optional-dependencies.outputs.cache-hit != 'true' && matrix.arch.id == 'x64'
working-directory: openssl/current
run: |
set PATH=%PATH%;${{github.workspace}}\tools\jom;${{github.workspace}}\tools\nasm
echo %PATH%
perl Configure VC-WIN64A zlib-dynamic --with-zlib-include=${{github.workspace}}\zlib\current ${{env.OPENSSL_EXTRA_BUILD_FLAGS}}
REM The linker by default marks the subsystem version too high for XP
REM and there isn't a way to fix that from the configure script, so
REM do it the hard way.
sed -i "s/subsystem:console/subsystem:console,5.01/g" makefile
${{env.OPENSSL_MAKE}}
shell: cmd
- name: Build openssl (ARM)
if: steps.cache-optional-dependencies.outputs.cache-hit != 'true' && matrix.arch.id == 'x64_arm'
working-directory: openssl/current
run: |
set PATH=%PATH%;${{github.workspace}}\tools\jom;${{github.workspace}}\tools\nasm
echo %PATH%
perl Configure VC-WIN32-ARM zlib-dynamic --with-zlib-include=${{github.workspace}}\zlib\current ${{env.OPENSSL_EXTRA_BUILD_FLAGS}}
${{env.OPENSSL_MAKE}}
shell: cmd
- name: Build openssl (ARM-64)
if: steps.cache-optional-dependencies.outputs.cache-hit != 'true' && matrix.arch.id == 'x64_arm64'
working-directory: openssl/current
run: |
set PATH=%PATH%;${{github.workspace}}\tools\jom;${{github.workspace}}\tools\nasm
echo %PATH%
perl Configure VC-WIN64-ARM zlib-dynamic --with-zlib-include=${{github.workspace}}\zlib\current ${{env.OPENSSL_EXTRA_BUILD_FLAGS}}
${{env.OPENSSL_MAKE}}
shell: cmd
- name: Build libssh (x86/x86-64, Vista+)
if: steps.cache-optional-dependencies.outputs.cache-hit != 'true' && (matrix.arch.id == 'x86' || matrix.arch.id == 'x64')
env:
ROOT: ${{ github.workspace }}
working-directory: libssh
run: |
set openssl_root_override=${{github.workspace}}\openssl\current
set zlib_root_override=${{github.workspace}}\zlib\current
call ${{ github.workspace }}\setenv.bat
REM /M - output directory for binaries and libraries (Move to)
REM /C - clean build
REM /R - release build
REM /W - build for Windows Vista or newer (not XP)
call build.bat /M out /C /R /W current
shell: cmd
- name: Build libssh (x86/x86-64, Vista+, GSSAPI)
if: steps.cache-optional-dependencies.outputs.cache-hit != 'true' && (matrix.arch.id == 'x86' || matrix.arch.id == 'x64')
env:
ROOT: ${{ github.workspace }}
working-directory: libssh
run: |
set openssl_root_override=${{github.workspace}}\openssl\current
set zlib_root_override=${{github.workspace}}\zlib\current
set k4w_root_override=${{github.workspace}}\${{ env.CK_K4W_PATH }}
call ${{ github.workspace }}\setenv.bat
REM /M - output directory for binaries and libraries (Move to)
REM /N - Name suffix (eg, "/N g" produces "sshg.dll" and "sshg.lib")
REM /G - GSSAPI build
REM /C - clean build
REM /R - release build
REM /W - build for Windows Vista or newer (not XP)
call build.bat /M out /N g /G /C /R /W current
shell: cmd
- name: Build libssh (x86/x86-64, XP)
if: steps.cache-optional-dependencies.outputs.cache-hit != 'true' && (matrix.arch.id == 'x86' || matrix.arch.id == 'x64') && (matrix.version.vs == '2015' || matrix.version.vs == '2017' || matrix.version.vs == '2019')
env:
ROOT: ${{ github.workspace }}
working-directory: libssh
run: |
set openssl_root_override=${{github.workspace}}\openssl\current
set zlib_root_override=${{github.workspace}}\zlib\current
call ${{ github.workspace }}\setenv.bat
REM /M - output directory for binaries and libraries (Move to)
REM /N - Name suffix (eg, "/N x" produces "sshx.dll" and "sshx.lib")
REM /G - GSSAPI build
REM /C - clean build
REM /R - release build
REM /X - build for Windows XP (removes a low impact security fix in 0.10.6, and disables thread local storage)
call build.bat /M out /N x /C /R /X current
shell: cmd
- name: Build libssh (x86/x86-64, XP, GSSAPI)
if: steps.cache-optional-dependencies.outputs.cache-hit != 'true' && (matrix.arch.id == 'x86' || matrix.arch.id == 'x64') && (matrix.version.vs == '2015' || matrix.version.vs == '2017' || matrix.version.vs == '2019')
env:
ROOT: ${{ github.workspace }}
working-directory: libssh
run: |
set openssl_root_override=${{github.workspace}}\openssl\current
set zlib_root_override=${{github.workspace}}\zlib\current
set k4w_root_override=${{github.workspace}}\${{ env.CK_K4W_PATH }}
call ${{ github.workspace }}\setenv.bat
REM /M - output directory for binaries and libraries (Move to)
REM /N - Name suffix (eg, "/N xg" produces "sshxg.dll" and "sshxg.lib")
REM /G - GSSAPI build
REM /C - clean build
REM /R - release build
REM /X - build for Windows XP (removes a low impact security fix in 0.10.6, and disables thread local storage)
call build.bat /M out /N gx /G /C /R /X current
shell: cmd
# zlib is currently disabled for ARM builds as it doesn't currently build for ARM
# On ARM32 we've got to specify the list of standard libraries ourselves as for some unknown reason advapi32.lib gets left off by default.
- name: Build libssh (arm32)
if: steps.cache-optional-dependencies.outputs.cache-hit != 'true' && matrix.arch.id == 'x64_arm'
working-directory: libssh/current/build
run: |
cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR=${{github.workspace}}\openssl\current -DZLIB_ROOT:PATH=${{github.workspace}}\zlib\current -DWITH_DSA=ON -DCMAKE_C_STANDARD_LIBRARIES="kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib"
nmake
shell: powershell
# zlib is currently disabled for ARM builds as it doesn't currently build for ARM
- name: Build libssh (arm64)
if: steps.cache-optional-dependencies.outputs.cache-hit != 'true' && matrix.arch.id == 'x64_arm64'
working-directory: libssh/current/build
run: |
cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR=${{github.workspace}}\openssl\current -DZLIB_ROOT:PATH=${{github.workspace}}\zlib\current -DWITH_DSA=ON
nmake
shell: powershell
- name: Build libdes
if: steps.cache-optional-dependencies.outputs.cache-hit != 'true'
working-directory: libdes
run: |
set PATH=%PATH%;${{github.workspace}}\tools\jom
set MAKE=jom
call mknt.bat
shell: cmd
- name: Build Regina REXX (x86)
if: steps.cache-optional-dependencies.outputs.cache-hit != 'true' && matrix.arch.id == 'x86'
working-directory: rexx
run: |
set REGINA_SRCDIR=${{github.workspace}}\rexx\regina
set PLATFORM=x86
cd regina
nmake -f makefile.win.vc
if not exist regina.dll exit /b 1
mkdir include
copy rexxsaa.h include
mkdir lib
copy regina.lib lib
cd ..
echo Building RexxRE
cd rexxre
patch -p1 < ..\rexxre.patch
nmake -f Makefile.NT
if not exist rexxre.dll exit /b 1
cd ..
shell: cmd
- name: Build Regina REXX (x86-64)
if: steps.cache-optional-dependencies.outputs.cache-hit != 'true' && matrix.arch.id == 'x64'
working-directory: rexx
run: |
set REGINA_SRCDIR=${{github.workspace}}\rexx\regina
set PLATFORM=x64
cd regina
nmake -f makefile.win.vc
if not exist regina.dll exit /b 1
mkdir include
copy rexxsaa.h include
mkdir lib
copy regina.lib lib
cd ..
echo Building RexxRE
cd rexxre
patch -p1 < ..\rexxre.patch
nmake -f Makefile.NT
if not exist rexxre.dll exit /b 1
cd ..
shell: cmd
# TODO: Regina REXX 3.9.6 doesn't support being cross-compiled to
# an incompatible target architecture:
#
# .\trexx D:\a\ckwin\ckwin\rexx\regina\common\fixrc.rexx D:\a\ckwin\ckwin\rexx\regina\rexxwinexe.rc .\rexxexe.rc 3.9.6 arm64 regina "29 Apr 2024"
# NMAKE : fatal error U1045: spawn failed for '.\trexx.EXE' : 0x800700d8
# This version of %1 is not compatible with the version of Windows
# you're running. Check your computer's system information and then
# contact the software publisher.
#
# - name: Build Regina REXX (arm64)
# if: steps.cache-optional-dependencies.outputs.cache-hit != 'true' && matrix.arch.id == 'x64_arm64'
# working-directory: rexx
# run: |
# set REGINA_SRCDIR=${{github.workspace}}\rexx\regina
# set PLATFORM=arm64
#
# cd regina
# nmake -f makefile.win.vc
# if not exist regina.dll exit /b 1
#
# mkdir include
# copy rexxsaa.h include
# mkdir lib
# copy regina.lib lib
# cd ..
#
# echo Building RexxRE
# cd rexxre
# patch -p1 < ..\rexxre.patch
# nmake -f Makefile.NT
# cd ..
# shell: cmd
- name: Fetch x86 wart
uses: actions/download-artifact@v4
if: matrix.arch.id != 'x86' && matrix.arch.id != 'x64'
with:
name: wart-x86
path: ${{ github.workspace }}
##########################################################################
# Build K95, K95G and other bits for redistribution #
##########################################################################
- name: Full Build
env:
ROOT: ${{ github.workspace }}
working-directory: kermit
run: |
set k4w_root_override=${{github.workspace}}\${{ env.CK_K4W_PATH }}
set openssl_root_override=${{github.workspace}}\openssl\current
set zlib_root_override=${{github.workspace}}\zlib\current
set libssh_root_override=${{github.workspace}}\libssh\current
set libssh_build_override=%libssh_root_override%\build
set rexx_root_override=${{github.workspace}}\rexx\regina\
call ${{ github.workspace }}\setenv.bat
set PATH=%PATH%;${{github.workspace}}\tools\jom
set MAKE=jom
REM Don't make PDBs as it causes intermittent problems with JOM that
REM /FS *should* solve, but seemingly doesn't.
REM TODO: Take another look at this sometime and see if we can fix it
REM properly.
set CKB_MAKE_PDB=no
REM If the target arch is incompatible with the host arch, use
REM the x86 version of ckwart.exe which should have been placed
REM in the workplace previously, rather than trying to use a
REM version of wart built for the target architecture.
if "%CKB_CROSS_COMPATIBLE%" == "no" set CKB_USE_WART=yes
if "%CKB_CROSS_COMPATIBLE%" == "no" set WART=${{github.workspace}}\ckwart.exe
cd p95
call mknt.bat
cd ..\k95
REM We only do dynamic SSH for x86 and x86-64 as at this time ARM only
REM has the single non-GSSAPI SSH backend to choose from.
if "%CKB_TARGET_ARCH%" == "x86" goto :build_ssh_dlls
if "%CKB_TARGET_ARCH%" == "AMD64" goto :build_ssh_dlls
goto :build_main
REM Support and build multiple SSH backends
:build_ssh_dlls
echo Enabling Dynamic SSH support
set CKF_DYNAMIC_SSH=yes
REM Vista+, GSSAPI-enabled
set SSH_LIB=sshg.lib
set CKF_SSH_DLL_VARIANT=g
call mksshdll.bat
ren k95ssh.dll k95sshg.dll
ren k95ssh.pdb k95sshg.pdb
del k95ssh.res
if "%CKB_XP_COMPATIBLE%" NEQ "yes" goto :noxp
REM XP only, no-GSSAPI
set SSH_LIB=sshx.lib
set CKF_SSH_DLL_VARIANT=x
call mksshdll.bat
ren k95ssh.dll k95sshx.dll
ren k95ssh.pdb k95sshx.pdb
del k95ssh.res
REM XP, GSSAPI-enabled
set SSH_LIB=sshgx.lib
set CKF_SSH_DLL_VARIANT=gx
call mksshdll.bat
ren k95ssh.dll k95sshgx.dll
ren k95ssh.pdb k95sshgx.pdb
del k95ssh.res
:noxp
REM Vista+, no-GSSAPI
REM built as part of the regular build (mk.bat)
set SSH_LIB=ssh.lib
set CKF_SSH_DLL_VARIANT=
:build_main
call mk.bat
call mkdist.bat
REM Check outputs
set MISSING_BUILD_RESULTS=
for %%y in (${{env.STANDARD_BUILD_OUTPUTS}}) do (
if not exist dist\%%y echo Build result not found: %%y
if not exist dist\%%y set MISSING_BUILD_RESULTS=%MISSING_BUILD_RESULTS% %%y
if not exist dist\%%y set FAILED=yes
)
if "%MISSING_BUILD_RESULTS%" NEQ "" echo Missing build outputs: %MISSING_BUILD_RESULTS%
if "%MISSING_BUILD_RESULTS%" NEQ "" echo One or more expected outputs are missing - failing build
if "%MISSING_BUILD_RESULTS%" NEQ "" exit /b 1
shell: cmd
- name: Fetch CA Certs bundle
uses: actions/download-artifact@v4
with:
name: ca_certs
path: ${{ github.workspace }}\kermit\k95\dist
- name: Fetch Docs
uses: actions/download-artifact@v4
with:
name: markdown-docs
path: ${{ github.workspace }}\kermit\k95\dist
- name: Prepare Artifact
working-directory: ${{ github.workspace }}\kermit\k95
run: |
move dist ${{ github.workspace }}\ckwin
shell: cmd
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: k95-vs${{matrix.version.vs}}-${{ matrix.arch.id }}
path: ${{ github.workspace }}\ckwin
if-no-files-found: error
retention-days: 7
##############################################################################
# Build with Windows 7 Platform SDK version 7.1 (Visual C++ 2010) #
##############################################################################
# This is the last compiler that can target Itanium. Due to its lack of C99
# support, builds with Visual C++ 2010 and older don't include SSH support.
# OpenSSL 1.1.1t is supported however.
Build-VS2010-PSDK71:
runs-on: windows-latest
needs: [Get-CACerts-Bundle, Prepare-Docs, Build-Wart]
strategy:
matrix:
arch:
- ia64
#- x86
#- x64
name: Build-VS2010-PSDK71 (${{matrix.arch}})
steps:
- uses: actions/checkout@v4
- name: Select env configuration
run: echo "CK_OPENSSL_VERSION=${{ env.OPENSSL_VERSION }}" >> "$GITHUB_ENV"
shell: bash
##########################################################################
# Load build tools #
##########################################################################
- name: Load Build Tools
uses: "./.github/actions/load-tools"
with:
nocache: ${{ vars.NOCACHE }}
##########################################################################
# Load the compiler #
##########################################################################
- name: Load Visual C++ 2010 and Windows 7 PSDK 7.1
uses: "./.github/actions/load-vs2010"
with:
nocache: ${{ vars.NOCACHE }}
##########################################################################
# Build optional dependencies (openssl, libdes) #
##########################################################################
- name: Cache Optional Dependencies
uses: "./.github/actions/cache"
id: cache-optional-dependencies
with:
path: |
${{github.workspace}}\zlib\current
${{github.workspace}}\openssl\current
${{github.workspace}}\libssh\current
${{github.workspace}}\libdes\des
${{github.workspace}}\libdes\Release
${{github.workspace}}\libdes\Debug
key: vs2010-psdk71-optdepts-${{ matrix.arch }}+nasm+openssl-${{env.CK_OPENSSL_VERSION}}+libdes+v3
nocache: ${{ vars.NOCACHE }}
- name: Get dependencies
if: steps.cache-optional-dependencies.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}
run: |
# Get and unpack openssl
cd openssl
wget https://github.com/openssl/openssl/releases/download/openssl-${{env.CK_OPENSSL_VERSION}}/openssl-${{env.CK_OPENSSL_VERSION}}.tar.gz -outfile openssl-${{env.CK_OPENSSL_VERSION}}.tar.gz
7z x openssl-${{env.CK_OPENSSL_VERSION}}.tar.gz
7z x openssl-${{env.CK_OPENSSL_VERSION}}.tar
del openssl-${{env.CK_OPENSSL_VERSION}}.tar
del openssl-${{env.CK_OPENSSL_VERSION}}.tar.gz
ren openssl-${{env.CK_OPENSSL_VERSION}} current
dir current
cd ..
# Get and unpack libdes
cd libdes
wget ${{env.LIBDES}} -outfile libdes.tar.gz
7z x libdes.tar.gz
7z x libdes.tar
del libdes.tar
del libdes.tar.gz
dir
cd ..
# Install perl modules required by OpenSSL build
cpan -i Text::Template
shell: powershell
- name: Build openssl (ia64)
if: steps.cache-optional-dependencies.outputs.cache-hit != 'true' && matrix.arch == 'ia64'
working-directory: openssl\current
run: |
SET PlatformToolset=100
set PATH=%PATH%;${{github.workspace}}\tools\jom
call ${{ github.workspace }}\vc10.cmd /release /xp /${{matrix.arch}}
perl Configure VC-WIN64I -D"_WIN32_WINNT=0x502"
REM The perl configure script doesn't work quite right for cross-compiling to IA64
REM it leaves the /machine flag off the link flags, so we'll just add it on ourselves.
sed -i "s/^LDFLAGS=\/nologo.*/& \/machine:ia64/g" makefile
nmake
shell: cmd
- name: Build openssl (x86-64)
if: steps.cache-optional-dependencies.outputs.cache-hit != 'true' && matrix.arch == 'x64'
working-directory: openssl\current
run: |
SET PlatformToolset=100
call ${{ github.workspace }}\vc10.cmd /release /xp /${{matrix.arch}}
set PATH=%PATH%;${{github.workspace}}\tools\nasm;${{github.workspace}}\tools\jom
perl Configure VC-WIN64A -D"_WIN32_WINNT=0x502"
REM The perl configure script doesn't work quite right for cross-compiling to x64
REM it leaves the /machine flag off the link flags, so we'll just add it on ourselves.
sed -i "s/^LDFLAGS=\/nologo.*/& \/machine:x64/g" makefile
nmake
shell: cmd
- name: Build openssl (x86)
if: steps.cache-optional-dependencies.outputs.cache-hit != 'true' && matrix.arch == 'x86'
working-directory: openssl\current
run: |
SET PlatformToolset=100
call ${{ github.workspace }}\vc10.cmd /release /xp /${{matrix.arch}}
set PATH=%PATH%;${{github.workspace}}\tools\nasm;${{github.workspace}}\tools\jom
perl Configure VC-WIN32 -D"_WIN32_WINNT=0x502"
nmake
shell: cmd
- name: Build libdes
if: steps.cache-optional-dependencies.outputs.cache-hit != 'true'
working-directory: libdes
run: |
SET PlatformToolset=100
call ${{ github.workspace }}\vc10.cmd /release /xp /${{matrix.arch}}
set PATH=%PATH%;${{github.workspace}}\tools\jom
set MAKE=jom
call mknt.bat
shell: cmd
- name: Fetch x86 wart
uses: actions/download-artifact@v4
if: matrix.arch == 'ia64'
with:
name: wart-x86
path: ${{ github.workspace }}
##########################################################################
# Build K95, K95G and other bits for redistribution #
##########################################################################
- name: Full Build
env:
ROOT: ${{ github.workspace }}
working-directory: kermit
run: |
echo Configure Platform SDK Build Environment...
SET PlatformToolset=100
call ${{ github.workspace }}\vc10.cmd /release /xp /${{matrix.arch}}
echo Configure build environment...
set openssl_root_override=${{github.workspace}}\openssl\current
call ${{ github.workspace }}\setenv.bat
set PATH=%PATH%;${{github.workspace}}\tools\jom
set MAKE=jom
if "%CKB_CROSS_COMPATIBLE%" == "no" set CKB_USE_WART=yes
if "%CKB_CROSS_COMPATIBLE%" == "no" set WART=${{github.workspace}}\ckwart.exe
echo Run Build...
cd p95
call mknt.bat
cd ..\k95
call mk.bat
call mkdist.bat
echo Check outputs...
set MISSING_BUILD_RESULTS=
for %%y in (${{env.STANDARD_BUILD_OUTPUTS}}) do (
if not exist dist\%%y echo Build result not found: %%y
if not exist dist\%%y set MISSING_BUILD_RESULTS=%MISSING_BUILD_RESULTS% %%y
if not exist dist\%%y set FAILED=yes
)
if "%MISSING_BUILD_RESULTS%" NEQ "" echo Missing build outputs: %MISSING_BUILD_RESULTS%
if "%MISSING_BUILD_RESULTS%" NEQ "" echo One or more expected outputs are missing - failing build
if "%MISSING_BUILD_RESULTS%" NEQ "" exit /b 1
shell: cmd
- name: Fetch CA Certs bundle
uses: actions/download-artifact@v4
with:
name: ca_certs
path: ${{ github.workspace }}\kermit\k95\dist
- name: Fetch Docs
uses: actions/download-artifact@v4
with:
name: markdown-docs
path: ${{ github.workspace }}\kermit\k95\dist
# Builds with Visual C++ 2010 don't support SSH so don't need the SSH Readme
- name: Remove SSH Readme
run: del ${{ github.workspace }}\kermit\k95\dist\ssh-readme.html
shell: cmd
- name: Prepare Artifact
working-directory: ${{ github.workspace }}\kermit\k95
run: |
move dist ${{ github.workspace }}\ckwin
shell: cmd
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: k95-vs2010-${{ matrix.arch }}
path: ${{ github.workspace }}\ckwin
if-no-files-found: error
retention-days: 7
###############################################################################
# Build with Open Watcom which allows targeting older versions of Windows #
###############################################################################
# It is also likely to be upset by the same sorts of things as Visual C++ 6
# which reduces the likelihood of accidentally breaking that compiler.
Build-OpenWatcom19-Win32:
runs-on: windows-latest
needs: Prepare-Docs
strategy:
matrix:
ver:
- '1.9'
id:
- 'nt'
name: Build-Open-Watcom-${{matrix.ver}} (${{matrix.id}})
steps:
- uses: actions/checkout@v4
- name: Load Open Watcom
uses: "./.github/actions/load-watcom"
with:
nocache: ${{vars.NOCACHE}}
ver: ${{matrix.ver}}
id: ${{matrix.id}}
- name: Cache openzinc
uses: "./.github/actions/cache"
id: cache-openzinc
with:
path: |
${{github.workspace}}\zinc
key: all-openzinc
nocache: ${{ vars.NOCACHE }}
- name: Get openzinc
if: steps.cache-openzinc.outputs.cache-hit != 'true'
run: |
mkdir zinc
cd zinc
wget ${{ env.OPENZINC }} -outfile OZ1.zip
7z x OZ1.zip
cd ..
shell: powershell
- name: Full Build
env:
ROOT: ${{ github.workspace }}
working-directory: kermit
run: |
call ${{ github.workspace }}\setenv.bat
REM Enable Dynamic SSH just to be sure those bits are buildable
REM with Open Watcom
set CKF_SSH=yes
set CKF_DYNAMIC_SSH=yes
cd p95
call mknt.bat
cd ..\k95
call mk.bat
call mkdist.bat
REM Check outputs
REM ctl3d.exe
set MISSING_BUILD_RESULTS=
REM Can't use STANDARD_BUILD_OUTPUTS as we're not building k95crypt.dll
REM here for some reason.
for %%y in (k95.exe iksd.exe iksdsvc.exe k95d.exe rlogin.exe telnet.exe textps.exe k95g.exe p95.dll) do (
if not exist dist\%%y echo Build result not found: %%y
if not exist dist\%%y set MISSING_BUILD_RESULTS=%MISSING_BUILD_RESULTS% %%y
if not exist dist\%%y set FAILED=yes
)
if "%MISSING_BUILD_RESULTS%" NEQ "" echo Missing build outputs: %MISSING_BUILD_RESULTS%
if "%MISSING_BUILD_RESULTS%" NEQ "" echo One or more expected outputs are missing - failing build
if "%MISSING_BUILD_RESULTS%" NEQ "" exit /b 1
shell: cmd
- name: Dialer Build
env:
ROOT: ${{ github.workspace }}
working-directory: kermit\dialer
run: |
call ${{ github.workspace }}\setenv.bat
call mk.bat
call mkdist.bat
set MISSING_BUILD_RESULTS=
for %%y in (k95dial.exe k95regtl.exe) do (
if not exist dist\%%y echo Build result not found: %%y
if not exist dist\%%y set MISSING_BUILD_RESULTS=%MISSING_BUILD_RESULTS% %%y
if not exist dist\%%y set FAILED=yes
)
if "%MISSING_BUILD_RESULTS%" NEQ "" echo Missing build outputs: %MISSING_BUILD_RESULTS%
if "%MISSING_BUILD_RESULTS%" NEQ "" echo One or more expected outputs are missing - failing build
if "%MISSING_BUILD_RESULTS%" NEQ "" exit /b 1
shell: cmd
- name: Prepare Artifacts
working-directory: ${{ github.workspace }}\kermit\k95
run: |
move dist ${{ github.workspace }}\ckwin
move ..\dialer\dist ${{ github.workspace }}\dialer
shell: cmd
- name: Fetch Docs
uses: actions/download-artifact@v4
with:
name: markdown-docs
path: ${{ github.workspace }}\ckwin
# ctl3dins is a utility for installing ctl3d32 and, in some cases,
# the Visual C++ runtime. Builds of the Dialer done with Open Watcom
# can't use ctl3d32 (it a Visual C++ thing), and they don't need the
# Visual C++ runtime, so ctl3dins.exe serves no purpose here. Even
# worse, Microsoft AntiVirus frequently misdetects it as being a
# virus (Trojan:Win32/Wacatac.B!ml) making the artifact difficult
# to download. So... just exclude ctl3dins from OpenWatcom-built
# artifacts.
- name: Remove ctl3dins.exe
run: del ${{ github.workspace }}\ckwin\ctl3dins.exe
shell: cmd
# Open Watcom builds don't include SSH so don't need the SSH Readme
- name: Remove SSH Readme
run: del ${{ github.workspace }}\ckwin\ssh-readme.html
shell: cmd
- name: Upload K95 Artifact
uses: actions/upload-artifact@v4
with:
name: k95-ow${{matrix.ver}}-x86
path: ${{ github.workspace }}\ckwin
if-no-files-found: error
retention-days: 7
- name: Upload Dialer Artifact
uses: actions/upload-artifact@v4
with:
name: dialer-ow${{matrix.ver}}-x86
path: ${{ github.workspace }}\dialer
if-no-files-found: error
retention-days: 7
Build-OpenWatcom19-Win32-NT-legacy:
runs-on: windows-latest
needs: Prepare-Docs
strategy:
matrix:
ver:
- '1.9'
id:
- 'nt-legacy'
name: Build-Open-Watcom-${{matrix.ver}} (${{matrix.id}})
steps:
- uses: actions/checkout@v4
- name: Load Open Watcom
uses: "./.github/actions/load-watcom"
with:
nocache: ${{ vars.NOCACHE }}
ver: ${{matrix.ver}}
id: ${{matrix.id}}
- name: Full Build
env:
ROOT: ${{ github.workspace }}
working-directory: kermit
run: |
REM Build for Windows NT 3.50 (and, someday, NT 3.1)
set CKT_NT31=yes
call ${{ github.workspace }}\setenv.bat
cd p95
call mknt.bat
cd ..\k95
call mk.bat
call mkdist.bat
REM Check outputs
REM ctl3d.exe
set MISSING_BUILD_RESULTS=
REM Can't use STANDARD_BUILD_OUTPUTS as we're not building k95crypt.dll
REM here for some reason.
for %%y in (k95.exe iksd.exe iksdsvc.exe k95d.exe rlogin.exe telnet.exe textps.exe k95g.exe p95.dll) do (
if not exist dist\%%y echo Build result not found: %%y
if not exist dist\%%y set MISSING_BUILD_RESULTS=%MISSING_BUILD_RESULTS% %%y
if not exist dist\%%y set FAILED=yes
)
if "%MISSING_BUILD_RESULTS%" NEQ "" echo Missing build outputs: %MISSING_BUILD_RESULTS%
if "%MISSING_BUILD_RESULTS%" NEQ "" echo One or more expected outputs are missing - failing build
if "%MISSING_BUILD_RESULTS%" NEQ "" exit /b 1
shell: cmd
- name: Fetch Docs
uses: actions/download-artifact@v4
with:
name: markdown-docs
path: ${{ github.workspace }}\ckwin
# ctl3dins is a utility for installing ctl3d32 and, in some cases,
# the Visual C++ runtime. Builds of the Dialer done with Open Watcom
# can't use ctl3d32 (it a Visual C++ thing), and they don't need the
# Visual C++ runtime, so ctl3dins.exe serves no purpose here. Even
# worse, Microsoft AntiVirus frequently misdetects it as being a
# virus (Trojan:Win32/Wacatac.B!ml) making the artifact difficult
# to download. So... just exclude ctl3dins from OpenWatcom-built
# artifacts.
- name: Remove ctl3dins.exe
run: del ${{ github.workspace }}\ckwin\ctl3dins.exe
shell: cmd
# Open Watcom builds don't include SSH so don't need the SSH Readme
- name: Remove SSH Readme
run: del ${{ github.workspace }}\ckwin\ssh-readme.html
shell: cmd
- name: Prepare Artifact
working-directory: ${{ github.workspace }}\kermit\k95
run: |
move dist ${{ github.workspace }}\ckwin
shell: cmd
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: k95-ow${{matrix.ver}}-x86-nt350
path: ${{ github.workspace }}\ckwin
if-no-files-found: error
retention-days: 7
##############################################################################
# Build C-Kermit for OS/2 with Open Watcom which can cross-compile #
##############################################################################
Build-OpenWatcom19-OS2:
runs-on: windows-latest
strategy:
matrix:
ver:
- '1.9'
id:
- 'os2'
name: Build-Open-Watcom-${{matrix.ver}} (${{matrix.id}})
steps:
- uses: actions/checkout@v4
- name: Load Open Watcom
uses: "./.github/actions/load-watcom"
with:
nocache: ${{ vars.NOCACHE }}
ver: ${{matrix.ver}}
id: ${{matrix.id}}
- name: Load Build Tools
uses: "./.github/actions/load-tools"
with:
nocache: ${{ vars.NOCACHE }}
- name: Cache dependencies
uses: "./.github/actions/cache"
id: cache-dependencies
with:
path: |
${{github.workspace}}\zinc
key: all-openzinc
nocache: ${{ vars.NOCACHE }}
- name: Get dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}
run: |
mkdir zinc
cd zinc
wget ${{ env.OPENZINC }} -outfile OZ1.zip
7z x OZ1.zip
cd ..
shell: powershell
- name: Kermit/2 Build
env:
ROOT: ${{ github.workspace }}
working-directory: kermit
run: |
set ibm20dir_override=${{ github.workspace }}\tools\os2tk45
call ${{ github.workspace }}\setenv.bat
REM Enable Dynamic SSH just to be sure those bits are buildable
REM for OS/2 with Open Watcom
set CKF_SSH=yes
set CKF_DYNAMIC_SSH=yes
REM Don't build the libssh backend though - that hasn't been ported
REM to OS/2 yet
set CKF_SSH_BACKEND=no
cd p95
call mkos2.bat
cd ..\k95
call mkos2.bat
call mkdist-os2.bat
REM Check outputs
set MISSING_BUILD_RESULTS=
for %%y in (${{env.OS2_BUILD_OUTPUTS}}) do (
if not exist dist-os2\%%y echo Build result not found: %%y
if not exist dist-os2\%%y set MISSING_BUILD_RESULTS=%MISSING_BUILD_RESULTS% %%y
if not exist dist-os2\%%y set FAILED=yes
)
if "%MISSING_BUILD_RESULTS%" NEQ "" echo Missing build outputs: %MISSING_BUILD_RESULTS%
if "%MISSING_BUILD_RESULTS%" NEQ "" echo One or more expected outputs are missing - failing build
if "%MISSING_BUILD_RESULTS%" NEQ "" exit /b 1
shell: cmd
- name: Dialer Build
env:
ROOT: ${{ github.workspace }}
working-directory: kermit\dialer
run: |
call ${{ github.workspace }}\setenv.bat
call mkos2.bat
shell: cmd
- name: Make Dialer Distribution
env:
ROOT: ${{ github.workspace }}
working-directory: kermit\dialer
run: mkdist-os2.bat
shell: cmd
- name: Prepare Artifact
working-directory: ${{ github.workspace }}\kermit\k95
run: |
move ..\dialer\dist-os2\* dist-os2\
move dist-os2 ${{ github.workspace }}\ckos2
cd ${{ github.workspace }}\ckos2
echo Making full distribution archive K2PACK.EXE
${{ github.workspace }}\info-zip\zip.exe -r -5 -v -o k2pack * -x setup.exe
copy /b ${{ github.workspace }}\info-zip\os2\unzipsfx.exe + k2pack.zip K2PACK.EXE
del k2pack.zip
mkdir ${{ github.workspace }}\dist-full
move K2PACK.EXE ${{ github.workspace }}\dist-full\
copy setup.exe ${{ github.workspace }}\dist-full\
echo Making minimal distribution
REM This is basically everything but the dialer. Its small enough to fit on a
REM single floppy disk alongisde setup.exe
${{ github.workspace }}\info-zip\zip.exe -r -5 -v -o k2pack-mini k2.* k2clip.exe cko32*.dll p*.dll pcfonts.dll rlogin.exe telnetpm*.exe textps.exe docs download eas icons keymaps phones printer public scripts tmp users
copy /b ${{ github.workspace }}\info-zip\os2\unzipsfx.exe + k2pack-mini.zip K2PACK.EXE
del k2pack-mini.zip
mkdir ${{ github.workspace }}\dist-mini
move K2PACK.EXE ${{ github.workspace }}\dist-mini\
copy setup.exe ${{ github.workspace }}\dist-mini\
shell: cmd
- name: Upload Zip Artifact
uses: actions/upload-artifact@v4
with:
name: k2-ow${{matrix.ver}}-x86
path: ${{ github.workspace }}\ckos2
if-no-files-found: error
retention-days: 7
- name: Upload Full Installer Artifact
uses: actions/upload-artifact@v4
with:
name: k2-full-install
path: ${{ github.workspace }}\dist-full
if-no-files-found: error
retention-days: 7
- name: Upload Minimal Installer Artifact
uses: actions/upload-artifact@v4
with:
name: k2-mini-install
path: ${{ github.workspace }}\dist-mini
if-no-files-found: error
retention-days: 7
##############################################################################
# Build with Visual C++ 2003 Toolkit + Windows Server 2003 SP1 Platform SDK #
##############################################################################
# This is the oldest freely available compiler from Microsoft. The bits come
# from the Visual C++ 2003 Toolkit, the Windows Server 2003 SP1 Platform SDK
# as described here:
# https://epics.anl.gov/base/msvctk.php
Build-VCT2003-PSDK2003:
runs-on: windows-latest
needs: [Get-CACerts-Bundle, Prepare-Docs]
strategy:
matrix:
arch:
- x86
# Do a build using ancient and insecure libraries like libsrp, k4w
# and SuperLAT? This is *purely* for checking support with these
# otherwise rarely tested build options doesn't get accidentlaly
# broken.
legacy_dependencies:
- yes
- no
name: Build-VS2003-PSDK2003 (${{matrix.arch}}, ${{matrix.legacy_dependencies}})
steps:
- uses: actions/checkout@v4
# We need this only to get cvtres.exe which didn't come with either the
# Visual C++ 2003 Toolkit or the Windows Server 2003 SP1 Platform SDK.
- name: Enable Developer Command Prompt
# You may pin to the exact commit or the version.
# uses: ilammy/msvc-dev-cmd@d8610e2b41c6d0f0c3b4c46dad8df0fd826c68e1
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86
- name: Load Build Tools
uses: "./.github/actions/load-tools"
with:
nocache: ${{ vars.NOCACHE }}
# Load the Visual C++ 2003 Toolkit & Platform SDK from cache because it takes
# quite a while to download and decompress and I don't want my FTP
# server being hit constantly to download this whenever a build runs.
- name: Load Visual C++ 2003 Toolkit and Platform SDK 2003
uses: "./.github/actions/load-vs2003"
with:
nocache: ${{ vars.NOCACHE }}
arch: ${{matrix.arch}}
- name: Cache legacy dependencies
if: matrix.legacy_dependencies == 'yes'
uses: "./.github/actions/cache"
id: cache-legacy-deps
with:
path: |
${{github.workspace}}\srp-2.1.2
${{github.workspace}}\openssl\1.0.1u
${{github.workspace}}\kerberos\kfw-2.6.5
${{github.workspace}}\libdes\des
${{github.workspace}}\libdes\Release
${{github.workspace}}\libdes\Debug
${{github.workspace}}\superlat
key: libdes+libsrp+openssl-1.0.1u+superlat+kfw-2.6.5-ver2
nocache: ${{ vars.NOCACHE }}
- name: Get Legacy Dependencies
if: steps.cache-legacy-deps.outputs.cache-hit != 'true' && matrix.legacy_dependencies == 'yes'
run: |
# Make sure everything is clean
#Remove-Item -Recurse -Force libdes\des
#Remove-Item -Recurse -Force libdes\Release
#Remove-Item -Recurse -Force libdes\Debug
#Remove-Item -Recurse -Force kerberos\kfw-2.6.5
#Remove-Item -Recurse -Force openssl\1.0.1u
#Remove-Item -Recurse -Force srp-2.1.2
# Get and unpack libdes
cd libdes
wget ${{env.LIBDES}} -outfile libdes.tar.gz
7z x libdes.tar.gz
7z x libdes.tar
del libdes.tar
del libdes.tar.gz
dir
cd ..
# and libsrp
wget http://srp.stanford.edu/source/srp-2.1.2.tar.gz -outfile srp-2.1.2.tar.gz
7z x srp-2.1.2.tar.gz
7z x srp-2.1.2.tar
del srp-2.1.2.tar
del srp-2.1.2.tar.gz
copy srp\* srp-2.1.2
dir srp-2.1.2
# and openssl
cd openssl
wget https://github.com/openssl/openssl/releases/download/OpenSSL_1_0_1u/openssl-1.0.1u.tar.gz -outfile openssl-1.0.1u.tar.gz
7z x openssl-1.0.1u.tar.gz
7z x openssl-1.0.1u.tar
del openssl-1.0.1u.tar
del openssl-1.0.1u.tar.gz
ren openssl-1.0.1u 1.0.1u
dir 1.0.1u
cd ..
# and kerberos for windows 2.6.0 (pre-built with Visual C++ 2003 Professional)
cd kerberos
wget https://ftp.zx.net.nz/pub/dev/lib/kfw/kfw-2.6-final-vc2003.zip -outfile kfw-2.6-final-vc2003.zip
7z x kfw-2.6-final-vc2003.zip
del kfw-2.6-final-vc2003.zip
ren kfw-2.6-final kfw-2.6.5
dir kfw-2.6.5
cd ..
# SuperLAT Headers
mkdir superlat
cd superlat
wget https://web.archive.org/web/20000929005919if_/http://www.meridian.com:80/slatfio.zip -outfile slatfio.zip
7z x slatfio.zip
mkdir include
cd include
copy ..\TESTSVC\LATIOC.H
copy ..\TESTSVC\NETTYPES.H
copy ..\TESTSVC\NTDDTDI.H
copy ..\TESTSVC\PACKOFF.H
copy ..\TESTSVC\PACKON.H
copy ..\TESTSVC\TDI.H
copy ..\TESTSVC\TIHDR.H
cd ..
Remove-Item -Recurse -Force TESTSVC
Remove-Item -Recurse -Force CONN
del README.1ST
del slatfio.zip
dir
cd ..
# Install perl modules required by OpenSSL build
cpan -i Text::Template
shell: powershell
- name: Build libdes
if: steps.cache-legacy-deps.outputs.cache-hit != 'true' && matrix.legacy_dependencies == 'yes'
working-directory: libdes
run: |
set CKB_STATIC_CRT_NT=yes
set PATH=%PATH%;${{github.workspace}}\tools\jom
set MAKE=jom
call mknt.bat
shell: cmd
- name: Build openssl
if: steps.cache-legacy-deps.outputs.cache-hit != 'true' && matrix.legacy_dependencies == 'yes'
working-directory: openssl\1.0.1u
run: |
REM *************************************
REM Fix for bug in VCT2003
REM missing setargv.obj for x86 target
REM used by openssl only
REM *************************************
cl /nologo /c ${{github.workspace}}\openssl\setargv.c /Fosetargv.obj
set PATH=%PATH%;${{github.workspace}}\tools\nasm
perl Configure VC-WIN32 enable-static-engine
call ms\do_ms.bat
REM adjust the makefile to statically link
sed -i "s/\/MD /\/MT /g" ms\ntdll.mak
nmake -f ms\ntdll.mak
shell: cmd
- name: Build libsrp
if: steps.cache-legacy-deps.outputs.cache-hit != 'true' && matrix.legacy_dependencies == 'yes'
env:
ROOT: ${{ github.workspace }}
working-directory: srp-2.1.2
run: |
set CKB_STATIC_CRT_NT=yes
set openssl_root_override=${{ github.workspace }}\openssl\1.0.1u
set srp_root_override=${{ github.workspace }}\srp-2.1.2
call ${{ github.workspace }}\setenv.bat
call mknt.bat
shell: cmd
- name: Full Build
env:
ROOT: ${{ github.workspace }}
working-directory: kermit
run: |
set openssl_root_override=${{ github.workspace }}\openssl\1.0.1u
set srp_root_override=${{ github.workspace }}\srp-2.1.2
set k4w_root_override=${{ github.workspace }}\kerberos\kfw-2.6.5\src
call ${{ github.workspace }}\setenv.bat
set PATH=%PATH%;${{github.workspace}}\tools\jom
set MAKE=jom
REM The Visual C++ 2003 Toolkit can only statically link the C Runtime
REM (though apparently you can get the required import library for
REM dynamic linking from the .NET SDK 1.1)
set CKB_STATIC_CRT_NT=yes
echo Building p95...
cd p95
call mknt.bat
echo Building K95...
cd ..\k95
call mk.bat
call mkdist.bat
REM Check outputs
set MISSING_BUILD_RESULTS=
REM ctl3dins.exe
for %%y in (k95.exe iksd.exe iksdsvc.exe k95d.exe rlogin.exe telnet.exe textps.exe k95g.exe p95.dll) do (
if not exist dist\%%y echo Build result not found: %%y
if not exist dist\%%y set MISSING_BUILD_RESULTS=%MISSING_BUILD_RESULTS% %%y
if not exist dist\%%y set FAILED=yes
)
if "%MISSING_BUILD_RESULTS%" NEQ "" echo Missing build outputs: %MISSING_BUILD_RESULTS%
if "%MISSING_BUILD_RESULTS%" NEQ "" echo One or more expected outputs are missing - failing build
if "%MISSING_BUILD_RESULTS%" NEQ "" exit /b 1
shell: cmd
- name: Full Build Non-standard configs
env:
ROOT: ${{ github.workspace }}
working-directory: kermit
run: |
set openssl_root_override=${{ github.workspace }}\openssl\1.0.1u
set srp_root_override=${{ github.workspace }}\srp-2.1.2
set k4w_root_override=${{ github.workspace }}\kerberos\kfw-2.6.5\src
call ${{ github.workspace }}\setenv.bat
set PATH=%PATH%;${{github.workspace}}\tools\jom
set MAKE=jom
REM The Visual C++ 2003 Toolkit can only statically link the C Runtime
REM (though apparently you can get the required import library for
REM dynamic linking from the .NET SDK 1.1)
set CKB_STATIC_CRT_NT=yes
cd k95
echo Cleaning...
call clean.bat
echo Building kui...
call mkkui.bat
mkdir dist-misc
move *.exe dist-misc
REM Check outputs
set MISSING_BUILD_RESULTS=
for %%y in (cknkui.exe) do (
if not exist dist-misc\%%y echo Build result not found: %%y
if not exist dist-misc\%%y set MISSING_BUILD_RESULTS=%MISSING_BUILD_RESULTS% %%y
if not exist dist-misc\%%y set FAILED=yes
)
if "%MISSING_BUILD_RESULTS%" NEQ "" echo Missing build outputs: %MISSING_BUILD_RESULTS%
if "%MISSING_BUILD_RESULTS%" NEQ "" echo One or more expected outputs are missing - failing build
if "%MISSING_BUILD_RESULTS%" NEQ "" exit /b 1
shell: cmd
- name: Check additional legacy outputs
if: matrix.legacy_dependencies == 'yes'
working-directory: ${{ github.workspace }}\kermit\k95
run: |
REM Check outputs
set MISSING_BUILD_RESULTS=
REM TODO: srp-tconf.exe srp-passwd.exe
REM TODO: Kerberos bits
for %%y in (k95crypt.dll) do (
if not exist dist\%%y echo Build result not found: %%y
if not exist dist\%%y set MISSING_BUILD_RESULTS=%MISSING_BUILD_RESULTS% %%y
if not exist dist\%%y set FAILED=yes
)
if "%MISSING_BUILD_RESULTS%" NEQ "" echo Missing legacy build outputs: %MISSING_BUILD_RESULTS%
if "%MISSING_BUILD_RESULTS%" NEQ "" echo One or more expected outputs are missing - failing build
if "%MISSING_BUILD_RESULTS%" NEQ "" exit /b 1
shell: cmd
- name: Fetch CA Certs bundle
if: matrix.legacy_dependencies == 'yes'
uses: actions/download-artifact@v4
with:
name: ca_certs
path: ${{ github.workspace }}\kermit\k95\dist
- name: Fetch Docs
uses: actions/download-artifact@v4
with:
name: markdown-docs
path: ${{ github.workspace }}\kermit\k95\dist
# Builds with Visual C++ 2003 include SSH so don't need the SSH Readme
- name: Remove SSH Readme
run: del ${{ github.workspace }}\kermit\k95\dist\ssh-readme.html
shell: cmd
- name: Prepare Artifact
working-directory: ${{ github.workspace }}\kermit\k95
run: |
move dist ${{ github.workspace }}\ckwin
move dist-misc ${{ github.workspace }}\ckwin-extra
shell: cmd
- name: Upload Artifact
uses: actions/upload-artifact@v4
if: matrix.legacy_dependencies == 'no'
with:
name: k95-vs2003-x86
path: ${{ github.workspace }}\ckwin
if-no-files-found: error
retention-days: 7
- name: Upload Artifact (extra)
uses: actions/upload-artifact@v4
if: matrix.legacy_dependencies == 'no'
with:
name: k95-vs2003-x86-extra
path: ${{ github.workspace }}\ckwin-extra
if-no-files-found: error
retention-days: 7
- name: Upload Artifact (legacy)
uses: actions/upload-artifact@v4
if: matrix.legacy_dependencies == 'yes'
with:
name: k95-vs2003-x86-insecure
path: ${{ github.workspace }}\ckwin
if-no-files-found: error
retention-days: 7
- name: Upload Artifact (legacy-extra)
uses: actions/upload-artifact@v4
if: matrix.legacy_dependencies == 'yes'
with:
name: k95-vs2003-x86-insecure-extra
path: ${{ github.workspace }}\ckwin-extra
if-no-files-found: error
retention-days: 7
##############################################################################
# Build for Itanium with the Windows Server 2003 SP1 Platform SDK #
##############################################################################
# This uses Visual C++ 2005
#
Build-PSDK2003SP1-IA64:
runs-on: windows-latest
needs: [Prepare-Docs, Build-Wart]
strategy:
matrix:
arch:
- ia64
name: Build-VS2003-PSDK2003 (${{matrix.arch}})
steps:
- uses: actions/checkout@v4
# We need this only to get cvtres.exe which didn't come with either the
# Visual C++ 2003 Toolkit or the Windows Server 2003 SP1 Platform SDK.
- name: Enable Developer Command Prompt
# You may pin to the exact commit or the version.
# uses: ilammy/msvc-dev-cmd@d8610e2b41c6d0f0c3b4c46dad8df0fd826c68e1
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86
- name: Load Build Tools
uses: "./.github/actions/load-tools"
with:
nocache: ${{ vars.NOCACHE }}
- name: Load Visual C++ 2003 Toolkit and Platform SDK 2003
uses: "./.github/actions/load-vs2003"
with:
nocache: ${{ vars.NOCACHE }}
arch: ${{matrix.arch}}
- name: Cache libdes
uses: "./.github/actions/cache"
id: cache-libdes
with:
path: |
${{github.workspace}}\libdes\des
${{github.workspace}}\libdes\Release
${{github.workspace}}\libdes\Debug
key: vs2003-libdes+v2
nocache: ${{ vars.NOCACHE }}
- name: Get libdes
if: steps.cache-libdes.outputs.cache-hit != 'true'
run: |
# Get and unpack libdes
cd libdes
wget ${{env.LIBDES}} -outfile libdes.tar.gz
7z x libdes.tar.gz
7z x libdes.tar
del libdes.tar
del libdes.tar.gz
cd ..
shell: powershell
- name: Build libdes
if: steps.cache-libdes.outputs.cache-hit != 'true'
env:
ROOT: ${{ github.workspace }}
working-directory: libdes
run: |
call ${{ github.workspace }}\setenv.bat
REM Use the supplied x86 build of wart rather than building it for
REM itanium then fail to run it on the not-itanium build host
set CKB_USE_WART=yes
set WART=${{github.workspace}}\ckwart.exe
set PATH=%PATH%;${{github.workspace}}\tools\jom
set MAKE=jom
call mknt.bat
shell: cmd
- name: Fetch x86 wart
uses: actions/download-artifact@v4
with:
name: wart-x86
path: ${{ github.workspace }}
- name: Full Build
env:
ROOT: ${{ github.workspace }}
working-directory: kermit
run: |
call ${{ github.workspace }}\setenv.bat
REM Use the supplied x86 build of wart rather than building it for
REM itanium then fail to run it on the not-itanium build host
set CKB_USE_WART=yes
set WART=${{github.workspace}}\ckwart.exe
set PATH=%PATH%;${{github.workspace}}\tools\jom
set MAKE=jom
cd p95
call mknt.bat
cd ..\k95
call mk.bat
call mkdist.bat
REM Check outputs
set MISSING_BUILD_RESULTS=
for %%y in (${{env.STANDARD_BUILD_OUTPUTS}}) do (
if not exist dist\%%y echo Build result not found: %%y
if not exist dist\%%y set MISSING_BUILD_RESULTS=%MISSING_BUILD_RESULTS% %%y
if not exist dist\%%y set FAILED=yes
)
if "%MISSING_BUILD_RESULTS%" NEQ "" echo Missing build outputs: %MISSING_BUILD_RESULTS%
if "%MISSING_BUILD_RESULTS%" NEQ "" echo One or more expected outputs are missing - failing build
if "%MISSING_BUILD_RESULTS%" NEQ "" exit /b 1
shell: cmd
- name: Fetch Docs
uses: actions/download-artifact@v4
with:
name: markdown-docs
path: ${{ github.workspace }}\kermit\k95\dist
# Builds with Visual C++ 2005 don't include SSH so don't need the SSH Readme
- name: Remove SSH Readme
run: del ${{ github.workspace }}\kermit\k95\dist\ssh-readme.html
shell: cmd
- name: Prepare Artifact
working-directory: ${{ github.workspace }}\kermit\k95
run: |
move dist ${{ github.workspace }}\ckwin
shell: cmd
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: k95-vs2005-ia64
path: ${{ github.workspace }}\ckwin
if-no-files-found: error
retention-days: 7
##############################################################################
# Cross-compile for 64bit Windows from Linux with MinGW64 #
##############################################################################
# Not for release builds. Just to ensure GCC/MinGW compatibility doesn't get
# broken accidentally.
#
Build-MinGW64-Linux:
runs-on: ubuntu-latest
needs: [Get-CACerts-Bundle, Prepare-Docs]
steps:
- uses: actions/checkout@v4
- name: Select env configuration
run: echo "CK_OPENSSL_VERSION=${{ env.OPENSSL_VERSION }}" >> "$GITHUB_ENV"
shell: bash
- name: Install MinGW-w64
run: sudo apt install -y g++-mingw-w64-x86-64-posix gcc-mingw-w64-x86-64-posix binutils-mingw-w64-x86-64
- name: Cache Dependencies
uses: "./.github/actions/cache"
id: cache-dependencies
with:
path: |
${{github.workspace}}/openssl/current
${{github.workspace}}/libssh
${{github.workspace}}/zlib
key: deps-openssl-${{env.CK_OPENSSL_VERSION}}-parallel-v1
nocache: ${{ vars.NOCACHE }}
- name: Get dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}
run: |
mkdir -p openssl
cd openssl
wget https://github.com/openssl/openssl/releases/download/openssl-${{env.CK_OPENSSL_VERSION}}/openssl-${{env.CK_OPENSSL_VERSION}}.tar.gz
tar zxf openssl-${{env.CK_OPENSSL_VERSION}}.tar.gz
rm openssl-${{env.CK_OPENSSL_VERSION}}.tar.gz
mv openssl-${{env.CK_OPENSSL_VERSION}} current
ls -l current
sudo cpan -i Text::Template
shell: bash
- name: Build OpenSSL
if: steps.cache-dependencies.outputs.cache-hit != 'true'
env:
CXX: /usr/bin/x86_64-w64-mingw32-c++
CC: /usr/bin/x86_64-w64-mingw32-gcc
RC: /usr/bin/x86_64-w64-mingw32-windres
working-directory: openssl/current
run: |
perl Configure mingw64
make depend
make -j 2
shell: bash
- name: Build
env:
CXX: /usr/bin/x86_64-w64-mingw32-c++
CC: /usr/bin/x86_64-w64-mingw32-gcc
run: |
cd kermit/k95
make -j 2 RC=/usr/bin/x86_64-w64-mingw32-windres OPENSSL=${{ github.workspace }}/openssl/current
shell: bash
- name: Make Distribution
run: |
pushd kermit/k95
bash ./mkdist.sh
popd
mv kermit/k95/ckwin ./
shell: bash
- name: Fetch CA Certs bundle
uses: actions/download-artifact@v4
with:
name: ca_certs
path: ${{ github.workspace }}/ckwin
- name: Fetch Docs
uses: actions/download-artifact@v4
with:
name: markdown-docs
path: ${{ github.workspace }}/ckwin
# We're not currently building libssh on linux so remove the ssh readme
- name: Remove SSH Readme
run: rm ${{ github.workspace }}/ckwin/ssh-readme.html
shell: bash
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: k95-mingw64-cross
path: ${{ github.workspace }}/ckwin
if-no-files-found: error
##############################################################################
# Build C-Kermit for Linux with the ckwin version of the shared modules #
##############################################################################
# To ensure any local changes to ckc* and cku* modules haven't accidentally
# broken C-Kermit on Linux, grab the latest linux code and substitute in
# our version of these files to check it all still builds.
#
# Note that if we get out-of-sync with C-Kermit for UNIX changes this may
# run into build errors.
#
# This also isn't anywhere near a perfect test. Just because this builds
# doesn't mean we haven't broken something on OpenVMS or Solaris or AIX
# or Digital UNIX or BSD or MacOS X or any number of other platforms.
C-Kermit-Linux-Build-Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install libpam-dev openssl libssl-dev
# Cache the C-Kermit code so that we're not hitting the C-Kermit website
# for every build.
- name: Cache code
uses: "./.github/actions/cache"
id: cache-code
with:
path: |
${{github.workspace}}/ckermit
${{github.workspace}}/openssl
key: ${{ runner.os }}-ckermit-${{ env.C_KERMIT_VERSION }}-r1
nocache: ${{ vars.NOCACHE }}
- name: Get C-Kermit ${{env.C_KERMIT_VERSION}}
if: steps.cache-code.outputs.cache-hit != 'true'
run: |
wget ${{ env.C_KERMIT_CODE }} -O ckermit.tar.gz
mkdir -p ckermit
pushd ckermit
tar -zxvf ../ckermit.tar.gz
popd
rm ckermit.tar.gz
shell: bash
- name: Copy C-Kermit for Unix files
run: |
pushd ckermit
cp -n ../kermit/k95/cku* ./
cp -n ../kermit/k95/ckc* ./
popd
shell: bash
- name: Build C-Kermit
run: |
pushd ckermit
chmod +x ckubuildlog
make clean
make linux+ssl | tee log
./ckubuildlog
cat linux+ssl.txt
popd
shell: bash