Skip to content

Commit

Permalink
CI: Get Turbo C 2.01 and maybe decrypt
Browse files Browse the repository at this point in the history
Notes:
  1/ Set the Github Actions variables as follows
      a) TC201_ARCHIVE_PATHNAME to the URL without final component.
      b) TC201_ARCHIVE_FILENAME to the name of the file to be downloaded.
  2/ If the archive is GPG symmetrically encrypted set the following
    secret to your own freecom Github repository secrets to get your PRs
    built with Turbo C, otherwise they will only be checked fully
    **after** they have been merged.
      a) TC201_ARCHIVE_PASSPHRASE to the decryption passphrase.
  • Loading branch information
andrewbird committed Dec 28, 2024
1 parent dfafaa6 commit d0578ce
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ jobs:

- name: prerequisites
run: ./ci_prereq.sh
env:
TC201_ARCHIVE_PATHNAME: ${{ vars.TC201_ARCHIVE_PATHNAME }}
TC201_ARCHIVE_FILENAME: ${{ vars.TC201_ARCHIVE_FILENAME }}
TC201_ARCHIVE_PASSPHRASE: ${{ secrets.TC201_ARCHIVE_PASSPHRASE }}

- name: build
run: ./ci_build.sh
Expand Down
17 changes: 17 additions & 0 deletions ci_prereq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ DEVEL=${IBIBLIO_PATH}/devel
# get Watcom for DOS
[ -f watcomc.zip ] || wget --no-verbose ${DEVEL}/watcomc.zip

# get Turbo C 2.01 (maybe encrypted) tar file
if [ -n "${TC201_ARCHIVE_FILENAME}" ] && [ ! -f ${TC201_ARCHIVE_FILENAME} ] ; then
echo "Downloading Turbo C 2.01"
wget --no-verbose ${TC201_ARCHIVE_PATHNAME}/${TC201_ARCHIVE_FILENAME}
fi

# Unpack the DOS binaries
mkdir -p ${HOME}/.dosemu/drive_c
cd ${HOME}/.dosemu/drive_c && (
Expand All @@ -74,4 +80,15 @@ cd ${HOME}/.dosemu/drive_c && (

unzip -L -q ${HERE}/watcomc.zip
echo PATH to watcom binaries is 'c:/devel/watcomc/binw'

# Turbo C
if [ -f ${HERE}/${TC201_ARCHIVE_FILENAME} ] && [ -n "${TC201_ARCHIVE_PASSPHRASE}" ] ; then
echo Decrypting and unpacking Turbo C 2.01
echo "${TC201_ARCHIVE_PASSPHRASE}" | gpg --decrypt --batch --passphrase-fd 0 ${HERE}/${TC201_ARCHIVE_FILENAME} | tar -jxf -
elif [ -f ${HERE}/${TC201_ARCHIVE_FILENAME} ] ; then
echo Unpacking Turbo C 2.01
tar -jxf ${HERE}/${TC201_ARCHIVE_FILENAME}
else
echo No Turbo C 2.01 archive available
fi
)

0 comments on commit d0578ce

Please # to comment.