From 487bfa1851e696e2593ad1a303f4053c4cde688a Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Tue, 20 Aug 2024 15:39:02 +0200 Subject: [PATCH] asdf --- .github/workflows/linux.yml | 23 ++++++----- .github/workflows/macos.yml | 29 ++++++++------ .github/workflows/win_msvc.yml | 71 ++++++++++++++++++++++------------ 3 files changed, 77 insertions(+), 46 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 8cfaec195..f2c0d7842 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -39,22 +39,25 @@ jobs: - name: Create testbuild package run: | # Create release directory tree - mkdir -p publish/dhewm3-linux-${{github.sha}}/base - mkdir publish/dhewm3-linux-${{github.sha}}/d3xp + export PKGDIR="dhewm3-linux-$(git rev-parse --short HEAD)" + echo "pkgname=$PKGDIR" >> $GITHUB_ENV + mkdir -p publish/$PKGDIR/base + mkdir publish/$PKGDIR/d3xp # Copy release assets cd build - cp dhewm3 dhewm3ded base.so d3xp.so ../publish/dhewm3-linux-${{github.sha}}/ + cp dhewm3 dhewm3ded base.so d3xp.so ../publish/$PKGDIR/ cd .. # Copy misc assets - cp base/gamepad.cfg publish/dhewm3-linux-${{github.sha}}/base/ - cp base/gamepad-d3xp.cfg publish/dhewm3-linux-${{github.sha}}/d3xp/ - cp COPYING.txt publish/dhewm3-linux-${{github.sha}}/ - cp README.md publish/dhewm3-linux-${{github.sha}}/README.txt - cp Changelog.md publish/dhewm3-linux-${{github.sha}}/Changelog.txt - cp Configuration.md publish/dhewm3-linux-${{github.sha}}/Configuration.txt + cp base/gamepad.cfg publish/$PKGDIR/base/ + cp base/gamepad-d3xp.cfg publish/$PKGDIR/d3xp/ + cp COPYING.txt publish/$PKGDIR/ + # TODO: prepend to README that executables must be set executable? (and maybe commit, build, arch etc) + cp README.md publish/$PKGDIR/README.txt + cp Changelog.md publish/$PKGDIR/Changelog.txt + cp Configuration.md publish/$PKGDIR/Configuration.txt - name: Upload testbuild package uses: actions/upload-artifact@v4 with: - name: dhewm3-linux-${{github.sha}} + name: ${{ env.pkgname }} path: publish/ if-no-files-found: error diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 651f817de..8dfca96ae 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -26,36 +26,41 @@ jobs: - name: Install build dependencies run: | brew update - brew install sdl2 openal-soft make cmake + brew install sdl2 openal-soft + # not installing make and cmake, cmake is installed by default, make doesn't seem to be needed + # when using cmake --build - name: Check out repository code uses: actions/checkout@v4 - name: Build run: | mkdir build + # Note: not building dedicated server because it's not supported on Macs cmake -DOPENAL_LIBRARY="/opt/homebrew/opt/openal-soft/lib/libopenal.dylib" -DOPENAL_INCLUDE_DIR="/opt/homebrew/opt/openal-soft/include" -S neo/ -B build cmake --build build - name: Create testbuild package run: | # Create release directory tree - mkdir -p publish/dhewm3-macos-${{github.sha}}/base - mkdir publish/dhewm3-macos-${{github.sha}}/d3xp + export PKGDIR="dhewm3-macos-$(git rev-parse --short HEAD)" + echo "pkgname=$PKGDIR" >> $GITHUB_ENV + mkdir -p publish/$PKGDIR/base + mkdir publish/$PKGDIR/d3xp # Copy release assets cd build ls ls -R dhewm3.app - cp -r dhewm3.app ../publish/dhewm3-macos-${{github.sha}}/ - cp base.dylib d3xp.dylib ../publish/dhewm3-macos-${{github.sha}}/ + cp -r dhewm3.app ../publish/$PKGDIR/ + cp base.dylib d3xp.dylib ../publish/$PKGDIR/ cd .. # Copy misc assets - cp base/gamepad.cfg publish/dhewm3-macos-${{github.sha}}/base/ - cp base/gamepad-d3xp.cfg publish/dhewm3-macos-${{github.sha}}/d3xp/ - cp COPYING.txt publish/dhewm3-macos-${{github.sha}}/ - cp README.md publish/dhewm3-macos-${{github.sha}}/README.txt - cp Changelog.md publish/dhewm3-macos-${{github.sha}}/Changelog.txt - cp Configuration.md publish/dhewm3-macos-${{github.sha}}/Configuration.txt + cp base/gamepad.cfg publish/$PKGDIR/base/ + cp base/gamepad-d3xp.cfg publish/$PKGDIR/d3xp/ + cp COPYING.txt publish/$PKGDIR/ + cp README.md publish/$PKGDIR/README.txt + cp Changelog.md publish/$PKGDIR/Changelog.txt + cp Configuration.md publish/$PKGDIR/Configuration.txt - name: Upload testbuild package uses: actions/upload-artifact@v4 with: - name: quake2-macos-${{github.sha}} + name: ${{ env.pkgname }} path: publish/ if-no-files-found: error diff --git a/.github/workflows/win_msvc.yml b/.github/workflows/win_msvc.yml index a83dc5290..5ebc799d2 100644 --- a/.github/workflows/win_msvc.yml +++ b/.github/workflows/win_msvc.yml @@ -48,33 +48,44 @@ jobs: cmake -A Win32 -DDHEWM3LIBS="../dhewm3-libs-master/i686-w64-mingw32/" -DDEDICATED=ON -DTOOLS=ON -S neo/ -B build time cmake --build build/ --config RelWithDebInfo - name: Create testbuild package - env: - pkgdir: echo "dhewm3-win32-$(git rev-parse --short HEAD)" run: | # Create release directory tree - mkdir -p publish/${{ env.pkgdir }}/base - mkdir publish/${{ env.pkgdir }}/d3xp + export PKGDIR="dhewm3-win32-$(git rev-parse --short HEAD)" + echo "pkgname=$PKGDIR" >> $GITHUB_ENV + #echo "PKGDIR is $PKGDIR" + mkdir -p publish/$PKGDIR/base + mkdir publish/$PKGDIR/d3xp + mkdir -p debug-syms/$PKGDIR # Copy release assets cd build/RelWithDebInfo - cp dhewm3.exe dhewm3ded.exe base.dll d3xp.dll ../../publish/${{ env.pkgdir }}/ + # TODO: put debug symbols in extra zip + cp dhewm3.exe dhewm3ded.exe base.dll d3xp.dll ../../publish/$PKGDIR/ + cp -r *.pdb ../../debug-syms/$PKGDIR/ cd ../.. # Copy misc assets - cp base/gamepad.cfg publish/${{ env.pkgdir }}/base/ - cp base/gamepad-d3xp.cfg publish/${{ env.pkgdir }}/d3xp/ - cp COPYING.txt publish/${{ env.pkgdir }}/ - cp README.md publish/${{ env.pkgdir }}/README.txt - cp Changelog.md publish/${{ env.pkgdir }}/Changelog.txt - cp Configuration.md publish/${{ env.pkgdir }}/Configuration.txt + cp base/gamepad.cfg publish/$PKGDIR/base/ + cp base/gamepad-d3xp.cfg publish/$PKGDIR/d3xp/ + cp COPYING.txt publish/$PKGDIR/ + cp README.md publish/$PKGDIR/README.txt + cp Changelog.md publish/$PKGDIR/Changelog.txt + cp Configuration.md publish/$PKGDIR/Configuration.txt # copy runtime libraries (SDL, OpenAL, cURL) cd ../dhewm3-libs-master/i686-w64-mingw32/bin/ - cp OpenAL32.dll SDL2.dll libcurl-4.dll ../../../dhewm3/publish/${{ env.pkgdir }}/ + cp OpenAL32.dll SDL2.dll libcurl-4.dll ../../../dhewm3/publish/$PKGDIR/ cd - + #ls -R publish/ - name: Upload testbuild package uses: actions/upload-artifact@v4 with: - name: ${{ env.pkgdir }} + name: ${{ env.pkgname }} path: publish/ if-no-files-found: error + - name: Upload testbuild debug symbols + uses: actions/upload-artifact@v4 + with: + name: ${{ env.pkgname }}-debugsyms + path: debug-syms/ + if-no-files-found: error build_win_x86_64_msvc: runs-on: windows-latest defaults: @@ -110,26 +121,38 @@ jobs: - name: Create testbuild package run: | # Create release directory tree - mkdir -p publish/dhewm3-win64-${{github.sha}}/base - mkdir publish/dhewm3-win64-${{github.sha}}/d3xp + export PKGDIR="dhewm3-win64-$(git rev-parse --short HEAD)" + echo "pkgname=$PKGDIR" >> $GITHUB_ENV + #echo "PKGDIR is $PKGDIR" + mkdir -p publish/$PKGDIR/base + mkdir publish/$PKGDIR/d3xp + mkdir -p debug-syms/$PKGDIR # Copy release assets cd build/RelWithDebInfo - cp dhewm3.exe dhewm3ded.exe base.dll d3xp.dll ../../publish/dhewm3-win64-${{github.sha}}/ + cp dhewm3.exe dhewm3ded.exe base.dll d3xp.dll ../../publish/$PKGDIR/ + cp -r *.pdb ../../debug-syms/$PKGDIR/ cd ../.. # Copy misc assets - cp base/gamepad.cfg publish/dhewm3-win64-${{github.sha}}/base/ - cp base/gamepad-d3xp.cfg publish/dhewm3-win64-${{github.sha}}/d3xp/ - cp COPYING.txt publish/dhewm3-win64-${{github.sha}}/ - cp README.md publish/dhewm3-win64-${{github.sha}}/README.txt - cp Changelog.md publish/dhewm3-win64-${{github.sha}}/Changelog.txt - cp Configuration.md publish/dhewm3-win64-${{github.sha}}/Configuration.txt + cp base/gamepad.cfg publish/$PKGDIR/base/ + cp base/gamepad-d3xp.cfg publish/$PKGDIR/d3xp/ + cp COPYING.txt publish/$PKGDIR/ + cp README.md publish/$PKGDIR/README.txt + cp Changelog.md publish/$PKGDIR/Changelog.txt + cp Configuration.md publish/$PKGDIR/Configuration.txt # copy runtime libraries (SDL, OpenAL, cURL) cd ../dhewm3-libs-master/x86_64-w64-mingw32/bin/ - cp OpenAL32.dll SDL2.dll libcurl-4.dll ../../../dhewm3/publish/dhewm3-win64-${{github.sha}}/ + cp OpenAL32.dll SDL2.dll libcurl-4.dll ../../../dhewm3/publish/$PKGDIR/ cd - + #ls -R publish/ - name: Upload testbuild package uses: actions/upload-artifact@v4 with: - name: dhewm3-win64-${{github.sha}} + name: ${{ env.pkgname }} path: publish/ if-no-files-found: error + - name: Upload testbuild debug symbols + uses: actions/upload-artifact@v4 + with: + name: ${{ env.pkgname }}-debugsyms + path: debug-syms/ + if-no-files-found: error