7 - '.github/workflows/makemhr.yml'
16 runs-on: windows-latest
19 - uses: actions/checkout@v3
21 - name: Get current date
22 run: echo "CurrentDate=$(date +'%Y-%m-%d')" >> $env:GITHUB_ENV
24 - name: Get commit hash
25 run: echo "CommitHash=$(git rev-parse --short=7 HEAD)" >> $env:GITHUB_ENV
27 - name: Clone libmysofa
28 run: git clone --depth 1 --branch v1.3.1 https://github.com/hoene/libmysofa.git libmysofa
30 - name: Add MSBuild to PATH
31 uses: microsoft/setup-msbuild@v1.1.3
33 - name: Restore libmysofa NuGet packages
34 working-directory: ${{github.workspace}}/libmysofa
35 run: nuget restore ${{github.workspace}}/libmysofa/windows/libmysofa.sln
37 - name: Build libmysofa
38 working-directory: ${{github.workspace}}/libmysofa
39 run: msbuild /m /p:Configuration=${{env.BUILD_TYPE}} ${{github.workspace}}/libmysofa/windows/libmysofa.sln
41 - name: Configure CMake
42 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"
45 run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
47 - name: Make Artifacts folder
52 - name: Collect artifacts
54 copy "build/Release/makemhr.exe" "Artifacts/makemhr.exe"
55 copy "libmysofa/windows/third-party/zlib-1.2.11/bin/zlib.dll" "Artifacts/zlib.dll"
57 - name: Upload makemhr artifact
58 uses: actions/upload-artifact@v3.1.1
63 - name: Compress artifacts
64 uses: papeloto/action-zip@v1
67 dest: "Release/makemhr.zip"
69 - name: GitHub pre-release
70 uses: "marvinpinto/action-automatic-releases@latest"
72 repo_token: "${{secrets.GITHUB_TOKEN}}"
73 automatic_release_tag: "makemhr"
75 title: "[${{env.CurrentDate}}] makemhr-${{env.CommitHash}}"
76 files: "Release/makemhr.zip"