Whitestar: use core DMD for mini DMDs #1640
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: vpinmame | |
| on: | |
| push: | |
| pull_request: | |
| env: | |
| VERSION_START_SHA: 79345956d1807e3188f0e895379466c7c4caae72 | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| version: | |
| name: Version | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| version: ${{ steps.version.outputs.version }} | |
| revision: ${{ steps.version.outputs.revision }} | |
| sha: ${{ steps.version.outputs.sha }} | |
| sha7: ${{ steps.version.outputs.sha7 }} | |
| tag: ${{ steps.version.outputs.tag }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - id: version | |
| run: | | |
| VERSION_MAJOR=$(grep -Eo "VERSION_MAJOR\s+[0-9]+" src/version.h | grep -Eo "[0-9]+") | |
| VERSION_MINOR=$(grep -Eo "VERSION_MINOR\s+[0-9]+" src/version.h | grep -Eo "[0-9]+") | |
| VERSION_REV=$(grep -Eo "VERSION_REV\s+[0-9]+" src/version.h | grep -Eo "[0-9]+") | |
| VERSION="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REV}" | |
| REVISION=$(git rev-list ${{ env.VERSION_START_SHA }}..HEAD --count) | |
| SHA="${GITHUB_SHA}" | |
| SHA7="${SHA::7}" | |
| TAG="${VERSION}-${REVISION}-${SHA7}" | |
| echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
| echo "revision=${REVISION}" >> $GITHUB_OUTPUT | |
| echo "sha=${SHA}" >> $GITHUB_OUTPUT | |
| echo "sha7=${SHA7}" >> $GITHUB_OUTPUT | |
| echo "tag=${TAG}" >> $GITHUB_OUTPUT | |
| build: | |
| name: Build VPinMAME${{ matrix.artifact-suffix }}-${{ matrix.platform }} | |
| runs-on: windows-2025 | |
| needs: [ version ] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: win-x64 | |
| platform-name: x64 | |
| vpinmame: VPinMAME64.dll | |
| setup: Setup64.exe | |
| bass: x64/Bass64.dll | |
| - platform: win-x64 | |
| platform-name: x64 | |
| vpinmame: VPinMAME64.dll | |
| setup: Setup64.exe | |
| bass: x64/Bass64.dll | |
| artifact-suffix: -sc | |
| extra-flags: -D CMAKE_CXX_FLAGS=//DSAM_INCLUDE_COLORED | |
| - platform: win-x86 | |
| platform-name: Win32 | |
| vpinmame: VPinMAME.dll | |
| setup: Setup.exe | |
| bass: Bass.dll | |
| - platform: win-x86 | |
| platform-name: Win32 | |
| vpinmame: VPinMAME.dll | |
| setup: Setup.exe | |
| bass: Bass.dll | |
| artifact-suffix: -sc | |
| extra-flags: -D CMAKE_CXX_FLAGS=//DSAM_INCLUDE_COLORED | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ilammy/setup-nasm@v1 | |
| - name: Update buildnumber | |
| run: | | |
| perl -i -pe"s/0/${{ needs.version.outputs.revision }}/g" src/git_version.h | |
| perl -i -pe"s/unknown/${{ needs.version.outputs.sha7 }}/g" src/git_version.h | |
| - name: Integrate VPMAlias.txt into Alias.cpp | |
| run: | | |
| output=$(awk -F, '!/^#/ {printf " { \"%s\", \"%s\" },\n", $1, $2}' release/VPMAlias.txt) | |
| sed -i '/\/\*VPMALIAS\*\//r/dev/stdin' src/win32com/Alias.cpp <<< "$output" | |
| - name: Build VPinMAME${{ matrix.artifact-suffix }}-${{ matrix.platform }} | |
| run: | | |
| cp cmake/vpinmame/CMakeLists_${{ matrix.platform }}.txt CMakeLists.txt | |
| cmake \ | |
| -G "Visual Studio 17 2022" \ | |
| -A ${{ matrix.platform-name }} \ | |
| ${{ matrix.extra-flags }} \ | |
| -B build/vpinmame | |
| cmake --build build/vpinmame --config Release | |
| cp cmake/instvpm/CMakeLists_${{ matrix.platform }}.txt CMakeLists.txt | |
| cmake \ | |
| -G "Visual Studio 17 2022" \ | |
| -A ${{ matrix.platform-name }} \ | |
| -B build/instvpm | |
| cmake --build build/instvpm --config Release | |
| - run: | | |
| mkdir tmp | |
| cp build/vpinmame/Release/${{ matrix.vpinmame }} tmp | |
| cp build/instvpm/Release/${{ matrix.setup }} tmp | |
| cp ext/bass/${{ matrix.bass }} tmp | |
| cp release/gamelist.txt tmp | |
| cp release/license.txt tmp | |
| cp release/pinmame.txt tmp | |
| cp "release/visual pinmame.txt" tmp | |
| cp release/VPMAlias.txt tmp/VPMAlias_template.txt | |
| cp release/whatsnew.txt tmp | |
| cp release/whatsnewVPM.txt tmp | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: VPinMAME${{ matrix.artifact-suffix }}-${{ needs.version.outputs.tag }}-${{ matrix.platform }} | |
| path: tmp |