Update CI workflow for MinGW lowend builds

This commit is contained in:
maron2000
2023-09-09 21:42:54 +09:00
parent d9740ec628
commit d1f3b6fc86
2 changed files with 112 additions and 102 deletions

View File

@@ -21,12 +21,12 @@ jobs:
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW32
update: true
install: git mingw-w64-i686-toolchain mingw-w64-i686-libslirp mingw-w64-i686-libtool mingw-w64-i686-nasm autoconf automake
install: git make mingw-w64-i686-toolchain mingw-w64-i686-libslirp mingw-w64-i686-libtool mingw-w64-i686-nasm autoconf automake mingw-w64-x86_64-ncurses
- name: Update build info
shell: bash
run: |
@@ -42,7 +42,8 @@ jobs:
- name: Build MinGW32 SDL1
run: |
top=`pwd`
ln -s $top/build-scripts/mingw/lowend-bin/make.exe /usr/bin/make.exe
export "MSYSTEM_PREFIX=/d/a/_temp/msys64/mingw32"
# cp $top/build-scripts/mingw/lowend-bin/make.exe ${MSYSTEM_PREFIX}/bin/make.exe
./build-mingw
strip -s $top/src/dosbox-x.exe
- name: Package MinGW32 SDL1
@@ -72,6 +73,7 @@ jobs:
- name: Build MinGW32 SDL2
run: |
top=`pwd`
export "MSYSTEM_PREFIX=/d/a/_temp/msys64/mingw32"
./build-mingw-sdl2
strip -s $top/src/dosbox-x.exe
- name: Package MinGW32 SDL2
@@ -112,8 +114,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
with:
files: dosbox-x-mingw-win32-${{ env.timestamp }}.zip
MinGW32_lowend_CI_build:
MinGW32_CI_lowend_build:
permissions:
actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows
contents: write # for actions/checkout to fetch code and softprops/action-gh-release
@@ -121,32 +122,22 @@ jobs:
runs-on: windows-latest
defaults:
run:
shell: bash
shell: msys2 {0}
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v4
- name: Prepare MinGW32 lowend SDL2
run: |
echo "timestamp=`git show -s --format=%at | xargs -I# date -d @# +%Y%m%d%H%M%S`" >> $GITHUB_ENV
top=`pwd`
pwd>pwd.txt
mkdir mingw-get
vs/tool/unzip.exe $top/build-scripts/mingw/lowend-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/lowend-bin/msys.bat mingw-get/msys/1.0
cp build-scripts/mingw/lowend-bin/runbuild.sh mingw-get/msys/1.0
cp build-scripts/mingw/lowend-bin/gawk.exe mingw-get/msys/1.0/bin
vs/tool/unzip.exe $top/build-scripts/mingw/lowend-bin/d3d9.zip -d d3d9
cp d3d9/*.inl mingw-get/include
cp d3d9/*.h mingw-get/include
cp d3d9/*.a mingw-get/lib
- uses: actions/checkout@v3
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW32
update: true
install: git make mingw-w64-i686-libtool autoconf automake
- name: Update build info
shell: bash
run: |
echo "timestamp=`git show -s --format=%at | xargs -I# date -d @# +%Y%m%d%H%M%S`" >> $GITHUB_ENV
export shortsha=`echo ${GITHUB_SHA} | cut -c1-7`
export copyrightyear=`git show -s --format=%at | xargs -I# date -d @# +'%Y'`
export updatestr=`git show -s --format=%at | xargs -I# date -d @# +'%b %d, %Y %I:%M:%S%P'`
@@ -155,69 +146,83 @@ jobs:
echo "#define GIT_COMMIT_HASH \"${shortsha}\"" >> include/build_timestamp.h
echo "#define COPYRIGHT_END_YEAR \"${copyrightyear}\"" >> include/build_timestamp.h
cat include/build_timestamp.h
- name: Build MinGW32 lowend SDL2
shell: pwsh
run: |
mingw-get\msys\1.0\msys.bat /mingw/msys/1.0/runbuild.sh build-mingw-lowend-sdl2 nodup
if (-not(Test-Path -Path src\dosbox-x.exe -PathType Leaf)) {exit 1}
- name: Package MinGW32 lowend SDL2
- name: setup lowend build environment
shell: bash
run: |
top=`pwd`
echo "${top}"
export "MSYSTEM_PREFIX=/d/a/_temp/msys64/mingw32"
echo "path=$PATH"
cd ${MSYSTEM_PREFIX}/..
ls -lg
rm -rf /d/a/_temp/msys64/mingw32
mkdir mingw32
7z x $top/build-scripts/mingw/lowend-bin/i686-7.3.0-release-posix-dwarf-rt_v5-rev0+nasm.7z -o${MSYSTEM_PREFIX}
cp $top/build-scripts/mingw/lowend-bin/make.exe ${MSYSTEM_PREFIX}/bin/make.exe
echo "MSYSTEM_PREFIX=${MSYSTEM_PREFIX}"
chmod +x ${MSYSTEM_PREFIX}/bin/*.*
chmod +x ${MSYSTEM_PREFIX}/i686-w64-mingw32/bin/*.*
chmod +x ${MSYSTEM_PREFIX}/opt/bin/*.*
- name: Build MinGW32 SDL1
run: |
top=`pwd`
export "MSYSTEM_PREFIX=/d/a/_temp/msys64/mingw32"
./build-mingw
strip -s $top/src/dosbox-x.exe
mkdir -p $top/package/mingw-build/mingw-lowend-sdl2/drivez
mkdir -p $top/package/mingw-build/mingw-lowend-sdl2/scripts
mkdir -p $top/package/mingw-build/mingw-lowend-sdl2/shaders
mkdir -p $top/package/mingw-build/mingw-lowend-sdl2/glshaders
mkdir -p $top/package/mingw-build/mingw-lowend-sdl2/languages
sed -e 's/^\(output[ ]*=[ ]*\)default$/\1ttf/;s/^\(windowposition[ ]*=\)[ ]*-/\1 /;s/^\(file access tries[ ]*=[ ]*\)0$/\13/;s/^\(printoutput[ ]*=[ ]*\)png$/\1printer/;s/\(drive data rate limit[ ]*=[ ]*\)-1$/\10/' $top/dosbox-x.reference.conf>$top/package/mingw-build/mingw-lowend-sdl2/dosbox-x.conf
cp $top/src/dosbox-x.exe $top/package/mingw-build/mingw-lowend-sdl2/dosbox-x.exe
cp $top/CHANGELOG $top/package/mingw-build/mingw-lowend-sdl2/CHANGELOG.txt
cp $top/dosbox-x.reference.conf $top/package/mingw-build/mingw-lowend-sdl2/dosbox-x.reference.conf
cp $top/dosbox-x.reference.full.conf $top/package/mingw-build/mingw-lowend-sdl2/dosbox-x.reference.full.conf
cp $top/contrib/windows/installer/readme.txt $top/package/mingw-build/mingw-lowend-sdl2/README.txt
cp $top/contrib/windows/installer/inpout32.dll $top/package/mingw-build/mingw-lowend-sdl2/inpout32.dll
cp $top/contrib/fonts/FREECG98.BMP $top/package/mingw-build/mingw-lowend-sdl2/FREECG98.BMP
cp $top/contrib/fonts/wqy_1?pt.bdf $top/package/mingw-build/mingw-lowend-sdl2/
cp $top/contrib/fonts/Nouveau_IBM.ttf $top/package/mingw-build/mingw-lowend-sdl2/Nouveau_IBM.ttf
cp $top/contrib/fonts/SarasaGothicFixed.ttf $top/package/mingw-build/mingw-lowend-sdl2/SarasaGothicFixed.ttf
cp $top/contrib/windows/installer/drivez_readme.txt $top/package/mingw-build/mingw-lowend-sdl2/drivez/readme.txt
cp $top/contrib/windows/installer/windows_explorer_context_menu*.bat $top/package/mingw-build/mingw-lowend-sdl2/scripts/
cp $top/contrib/windows/shaders/* $top/package/mingw-build/mingw-lowend-sdl2/shaders/
cp $top/contrib/glshaders/* $top/package/mingw-build/mingw-lowend-sdl2/glshaders/
cp $top/contrib/translations/*/*.lng $top/package/mingw-build/mingw-lowend-sdl2/languages/
- name: Prepare MinGW32 lowend SDL1
run: |
make clean
- name: Build MinGW32 lowend SDL1
shell: pwsh
run: |
mingw-get\msys\1.0\msys.bat /mingw/msys/1.0/runbuild.sh build-mingw-lowend
if (-not(Test-Path -Path src\dosbox-x.exe -PathType Leaf)) {exit 1}
- name: Package MinGW32 lowend SDL1
run: |
top=`pwd`
mkdir -p $top/package/mingw-build/mingw/drivez
mkdir -p $top/package/mingw-build/mingw/scripts
mkdir -p $top/package/mingw-build/mingw/shaders
mkdir -p $top/package/mingw-build/mingw/glshaders
mkdir -p $top/package/mingw-build/mingw/languages
sed -e 's/^\(output[ ]*=[ ]*\)default$/\1ttf/;s/^\(windowposition[ ]*=\)[ ]*-/\1 /;s/^\(file access tries[ ]*=[ ]*\)0$/\13/;s/^\(printoutput[ ]*=[ ]*\)png$/\1printer/;s/\(drive data rate limit[ ]*=[ ]*\)-1$/\10/' $top/dosbox-x.reference.conf>$top/package/mingw-build/mingw/dosbox-x.conf
cp $top/src/dosbox-x.exe $top/package/mingw-build/mingw/dosbox-x.exe
cp $top/CHANGELOG $top/package/mingw-build/mingw/CHANGELOG.txt
cp $top/dosbox-x.reference.conf $top/package/mingw-build/mingw/dosbox-x.reference.conf
cp $top/dosbox-x.reference.full.conf $top/package/mingw-build/mingw/dosbox-x.reference.full.conf
cp $top/contrib/windows/installer/readme.txt $top/package/mingw-build/mingw/README.txt
cp $top/contrib/windows/installer/inpout32.dll $top/package/mingw-build/mingw/inpout32.dll
cp $top/contrib/fonts/FREECG98.BMP $top/package/mingw-build/mingw/FREECG98.BMP
cp $top/contrib/fonts/wqy_1?pt.bdf $top/package/mingw-build/mingw/
cp $top/contrib/fonts/Nouveau_IBM.ttf $top/package/mingw-build/mingw/Nouveau_IBM.ttf
cp $top/contrib/fonts/SarasaGothicFixed.ttf $top/package/mingw-build/mingw/SarasaGothicFixed.ttf
cp $top/contrib/windows/installer/drivez_readme.txt $top/package/mingw-build/mingw/drivez/readme.txt
cp $top/contrib/windows/installer/windows_explorer_context_menu*.bat $top/package/mingw-build/mingw/scripts/
cp $top/contrib/windows/shaders/* $top/package/mingw-build/mingw/shaders/
cp $top/contrib/glshaders/* $top/package/mingw-build/mingw/glshaders/
cp $top/contrib/translations/*/*.lng $top/package/mingw-build/mingw/languages/
- name: Build MinGW32 lowend SDL2
run: |
top=`pwd`
export "MSYSTEM_PREFIX=/d/a/_temp/msys64/mingw32"
./build-mingw-sdl2
strip -s $top/src/dosbox-x.exe
mkdir -p $top/package/mingw-build/mingw-lowend/drivez
mkdir -p $top/package/mingw-build/mingw-lowend/scripts
mkdir -p $top/package/mingw-build/mingw-lowend/shaders
mkdir -p $top/package/mingw-build/mingw-lowend/glshaders
mkdir -p $top/package/mingw-build/mingw-lowend/languages
sed -e 's/^\(output[ ]*=[ ]*\)default$/\1ttf/;s/^\(windowposition[ ]*=\)[ ]*-/\1 /;s/^\(file access tries[ ]*=[ ]*\)0$/\13/;s/^\(printoutput[ ]*=[ ]*\)png$/\1printer/;s/\(drive data rate limit[ ]*=[ ]*\)-1$/\10/' $top/dosbox-x.reference.conf>$top/package/mingw-build/mingw-lowend/dosbox-x.conf
cp $top/src/dosbox-x.exe $top/package/mingw-build/mingw-lowend/dosbox-x.exe
cp $top/CHANGELOG $top/package/mingw-build/mingw-lowend/CHANGELOG.txt
cp $top/dosbox-x.reference.conf $top/package/mingw-build/mingw-lowend/dosbox-x.reference.conf
cp $top/dosbox-x.reference.full.conf $top/package/mingw-build/mingw-lowend/dosbox-x.reference.full.conf
cp $top/contrib/windows/installer/readme.txt $top/package/mingw-build/mingw-lowend/README.txt
cp $top/contrib/windows/installer/inpout32.dll $top/package/mingw-build/mingw-lowend/inpout32.dll
cp $top/contrib/fonts/FREECG98.BMP $top/package/mingw-build/mingw-lowend/FREECG98.BMP
cp $top/contrib/fonts/wqy_1?pt.bdf $top/package/mingw-build/mingw-lowend/
cp $top/contrib/fonts/Nouveau_IBM.ttf $top/package/mingw-build/mingw-lowend/Nouveau_IBM.ttf
cp $top/contrib/fonts/SarasaGothicFixed.ttf $top/package/mingw-build/mingw-lowend/SarasaGothicFixed.ttf
cp $top/contrib/windows/installer/drivez_readme.txt $top/package/mingw-build/mingw-lowend/drivez/readme.txt
cp $top/contrib/windows/installer/windows_explorer_context_menu*.bat $top/package/mingw-build/mingw-lowend/scripts/
cp $top/contrib/windows/shaders/* $top/package/mingw-build/mingw-lowend/shaders/
cp $top/contrib/glshaders/* $top/package/mingw-build/mingw-lowend/glshaders/
cp $top/contrib/translations/*/*.lng $top/package/mingw-build/mingw-lowend/languages/
- name: Package MinGW32 lowend SDL2
run: |
top=`pwd`
mkdir -p $top/package/mingw-build/mingw-sdl2/drivez
mkdir -p $top/package/mingw-build/mingw-sdl2/scripts
mkdir -p $top/package/mingw-build/mingw-sdl2/shaders
mkdir -p $top/package/mingw-build/mingw-sdl2/glshaders
mkdir -p $top/package/mingw-build/mingw-sdl2/languages
sed -e 's/^\(output[ ]*=[ ]*\)default$/\1ttf/;s/^\(windowposition[ ]*=\)[ ]*-/\1 /;s/^\(file access tries[ ]*=[ ]*\)0$/\13/;s/^\(printoutput[ ]*=[ ]*\)png$/\1printer/;s/\(drive data rate limit[ ]*=[ ]*\)-1$/\10/' $top/dosbox-x.reference.conf>$top/package/mingw-build/mingw-sdl2/dosbox-x.conf
cp $top/src/dosbox-x.exe $top/package/mingw-build/mingw-sdl2/dosbox-x.exe
cp $top/CHANGELOG $top/package/mingw-build/mingw-sdl2/CHANGELOG.txt
cp $top/dosbox-x.reference.conf $top/package/mingw-build/mingw-sdl2/dosbox-x.reference.conf
cp $top/dosbox-x.reference.full.conf $top/package/mingw-build/mingw-sdl2/dosbox-x.reference.full.conf
cp $top/contrib/windows/installer/readme.txt $top/package/mingw-build/mingw-sdl2/README.txt
cp $top/contrib/windows/installer/inpout32.dll $top/package/mingw-build/mingw-sdl2/inpout32.dll
cp $top/contrib/fonts/FREECG98.BMP $top/package/mingw-build/mingw-sdl2/FREECG98.BMP
cp $top/contrib/fonts/wqy_1?pt.bdf $top/package/mingw-build/mingw-sdl2/
cp $top/contrib/fonts/Nouveau_IBM.ttf $top/package/mingw-build/mingw-sdl2/Nouveau_IBM.ttf
cp $top/contrib/fonts/SarasaGothicFixed.ttf $top/package/mingw-build/mingw-sdl2/SarasaGothicFixed.ttf
cp $top/contrib/windows/installer/drivez_readme.txt $top/package/mingw-build/mingw-sdl2/drivez/readme.txt
cp $top/contrib/windows/installer/windows_explorer_context_menu*.bat $top/package/mingw-build/mingw-sdl2/scripts/
cp $top/contrib/windows/shaders/* $top/package/mingw-build/mingw-sdl2/shaders/
cp $top/contrib/glshaders/* $top/package/mingw-build/mingw-sdl2/glshaders/
cp $top/contrib/translations/*/*.lng $top/package/mingw-build/mingw-sdl2/languages/
cp $top/COPYING $top/package/COPYING
cd $top/package/
$top/vs/tool/zip.exe -r -9 $top/dosbox-x-mingw-win32-lowend-${{ env.timestamp }}.zip *

