fix issue where mapdesc.json cleared #74
This file contains 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: Windows CI MSYS | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build on Windows ${{ matrix.platform }} | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- platform: w64 | |
arch: x86_64 | |
bits: 64 | |
- platform: w32 | |
arch: i686 | |
bits: 32 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up MSYS2 | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: MINGW${{ matrix.bits }} | |
update: true | |
install: | | |
make | |
mingw-w64-${{ matrix.arch }}-gcc | |
mingw-w64-${{ matrix.arch }}-binutils | |
mingw-w64-${{ matrix.arch }}-SDL2 | |
mingw-w64-${{ matrix.arch }}-libmad | |
mingw-w64-${{ matrix.arch }}-opus | |
mingw-w64-${{ matrix.arch }}-libvorbis | |
mingw-w64-${{ matrix.arch }}-zlib | |
mingw-w64-${{ matrix.arch }}-curl | |
zip | |
git | |
dos2unix | |
- name: Generate QSS-M Revision Info | |
shell: bash | |
run: | | |
echo "Git URL: https://github.com/timbergeron/QSS-M.git" > QSS-M-Revision.txt | |
echo "Git Revision: $(git rev-parse HEAD)" >> QSS-M-Revision.txt | |
echo "Git Date: $(git log -1 --date=short --format=%cd)" >> QSS-M-Revision.txt | |
echo "Compile Date: $(date)" >> QSS-M-Revision.txt | |
export SOURCE_DATE_EPOCH=$(git log -1 --date=short --format=%ct) | |
- name: Build and Package | |
shell: msys2 {0} | |
run: | | |
cd Quake || { | |
echo "Quake directory not found. Exiting." | |
exit 1 | |
} | |
# Set build-specific environment variables | |
export QSS_CFLAGS="-DQSS_REVISION=$(git rev-parse HEAD)" | |
export QSS_LDFLAGS="-Wl,--allow-multiple-definition" | |
# Run the build with platform-specific makefile | |
if [ "${{ matrix.platform }}" = "w64" ]; then | |
make -f Makefile.w64 USE_SDL2=1 -j8 | |
mv quakespasm.exe QSS-M-w64.exe | |
zip -9j QSS-M-w64.zip ../Windows/codecs/x64/*.dll ../Windows/curl/lib/x64/libcurl.dll ../Windows/zlib/x64/zlib1.dll ../LICENSE.txt ../Quakespasm.html quakespasm.pak qssm.pak ../Quakespasm.txt ../Quakespasm-Spiked.txt ../Quakespasm-Music.txt ../Windows/SDL2/lib64/SDL2.dll ../QSS-M-Revision.txt QSS-M-w64.exe | |
else | |
make -f Makefile.w32 USE_SDL2=1 -j8 | |
mv quakespasm.exe QSS-M-w32.exe | |
zip -9j QSS-M-w32.zip ../Windows/codecs/x86/*.dll ../Windows/curl/lib/x86/libcurl.dll ../Windows/zlib/x86/zlib1.dll ../LICENSE.txt ../Quakespasm.html quakespasm.pak qssm.pak ../Quakespasm.txt ../Quakespasm-Spiked.txt ../Quakespasm-Music.txt ../Windows/SDL2/lib/SDL2.dll ../QSS-M-Revision.txt QSS-M-w32.exe | |
fi | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: QSS-M ${{ matrix.platform }} | |
path: Quake/QSS-M-${{ matrix.platform }}.zip |