Remove redundant GitHub workflow step for checking out submodule #19
Workflow file for this run
This file contains hidden or 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
| name: Lua for Watcom | |
| on: push | |
| jobs: | |
| Watcom: | |
| name: Lua for Watcom | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: open-watcom/setup-watcom@v0 | |
| with: | |
| version: "1.9" | |
| - name: Build Lua for DOS 16-bit | |
| run: | | |
| export INCLUDE=$WATCOM/h | |
| wmake -f wm_dos16.mak | |
| - name: Build Lua for DOS4GW | |
| run: | | |
| export INCLUDE=$WATCOM/h | |
| wmake -f wm_dos4g.mak | |
| - name: Build Lua for WinNT | |
| run: | | |
| export INCLUDE=$WATCOM/h/nt:$WATCOM/h | |
| wmake -f wm_winnt.mak | |
| - name: UPX Binary Compression | |
| uses: crazy-max/ghaction-upx@v3 | |
| with: | |
| version: latest | |
| args: -9 --8086 | |
| files: | | |
| dist/bin/*.exe | |
| - name: Copy DOS4GW Binary | |
| run: | | |
| cp $WATCOM/binw/dos4gw.exe dist/bin/ | |
| - name: Install Post Build Tools (Dos2unix, GNU Mtools, Zip) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y dos2unix mtools zip | |
| - name: Create Example Lua Script for Diskette Images | |
| run: | | |
| echo "-- This is a single line comment" > example.lua | |
| echo "-- Run this script with 'LUA16.EXE EXAMPLE.LUA'" >> example.lua | |
| echo "" >> example.lua | |
| echo "-- Get hour of the day, convert it from string to number" >> example.lua | |
| echo "hour = tonumber(os.date('%H'))" >> example.lua | |
| echo "" >> example.lua | |
| echo "-- Set the string 'timeOfDay' depending on the hour" >> example.lua | |
| echo "if hour < 4 or hour > 20 then timeOfDay = 'night'" >> example.lua | |
| echo "elseif hour < 9 then timeOfDay = 'morning'" >> example.lua | |
| echo "elseif hour > 16 then timeOfDay = 'evening'" >> example.lua | |
| echo "else timeOfDay = 'day'" >> example.lua | |
| echo "end" >> example.lua | |
| echo "" >> example.lua | |
| echo "-- Concatenate timeOfDay & Lua version to as part of a greeting" >> example.lua | |
| echo "print('Good ' .. timeOfDay .. ' from ' .. _VERSION .. '.')" >> example.lua | |
| echo "" >> example.lua | |
| echo "os.exit() -- Exit script. Will also exit a interactive shell" >> example.lua | |
| echo "" >> example.lua | |
| echo "--[[ This is a multi-line comment" >> example.lua | |
| echo " For full Lua language documentation" >> example.lua | |
| echo " visit https://www.lua.org/docs.html" >> example.lua | |
| echo "--]]" >> example.lua | |
| unix2dos example.lua | |
| - name: Create 160k Floppy Diskette Image | |
| run: | | |
| mformat -C -i dist/Lua5DD8.ima -v LUA -f 160 | |
| mcopy -i dist/Lua5DD8.ima dist/bin/lua16.exe example.lua :: | |
| - name: Create 1.4M Floppy Diskette Image | |
| run: | | |
| mformat -C -i dist/Lua3HD18.ima -v LUA -f 1440 | |
| mcopy -i dist/Lua3HD18.ima dist/bin/*.exe example.lua :: | |
| - name: Create Zip Binaries | |
| run: | | |
| zip -j9 "dist/Lua DOS Bin.zip" dist/bin/*.exe | |
| - name: Zip Disk Images | |
| run: | | |
| zip -j9 "dist/Lua DOS Ima.zip" dist/*.ima | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: 'Lua Binaries' | |
| path: dist/*.zip | |
| compression-level: 0 |