From e1c0c12c88713cc6f8919a5736fb341ba2de1a26 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 | 22 +++++++------ .github/workflows/macos.yml | 27 +++++++++------- .github/workflows/win_msvc.yml | 58 ++++++++++++++++++++-------------- 3 files changed, 61 insertions(+), 46 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 8cfaec195..c478cc9d7 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -39,22 +39,24 @@ 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/ + 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..6c4cbc10e 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -26,7 +26,8 @@ jobs: - name: Install build dependencies run: | brew update - brew install sdl2 openal-soft make cmake + brew install sdl2 openal-soft + # make cmake - name: Check out repository code uses: actions/checkout@v4 - name: Build @@ -37,25 +38,27 @@ jobs: - 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..ce823a1e5 100644 --- a/.github/workflows/win_msvc.yml +++ b/.github/workflows/win_msvc.yml @@ -48,31 +48,35 @@ 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 # Copy release assets cd build/RelWithDebInfo - cp dhewm3.exe dhewm3ded.exe base.dll d3xp.dll ../../publish/${{ env.pkgdir }}/ + # TODO: debug symbols + ls + cp dhewm3.exe dhewm3ded.exe base.dll d3xp.dll ../../publish/$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 build_win_x86_64_msvc: @@ -110,26 +114,32 @@ 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 # Copy release assets cd build/RelWithDebInfo - cp dhewm3.exe dhewm3ded.exe base.dll d3xp.dll ../../publish/dhewm3-win64-${{github.sha}}/ + # TODO: debug symbols + ls + cp dhewm3.exe dhewm3ded.exe base.dll d3xp.dll ../../publish/$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