View File

@@ -121,9 +121,14 @@ jobs:
runs-on: windows-latest
defaults:
run:
shell: bash
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW32
update: true
install: git make mingw-w64-i686-libtool autoconf automake
- name: Update build info
shell: bash
run: |
@@ -136,37 +141,37 @@ jobs:
echo "#define GIT_COMMIT_HASH \"${shortsha}\"" >> include/build_timestamp.h
echo "#define COPYRIGHT_END_YEAR \"${copyrightyear}\"" >> include/build_timestamp.h
cat include/build_timestamp.h
- name: Prepare MinGW32 lowend
- name: setup lowend build environment
shell: bash
run: |
top=`pwd`
pwd>pwd.txt
mkdir mingw-get
vs/tool/unzip.exe $top/build-scripts/mingw/lowend-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/lowend-bin/msys.bat mingw-get/msys/1.0
cp build-scripts/mingw/lowend-bin/runbuild.sh mingw-get/msys/1.0
cp build-scripts/mingw/lowend-bin/gawk.exe mingw-get/msys/1.0/bin
vs/tool/unzip.exe $top/build-scripts/mingw/lowend-bin/d3d9.zip -d d3d9
cp d3d9/*.inl mingw-get/include
cp d3d9/*.h mingw-get/include
cp d3d9/*.a mingw-get/lib
echo "${top}"
export "MSYSTEM_PREFIX=/d/a/_temp/msys64/mingw32"
echo "path=$PATH"
cd ${MSYSTEM_PREFIX}/..
ls -lg
rm -rf /d/a/_temp/msys64/mingw32
mkdir mingw32
7z x $top/build-scripts/mingw/lowend-bin/i686-7.3.0-release-posix-dwarf-rt_v5-rev0+nasm.7z -o${MSYSTEM_PREFIX}
cp $top/build-scripts/mingw/lowend-bin/make.exe ${MSYSTEM_PREFIX}/bin/make.exe
echo "MSYSTEM_PREFIX=${MSYSTEM_PREFIX}"
chmod +x ${MSYSTEM_PREFIX}/bin/*.*
chmod +x ${MSYSTEM_PREFIX}/i686-w64-mingw32/bin/*.*
chmod +x ${MSYSTEM_PREFIX}/opt/bin/*.*
- name: Build MinGW32 lowend SDL2
shell: pwsh
shell: bash
run: |
mingw-get\msys\1.0\msys.bat /mingw/msys/1.0/runbuild.sh build-mingw-lowend-sdl2 nodup
if (-not(Test-Path -Path src\dosbox-x.exe -PathType Leaf)) {exit 1}
#top=`pwd`
top=`pwd`
export "MSYSTEM_PREFIX=/d/a/_temp/msys64/mingw32"
./build-mingw
strip -s src/dosbox-x.exe
mkdir -p mingw-bin
cp src/dosbox-x.exe mingw-bin/dosbox-x_mingw_lowend_SDL2.exe
- name: Build MinGW32 lowend SDL1
shell: pwsh
shell: bash
run: |
make clean
mingw-get\msys\1.0\msys.bat /mingw/msys/1.0/runbuild.sh build-mingw-lowend
if (-not(Test-Path -Path src\dosbox-x.exe -PathType Leaf)) {exit 1}
#top=`pwd`
export "MSYSTEM_PREFIX=/d/a/_temp/msys64/mingw32"
./build-mingw
strip -s src/dosbox-x.exe
cp src/dosbox-x.exe mingw-bin/dosbox-x_mingw_lowend_SDL1.exe
- name: Cache MinGW32 lowend builds