mirror of
https://github.com/Neo-Desktop/WindowsXPKg
synced 2026-11-02 14:53:19 +02:00
* windows 98/nt4, slopped openssl away * one (1) roadblock that it can't figure out * fixed maybe * fix dos? * fix dos? (2) * ts is gonna be slow * No need to compress anymore * No need to compress anymore (2) * deslop The main problem with AI models, even today, is that they're very shortsighted. They're too focused on the thing working now than thinking about how maintainable it will be later. As such, you get duplicated code, as well as comments that are geared towards what it's doing right then and there (as if it's an advertisement of it's services) rather than improving the readability of the code. Always check your diffs. * Update workflows * Update freebsd.yml * Update README.md
170 lines
5.8 KiB
YAML
170 lines
5.8 KiB
YAML
# This file is a part of the UMSKT Project
|
|
#
|
|
# Copyleft (C) 2019-2023 UMSKT Contributors (et.al.)
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Affero General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
# @FileCreated by Neo on 06/19/2023
|
|
# @Maintainer Neo
|
|
|
|
name: DOS DJGPP
|
|
|
|
on:
|
|
push:
|
|
branches: [ "*" ]
|
|
paths-ignore: [ '**.md', 'doc/**', '.idea/**'] # If only these files are edited, skip
|
|
pull_request:
|
|
branches: [ "*" ]
|
|
paths-ignore: [ '**.md', 'doc/**', '.idea/**']
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
CC: ${{ github.workspace }}/djgpp/bin/i586-pc-msdosdjgpp-gcc
|
|
CXX: ${{ github.workspace }}/djgpp/bin/i586-pc-msdosdjgpp-g++
|
|
CMAKE_FIND_ROOT_PATH: ${{ github.workspace }}/djgpp
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Source Tree
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Setup build environment
|
|
run: |
|
|
sudo apt -y update
|
|
sudo apt -y install build-essential cmake wget 7zip git gcc-multilib dosbox tree
|
|
|
|
- name: Download and Setup DJGPP Toolchain
|
|
run: |
|
|
pushd ${{ github.workspace }}
|
|
wget https://github.com/andrewwutw/build-djgpp/releases/download/v3.4/djgpp-linux64-gcc1220.tar.bz2
|
|
tar xjf djgpp-linux64-gcc1220.tar.bz2
|
|
cd ${{ github.workspace }}/djgpp
|
|
tree . -S
|
|
|
|
- name: Download stub
|
|
run: |
|
|
wget https://web.archive.org/web/20250308092209/https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/util/system/cwsdpmi/csdpmi7b.zip -O CSDPMI7B.ZIP
|
|
mkdir /home/runner/dpmibin
|
|
7z e CSDPMI7B.ZIP bin/CWSDSTUB.EXE -o/home/runner/dpmibin
|
|
|
|
- name: Build
|
|
run: |
|
|
source ${{ github.workspace }}/djgpp/setenv
|
|
pushd build
|
|
cmake ../ -D DJGPP=ON -D CMAKE_FIND_ROOT_PATH=${CMAKE_FIND_ROOT_PATH} -D CWSDSTUB_LOCATION=/home/runner/dpmibin/CWSDSTUB.EXE -D DJGPP_BIN_LOCATION=/home/runner/work/UMSKT/UMSKT/djgpp/i586-pc-msdosdjgpp/bin
|
|
make
|
|
|
|
- name: Setup DOSBox test environment
|
|
run: |
|
|
mkdir -p dosbox_test
|
|
cp build/umskt.exe dosbox_test/
|
|
# Download DPMI server directly
|
|
# wget https://github.com/UMSKT/winactiontest/raw/refs/heads/main/CWSDPMI.EXE -O dosbox_test/CWSDPMI.EXE
|
|
# Create test batch file
|
|
cat > dosbox_test/test.bat << EOL
|
|
@echo off
|
|
echo Running test 1...
|
|
umskt.exe -b 2C -c 365 -s 069420,999999 > TEST1.TXT
|
|
if errorlevel 1 goto error
|
|
echo Running test 2...
|
|
umskt.exe -b 5A -c 640 -s 069420,999999 > TEST2.TXT
|
|
if errorlevel 1 goto error
|
|
echo Running test 3...
|
|
umskt.exe -i 253286028742154311079061239762245184619981623171292574 > TEST3.TXT
|
|
if errorlevel 1 goto error
|
|
echo Tests completed > DONE.TXT
|
|
goto end
|
|
:error
|
|
echo Test failed > ERROR.TXT
|
|
:end
|
|
exit
|
|
EOL
|
|
# Create DOSBox configuration
|
|
cat > dosbox_test/dosbox.conf << EOL
|
|
[sdl]
|
|
nosound=true
|
|
[cpu]
|
|
cputype=386
|
|
core=dynamic
|
|
cycles=max
|
|
[autoexec]
|
|
mount c .
|
|
c:
|
|
test.bat
|
|
exit
|
|
EOL
|
|
|
|
- name: Run tests in DOSBox
|
|
run: |
|
|
cd dosbox_test
|
|
timeout 2m dosbox -conf dosbox.conf -nogui -exit
|
|
# Check if the test completed successfully
|
|
if [ ! -f DONE.TXT ]; then
|
|
echo "Tests did not complete successfully"
|
|
if [ -f ERROR.TXT ]; then
|
|
echo "Test execution failed"
|
|
fi
|
|
if [ -f TEST1.TXT ]; then
|
|
echo "Test 1 output:"
|
|
cat TEST1.TXT
|
|
fi
|
|
if [ -f TEST2.TXT ]; then
|
|
echo "Test 2 output:"
|
|
cat TEST2.TXT
|
|
fi
|
|
if [ -f TEST3.TXT ]; then
|
|
echo "Test 3 output:"
|
|
cat TEST3.TXT
|
|
fi
|
|
exit 1
|
|
fi
|
|
# Verify test outputs
|
|
if [ ! -f TEST1.TXT ] || [ ! -f TEST2.TXT ] || [ ! -f TEST3.TXT ]; then
|
|
echo "Test output files missing"
|
|
exit 1
|
|
fi
|
|
# Check test results - looking for key format patterns
|
|
if ! grep -qE '[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}' TEST1.TXT || \
|
|
! grep -qE '[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}' TEST2.TXT || \
|
|
! grep -qE '[0-9]{6}-[0-9]{6}-[0-9]{6}-[0-9]{6}-[0-9]{6}-[0-9]{6}-[0-9]{6}' TEST3.TXT; then
|
|
echo "Tests failed - unexpected output format"
|
|
echo "Test 1 output:"
|
|
cat TEST1.TXT
|
|
echo "Test 2 output:"
|
|
cat TEST2.TXT
|
|
echo "Test 3 output:"
|
|
cat TEST3.txt
|
|
exit 1
|
|
else
|
|
echo "All tests passed successfully"
|
|
echo "Test 1 output:"
|
|
cat TEST1.TXT
|
|
echo "Test 2 output:"
|
|
cat TEST2.TXT
|
|
echo "Test 3 output:"
|
|
cat TEST3.TXT
|
|
fi
|
|
|
|
- name: Move executable to upload directory
|
|
run: |
|
|
mkdir build/actions_upload
|
|
mv build/umskt.exe build/actions_upload/
|
|
|
|
- name: Upload build artifact
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: UMSKT-DOS-x86
|
|
path: build/actions_upload |