Skip to content

Updated Icon Resource #138

Updated Icon Resource

Updated Icon Resource #138

Workflow file for this run

name: Lua for Watcom
on: push
jobs:
Lua:
name: Demo Script Check
runs-on: ubuntu-latest
steps:
- name: Install Tools
run: |
sudo apt-get update
sudo apt-get install -y lua5.4
lua -v
- name: Test Lua Demo scripts
run: |
for file in demo/minimum/*.lua; do if [ -x "$file" ]; then echo -e "\n>> ./$file"; yes "" | "$file"; fi done
Watcom:
name: Build Lua with Open Watcom
needs: Lua
runs-on: ubuntu-latest
steps:
- uses: open-watcom/setup-watcom@v0
with:
version: "1.9"
- name: Install Tools
run: |
sudo apt-get update
sudo apt-get install -y dos2unix gcc libreadline-dev make mtools zip
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Patch Lua Source Code for Open Watcom
run: |
patch -p0 -i lua.pat
- name: Check GCC can build Lua after patches
run: |
cd lua
make -j`nproc`
cd ..
- name: Build Lua for DOS 16-bit
run: |
export INCLUDE=$WATCOM/h
wmake -f wm_dos16.mak
- name: Build Lua for DOS4GW 32-bit Extender
run: |
export INCLUDE=$WATCOM/h
wmake -f wm_dos4g.mak
- name: Build Lua for Windows 95
run: |
export INCLUDE=$WATCOM/h/nt:$WATCOM/h
wmake -f wm_winnt.mak
- name: Build Lua for OS/2 16-bit
run: |
export INCLUDE=$WATCOM/h/os2:$WATCOM/h
wmake -f wm_os216.mak
- name: Build Lua for OS/2 32-bit
run: |
export INCLUDE=$WATCOM/h/os2:$WATCOM/h
wmake -f wm_os232.mak
- name: Copy DOS4GW Binary
run: |
cp $WATCOM/binw/dos4gw.exe dist/bin/
- name: Ensure Lua Scripts Have CR/LF Line Endings
run: |
unix2dos demo/extra/*.lua demo/minimum/*.lua
- name: Create Binaries Zip
run: |
zip -j9 --DOS-names "dist/Lua Exe.zip" dist/bin/*.exe demo/extra/*.lua demo/minimum/*.lua
- name: UPX Binary Compression
uses: crazy-max/ghaction-upx@v3
with:
version: latest
args: -9 --8086
files: |
dist/bin/lua16.exe
dist/bin/lua4g.exe
dist/bin/luant.exe
- name: Create 160k 16-bit DOS Floppy Diskette Image
run: |
mformat -C -i dist/Lua160k.ima -v "LUA DOS" -f 160
mcopy -i dist/Lua160k.ima dist/bin/lua16.exe demo/minimum/*.lua ::
- name: Create 1.4M Multi-Platform Floppy Diskette Image
run: |
mformat -C -i dist/LuaMulti.ima -v "LUA MULTIOS" -f 1440
mcopy -i dist/LuaMulti.ima dist/bin/*.exe demo/extra/*.lua demo/minimum/*.lua ::
- name: Create Floppy Disk Images Zip
run: |
zip -j9 --DOS-names "dist/Lua Ima.zip" dist/*.ima
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: 'Lua Binaries'
path: dist/*.zip
compression-level: 0
Draft:
name: Draft Release
needs: Watcom
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/202')
permissions:
contents: write
actions: read
steps:
- uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
- name: Generate Release Notes
run: |
input_date="$TAG_NAME"
day=$(date -d "$input_date" '+%-d')
month=$(date -d "$input_date" '+%B')
year=$(date -d "$input_date" '+%Y')
if [[ $day -eq 11 || $day -eq 12 || $day -eq 13 ]]; then
suffix="th"
else
case $((day % 10)) in
1) suffix="st" ;;
2) suffix="nd" ;;
3) suffix="rd" ;;
*) suffix="th" ;;
esac
fi
formatted_date="${day}${suffix} of ${month} ${year}"
sed -i "s/{{DATE}}/${formatted_date}/g" .github/workflows/notes.md
- name: Create Draft Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG_NAME="${GITHUB_REF#refs/tags/}" # Extract the tag name
gh release create "$TAG_NAME" \
--draft \
--title "$TAG_NAME" \
--notes-file .github/workflows/notes.md \
"Lua Binaries/Lua Exe.zip#Lua Exe.zip" \
"Lua Binaries/Lua Ima.zip#Lua Ima.zip"