7 - '.github/workflows/utils.yml'
13 Branch: ${{github.ref_name}}
17 runs-on: windows-latest
20 - name: Clone repo and submodules
21 run: git clone https://github.com/${{github.repository}}.git . --branch ${{env.Branch}}
23 - name: Get current date, commit hash and count
25 echo "CommitDate=$(git show -s --date=format:'%Y-%m-%d' --format=%cd)" >> $env:GITHUB_ENV
26 echo "CommitHashShort=$(git rev-parse --short=7 HEAD)" >> $env:GITHUB_ENV
27 echo "CommitCount=$(git rev-list --count ${{env.Branch}} --)" >> $env:GITHUB_ENV
29 - name: Clone libmysofa
31 git clone https://github.com/ThreeDeeJay/libmysofa.git
33 git checkout 8642646ee6caca9085456bfa9d731200d68c25ca
35 - name: Add MSBuild to PATH
36 uses: microsoft/setup-msbuild@v1.1.3
38 - name: Restore libmysofa NuGet packages
39 working-directory: ${{github.workspace}}/libmysofa
40 run: nuget restore ${{github.workspace}}/libmysofa/windows/libmysofa.sln
42 - name: Build libmysofa
43 working-directory: ${{github.workspace}}/libmysofa
44 run: msbuild /m /p:Configuration=${{env.BUILD_TYPE}} ${{github.workspace}}/libmysofa/windows/libmysofa.sln
46 - name: Configure CMake
47 run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -D "MYSOFA_LIBRARY=${{github.workspace}}/libmysofa/windows/bin/x64/Release/mysofa.lib" -D "MYSOFA_INCLUDE_DIR=${{github.workspace}}/libmysofa/src/hrtf" -D "ZLIB_LIBRARY=${{github.workspace}}/libmysofa/windows/third-party/zlib-1.2.11/lib/zlib.lib" -D "ZLIB_INCLUDE_DIR=${{github.workspace}}/libmysofa/windows/third-party/zlib-1.2.11/include"
50 run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
52 - name: Make Artifacts folder
57 - name: Collect artifacts
59 copy "build/Release/makemhr.exe" "Artifacts/makemhr.exe"
60 copy "build/Release/sofa-info.exe" "Artifacts/sofa-info.exe"
61 copy "build/Release/alrecord.exe" "Artifacts/alrecord.exe"
62 copy "build/Release/altonegen.exe" "Artifacts/altonegen.exe"
63 copy "build/Release/openal-info.exe" "Artifacts/openal-info.exe"
64 copy "build/Release/allafplay.exe" "Artifacts/allafplay.exe"
65 copy "libmysofa/windows/third-party/zlib-1.2.11/bin/zlib.dll" "Artifacts/zlib.dll"
67 - name: Upload artifacts
68 uses: actions/upload-artifact@v4
70 name: ${{env.CommitDate}}_utils-r${{env.CommitCount}}@${{env.CommitHashShort}}
73 - name: Compress artifacts
74 uses: papeloto/action-zip@v1
77 dest: "Release/utils.zip"
79 - name: GitHub pre-release
80 uses: "marvinpinto/action-automatic-releases@latest"
82 repo_token: "${{secrets.GITHUB_TOKEN}}"
83 automatic_release_tag: "utils"
85 title: "[${{env.CommitDate}}] utils-r${{env.CommitCount}}@${{env.CommitHashShort}}"
86 files: "Release/utils.zip"