2022-06-22 13:14:38 -04:00

65 lines
2.7 KiB
YAML

name: HX-DOS build
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
HX_DOS_CI_build:
permissions:
actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows
contents: read # for actions/checkout to fetch code
if: github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
runs-on: windows-latest
defaults:
run:
shell: pwsh
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
- name: Prepare HX-DOS
shell: bash
run: |
echo "timestamp=`date +%F-%T | sed -e 's/:/-/g' | sed -e 's/-//g'`" >> $GITHUB_ENV
pwd>pwd.txt
mkdir package
mkdir mingw-get
vs/tool/unzip.exe build-scripts/mingw/bin/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip -d mingw-get
mingw-get/bin/mingw-get.exe install msys-base gcc g++ autoconf automake libiconv libpdcurses libz
mv pwd.txt mingw-get/msys/1.0
cp build-scripts/mingw/bin/msys.bat mingw-get/msys/1.0
cp build-scripts/mingw/bin/runbuild.sh mingw-get/msys/1.0
cp build-scripts/mingw/bin/gawk.exe mingw-get/msys/1.0/bin
- name: Build HX-DOS
shell: pwsh
run: |
mingw-get\msys\1.0\msys.bat /mingw/msys/1.0/runbuild.sh build-mingw-hx-dos
if (-not(Test-Path -Path src\dosbox-x.exe -PathType Leaf)) {exit 1}
- name: Package HX-DOS
shell: bash
run: |
top=`pwd`
strip --strip-all $top/src/dosbox-x.exe
$top/build-scripts/mingw/hxdos/PESTUB.EXE -n $top/src/dosbox-x.exe
$top/vs/tool/upx.exe --lzma -9 $top/src/dosbox-x.exe
cp $top/src/dosbox-x.exe $top/package/dosbox-x.exe
cp $top/CHANGELOG $top/package/CHANGELOG.txt
cp $top/dosbox-x.reference.conf $top/package/dosbox-x.ref
cp $top/dosbox-x.reference.full.conf $top/package/dosbox-x.ref.full
cp $top/build-scripts/mingw/hxdos/DPMILD32.EXE $top/package/
cp $top/build-scripts/mingw/hxdos/HDPMI32.EXE $top/package/
cp $top/build-scripts/mingw/hxdos/HXGUIHLP.INI $top/package/
cp $top/build-scripts/mingw/hxdos/README.TXT $top/package/
cp $top/build-scripts/mingw/hxdos/WINSPOOL.DRV $top/package/
cp $top/build-scripts/mingw/hxdos/*.DLL $top/package/
- name: Upload release package
uses: actions/upload-artifact@v3.1.0
with:
name: dosbox-x-mingw-hx-dos-${{ env.timestamp }}
path: ${{ github.workspace }}/package/