Skip to content

Commit

Permalink
Upgrade makemhr workflow to build and upload utils (#1026)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ThreeDeeJay authored Aug 8, 2024
1 parent f44b824 commit 91a4a0d
Showing 1 changed file with 26 additions and 16 deletions.
42 changes: 26 additions & 16 deletions .github/workflows/makemhr.yml → .github/workflows/utils.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
Expand All @@ -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"

0 comments on commit 91a4a0d

Please sign in to comment.