Skip to content

Commit

Permalink
asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielGibson committed Aug 20, 2024
1 parent e347e3f commit 7da2169
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 46 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,27 @@ 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)
echo "dhewm3 for 64bit (amd64 aka x86_64 aka x64) Linux, built $(date)" > publish/$PKGDIR/README.txt
echo -e "from ${{ github.ref_name }} commit $${{ github.sha }}\n" >> publish/$PKGDIR/README.txt
cat 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
29 changes: 17 additions & 12 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
75 changes: 51 additions & 24 deletions .github/workflows/win_msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,33 +48,46 @@ 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/
echo "dhewm3 for 32bit (x86) Windows, built $(date)" > publish/$PKGDIR/README.txt
echo -e "from ${{ github.ref_name }} commit $${{ github.sha }}\n" >> publish/$PKGDIR/README.txt
cat 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:
Expand Down Expand Up @@ -110,26 +123,40 @@ 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/
echo "dhewm3 for 64bit (amd64 aka x86_64 aka x64) Windows, built $(date)" > publish/$PKGDIR/README.txt
echo -e "from ${{ github.ref_name }} commit $${{ github.sha }}\n" >> publish/$PKGDIR/README.txt
cat 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

0 comments on commit 7da2169

Please sign in to comment.