8 - '.github/workflows/utils.yml'
14 Branch: ${{github.ref_name}}
18 runs-on: windows-latest
21 - name: Clone repo and submodules
22 run: git clone https://github.com/${{github.repository}}.git . --branch ${{env.Branch}}
24 - name: Get current date, commit hash and count
26 echo "CommitDate=$(git show -s --date=format:'%Y-%m-%d' --format=%cd)" >> $env:GITHUB_ENV
27 echo "CommitHashShort=$(git rev-parse --short=7 HEAD)" >> $env:GITHUB_ENV
28 echo "CommitCount=$(git rev-list --count ${{env.Branch}} --)" >> $env:GITHUB_ENV
30 - name: Clone libmysofa
32 git clone https://github.com/hoene/libmysofa.git --branch v1.3.3
34 - name: Add MSBuild to PATH
35 uses: microsoft/setup-msbuild@v1.1.3
37 - name: Restore libmysofa NuGet packages
38 working-directory: ${{github.workspace}}/libmysofa
39 run: nuget restore ${{github.workspace}}/libmysofa/windows/libmysofa.sln
41 - name: Build libmysofa
42 working-directory: ${{github.workspace}}/libmysofa
43 run: msbuild /m /p:Configuration=${{env.BUILD_TYPE}} ${{github.workspace}}/libmysofa/windows/libmysofa.sln
45 - name: Configure CMake
46 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"
49 run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
51 - name: Make Artifacts folder
56 - name: Collect artifacts
58 copy "build/Release/makemhr.exe" "Artifacts/makemhr.exe"
59 copy "build/Release/sofa-info.exe" "Artifacts/sofa-info.exe"
60 copy "build/Release/alrecord.exe" "Artifacts/alrecord.exe"
61 copy "build/Release/altonegen.exe" "Artifacts/altonegen.exe"
62 copy "build/Release/openal-info.exe" "Artifacts/openal-info.exe"
63 copy "build/Release/allafplay.exe" "Artifacts/allafplay.exe"
64 copy "libmysofa/windows/third-party/zlib-1.2.11/bin/zlib.dll" "Artifacts/zlib.dll"
66 - name: Upload artifacts
67 uses: actions/upload-artifact@v4
69 name: ${{env.CommitDate}}_utils-r${{env.CommitCount}}@${{env.CommitHashShort}}
72 - name: Compress artifacts
73 uses: papeloto/action-zip@v1
76 dest: "Release/utils.zip"
78 - name: GitHub pre-release
79 uses: "marvinpinto/action-automatic-releases@latest"
81 repo_token: "${{secrets.GITHUB_TOKEN}}"
82 automatic_release_tag: "utils"
84 title: "[${{env.CommitDate}}] utils-r${{env.CommitCount}}@${{env.CommitHashShort}}"
85 files: "Release/utils.zip"