From 91a4a0d96bcc2f57e7928d2b69650e9abe27e8f9 Mon Sep 17 00:00:00 2001 From: 3DJ <71472458+ThreeDeeJay@users.noreply.github.com> Date: Thu, 8 Aug 2024 06:46:48 -0400 Subject: [PATCH] Upgrade makemhr workflow to build and upload utils (#1026) * Upgrade makemhr workflow to build and upload utils - Includes makemhr, sofa-info, alrecord, altonegen, openal-info and allafplay Windows executables - Uses my libmysofa fork that removes a filesize/density limit, so that makemhr is able to convert larger SOFA files * Update libmysofa to latest upstream release (v1.3.2) * Restore libmysofa limit with an overflow check * Update utils.yml * Update utils.yml * Add commit date/count/hash to artifact filename * Update utils.yml * Update utils.yml * Fixed SOFA limit --- .github/workflows/{makemhr.yml => utils.yml} | 42 ++++++++++++-------- 1 file changed, 26 insertions(+), 16 deletions(-) rename .github/workflows/{makemhr.yml => utils.yml} (56%) diff --git a/.github/workflows/makemhr.yml b/.github/workflows/utils.yml similarity index 56% rename from .github/workflows/makemhr.yml rename to .github/workflows/utils.yml index 55fb1f1d6f..74ff8900d1 100644 --- a/.github/workflows/makemhr.yml +++ b/.github/workflows/utils.yml @@ -1,31 +1,36 @@ -name: makemhr +name: utils on: push: paths: - - 'utils/makemhr/**' - - '.github/workflows/makemhr.yml' + - 'utils/**' + - '.github/workflows/utils.yml' workflow_dispatch: env: BUILD_TYPE: Release + Branch: ${{github.ref_name}} jobs: Win64: runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - name: Clone repo and submodules + run: git clone https://github.com/${{github.repository}}.git . --branch ${{env.Branch}} - - name: Get current date - run: echo "CurrentDate=$(date +'%Y-%m-%d')" >> $env:GITHUB_ENV - - - name: Get commit hash - run: echo "CommitHash=$(git rev-parse --short=7 HEAD)" >> $env:GITHUB_ENV + - name: Get current date, commit hash and count + run: | + echo "CommitDate=$(git show -s --date=format:'%Y-%m-%d' --format=%cd)" >> $env:GITHUB_ENV + echo "CommitHashShort=$(git rev-parse --short=7 HEAD)" >> $env:GITHUB_ENV + echo "CommitCount=$(git rev-list --count ${{env.Branch}} --)" >> $env:GITHUB_ENV - name: Clone libmysofa - run: git clone --depth 1 --branch v1.3.1 https://github.com/hoene/libmysofa.git libmysofa + run: | + git clone https://github.com/ThreeDeeJay/libmysofa.git + cd libmysofa + git checkout 8642646ee6caca9085456bfa9d731200d68c25ca - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v1.1.3 @@ -52,25 +57,30 @@ jobs: - name: Collect artifacts run: | copy "build/Release/makemhr.exe" "Artifacts/makemhr.exe" + copy "build/Release/sofa-info.exe" "Artifacts/sofa-info.exe" + copy "build/Release/alrecord.exe" "Artifacts/alrecord.exe" + copy "build/Release/altonegen.exe" "Artifacts/altonegen.exe" + copy "build/Release/openal-info.exe" "Artifacts/openal-info.exe" + copy "build/Release/allafplay.exe" "Artifacts/allafplay.exe" copy "libmysofa/windows/third-party/zlib-1.2.11/bin/zlib.dll" "Artifacts/zlib.dll" - - name: Upload makemhr artifact + - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: makemhr + name: ${{env.CommitDate}}_utils-r${{env.CommitCount}}@${{env.CommitHashShort}} path: "Artifacts/" - name: Compress artifacts uses: papeloto/action-zip@v1 with: files: Artifacts/ - dest: "Release/makemhr.zip" + dest: "Release/utils.zip" - name: GitHub pre-release uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{secrets.GITHUB_TOKEN}}" - automatic_release_tag: "makemhr" + automatic_release_tag: "utils" prerelease: true - title: "[${{env.CurrentDate}}] makemhr-${{env.CommitHash}}" - files: "Release/makemhr.zip" + title: "[${{env.CommitDate}}] utils-r${{env.CommitCount}}@${{env.CommitHashShort}}" + files: "Release/utils.zip"