Skip to content

Untagged build

Untagged build #38

Workflow file for this run

name: Untagged build
on:
push:
branches:
- "**"
tags:
- "!**"
paths-ignore:
- '.github/workflows/Tagged.yaml'
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
env:
Configuration: Release
DSOALRepo: ${{github.repository}}
DSOALBranch: ${{github.ref_name}}
OpenALSoftRepo: kcat/openal-soft
OpenALSoftBranch: master
GH_TOKEN: ${{github.token}}
jobs:
Build:
name: ${{matrix.config.name}}
runs-on: windows-latest
strategy:
matrix:
config:
- {
name: "Win32",
platform: "Win32"
}
- {
name: "Win64",
platform: "x64"
}
steps:
- name: Clone DSOAL
run: |
git clone --branch ${{env.DSOALBranch}} https://github.com/${{env.DSOALRepo}}.git .
- name: Clone OpenAL Soft
run: |
git clone --branch ${{env.OpenALSoftBranch}} https://github.com/${{env.OpenALSoftRepo}}.git
- name: Get version details
run: |
echo "DSOALCommitHash=$(git rev-parse HEAD)" >> $env:GITHUB_ENV
echo "DSOALCommitHashShort=$(git rev-parse --short=8 HEAD)" >> $env:GITHUB_ENV
echo "DSOALCommitDate=$(git show -s --date=iso-local --format=%cd)" >> $env:GITHUB_ENV
echo "DSOALCommitCount=$(git rev-list --count HEAD)" >> $env:GITHUB_ENV
echo "DSOALCommitTitle=$(git show --pretty=format:%s -s HEAD)" >> $env:GITHUB_ENV
cd "openal-soft"
echo "OpenALSoftCommitHash=$(git rev-parse HEAD)" >> $env:GITHUB_ENV
echo "OpenALSoftCommitHashShort=$(git rev-parse --short=8 HEAD)" >> $env:GITHUB_ENV
echo "OpenALSoftCommitDate=$(git show -s --date=iso-local --format=%cd)" >> $env:GITHUB_ENV
echo "OpenALSoftCommitCount=$(git rev-list --count HEAD)" >> $env:GITHUB_ENV
echo "OpenALSoftCommitTitle=$(git show --pretty=format:%s -s HEAD)" >> $env:GITHUB_ENV
cd "${{github.workspace}}"
- name: Build DSOAL
run: |
cmake -B "${{github.workspace}}/build" -A ${{matrix.config.platform}}
cmake --build "${{github.workspace}}/build" --config ${{env.Configuration}}
- name: Build OpenAL Soft
run: |
cmake -B "${{github.workspace}}/openal-soft/build" -DCMAKE_Configuration=${{env.Configuration}} -A ${{matrix.config.platform}} -DALSOFT_BUILD_ROUTER=ON -DALSOFT_REQUIRE_WINMM=ON -DALSOFT_REQUIRE_DSOUND=ON -DALSOFT_REQUIRE_WASAPI=ON "${{github.workspace}}/openal-soft"
cmake --build "${{github.workspace}}/openal-soft/build" --config ${{env.Configuration}}
- name: Collect binaries
run: |
mkdir "DSOAL"
mkdir "DSOAL/Documentation"
move "${{github.workspace}}/build/${{env.Configuration}}/dsound.dll" "DSOAL/dsound.dll"
move "${{github.workspace}}/openal-soft/build/${{env.Configuration}}/soft_oal.dll" "DSOAL/dsoal-aldrv.dll"
copy "${{github.workspace}}/openal-soft/alsoftrc.sample" "DSOAL/alsoft.ini"
copy "${{github.workspace}}/README.md" "DSOAL/Documentation/DSOAL-ReadMe.txt"
copy "${{github.workspace}}/LICENSE" "DSOAL/Documentation/DSOAL-License.txt"
echo "${{env.DSOALRepo}}" >> "DSOAL/Documentation/DSOAL-Version.txt"
echo "${{env.DSOALBranch}}" >> "DSOAL/Documentation/DSOAL-Version.txt"
echo "${{env.DSOALCommitHash}}" >> "DSOAL/Documentation/DSOAL-Version.txt"
echo "r${{env.DSOALCommitCount}}" >> "DSOAL/Documentation/DSOAL-Version.txt"
echo "${{env.DSOALCommitTitle}}" >> "DSOAL/Documentation/DSOAL-Version.txt"
echo "${{env.DSOALCommitDate}}" >> "DSOAL/Documentation/DSOAL-Version.txt"
copy "${{github.workspace}}/openal-soft/README.md" "DSOAL/Documentation/OpenALSoft-ReadMe.txt"
copy "${{github.workspace}}/openal-soft/COPYING" "DSOAL/Documentation/OpenALSoft-License.txt"
copy "${{github.workspace}}/openal-soft/BSD-3Clause" "DSOAL/Documentation/OpenALSoft-BSD-3Clause.txt"
copy "${{github.workspace}}/openal-soft/ChangeLog" "DSOAL/Documentation/OpenALSoft-ChangeLog.txt"
echo "${{env.OpenALSoftRepo}}" >> "DSOAL/Documentation/OpenALSoft-Version.txt"
echo "${{env.OpenALSoftBranch}}" >> "DSOAL/Documentation/OpenALSoft-Version.txt"
echo "${{env.OpenALSoftCommitHash}}" >> "DSOAL/Documentation/OpenALSoft-Version.txt"
echo "r${{env.OpenALSoftCommitCount}}" >> "DSOAL/Documentation/OpenALSoft-Version.txt"
echo "${{env.OpenALSoftCommitTitle}}" >> "DSOAL/Documentation/OpenALSoft-Version.txt"
echo "${{env.OpenALSoftCommitDate}}" >> "DSOAL/Documentation/OpenALSoft-Version.txt"
- name: Upload artifact to GitHub actions
uses: actions/upload-artifact@v4
with:
name: DSOAL_r${{env.DSOALCommitCount}}-${{env.DSOALCommitHashShort}}+OpenALSoft_r${{env.OpenALSoftCommitCount}}-${{env.OpenALSoftCommitHashShort}}-${{matrix.config.name}}
path: DSOAL/
outputs:
DSOALRepo: ${{env.DSOALRepo}}
DSOALBranch: ${{env.DSOALBranch}}
DSOALCommitHash: ${{env.DSOALCommitHash}}
DSOALCommitHashShort: ${{env.DSOALCommitHashShort}}
DSOALCommitCount: ${{env.DSOALCommitCount}}
DSOALCommitTitle: ${{env.DSOALCommitTitle}}
DSOALCommitDate: ${{env.DSOALCommitDate}}
OpenALSoftRepo: ${{env.OpenALSoftRepo}}
OpenALSoftBranch: ${{env.OpenALSoftBranch}}
OpenALSoftCommitHash: ${{env.OpenALSoftCommitHash}}
OpenALSoftCommitHashShort: ${{env.OpenALSoftCommitHashShort}}
OpenALSoftCommitCount: ${{env.OpenALSoftCommitCount}}
OpenALSoftCommitTitle: ${{env.OpenALSoftCommitTitle}}
OpenALSoftCommitDate: ${{env.OpenALSoftCommitDate}}
Release:
needs: Build
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
run: |
gh run download ${{github.run_id}} --repo ${{env.DSOALRepo}} --dir Release
- name: Collect binaries
run: |
mv "Release/DSOAL_r${{needs.Build.outputs.DSOALCommitCount}}-${{needs.Build.outputs.DSOALCommitHashShort}}+OpenALSoft_r${{needs.Build.outputs.OpenALSoftCommitCount}}-${{needs.Build.outputs.OpenALSoftCommitHashShort}}-Win32" "Release/Win32"
mv "Release/DSOAL_r${{needs.Build.outputs.DSOALCommitCount}}-${{needs.Build.outputs.DSOALCommitHashShort}}+OpenALSoft_r${{needs.Build.outputs.OpenALSoftCommitCount}}-${{needs.Build.outputs.OpenALSoftCommitHashShort}}-Win64" "Release/Win64"
mkdir "Release/DSOAL"
mv "Release/Win32" "Release/DSOAL/Win32"
mv "Release/Win64" "Release/DSOAL/Win64"
mv "Release/DSOAL/Win32/Documentation" "Release/DSOAL/Documentation"
rm -r "Release/DSOAL/Win64/Documentation"
cp -R "Release/DSOAL" "Release/DSOAL+HRTF"
mv "Release/DSOAL+HRTF/Win32/alsoft.ini" "Release/DSOAL+HRTF/Documentation/alsoft.ini"
rm "Release/DSOAL+HRTF/Win64/alsoft.ini"
curl https://raw.githubusercontent.com/${{needs.Build.outputs.OpenALSoftRepo}}/${{needs.Build.outputs.OpenALSoftBranch}}/configs/HRTF/alsoft.ini -o "Release/DSOAL+HRTF/Win32/alsoft.ini"
cp "Release/DSOAL+HRTF/Win32/alsoft.ini" "Release/DSOAL+HRTF/Win64/alsoft.ini"
- name: Compress artifacts
run: |
7z a ./Release/DSOAL_r${{needs.Build.outputs.DSOALCommitCount}}.zip ./Release/DSOAL ./Release/DSOAL+HRTF -m0=Copy
7z a DSOAL.zip ./Release/DSOAL_r${{needs.Build.outputs.DSOALCommitCount}}.zip -m0=lzma -mx=9
cp DSOAL.zip DSOAL_r${{needs.Build.outputs.DSOALCommitCount}}.zip
- name: Purge tag - latest-${{needs.Build.outputs.DSOALBranch}}
run: |
gh release delete latest-${{needs.Build.outputs.DSOALBranch}} --repo ${{env.DSOALRepo}} --cleanup-tag --yes || true
- name: Release - archive
run: |
gh release create archive --repo ${{env.DSOALRepo}} --target 98584ab11d231d36488bc055bdeb19b607706bc6 --latest=false --prerelease --title "DSOAL build archive" || true
gh release upload archive --repo ${{env.DSOALRepo}} --clobber DSOAL_r${{needs.Build.outputs.DSOALCommitCount}}.zip
- name: Release - latest-${{needs.Build.outputs.DSOALBranch}}
run: |
gh release create latest-${{needs.Build.outputs.DSOALBranch}} --repo ${{env.DSOALRepo}} --target ${{needs.Build.outputs.DSOALCommitHash}} --generate-notes --latest=true --prerelease --title "DSOAL r${{needs.Build.outputs.DSOALCommitCount}} + OpenAL Soft r${{needs.Build.outputs.OpenALSoftCommitCount}}" --notes "DSOAL r${{needs.Build.outputs.DSOALCommitCount}}-${{needs.Build.outputs.DSOALCommitHashShort}} ${{needs.Build.outputs.DSOALBranch}} - ${{needs.Build.outputs.DSOALCommitTitle}} [${{needs.Build.outputs.DSOALCommitDate}}]
OpenAL Soft r${{needs.Build.outputs.OpenALSoftCommitCount}}-${{needs.Build.outputs.OpenALSoftCommitHashShort}} ${{needs.Build.outputs.OpenALSoftBranch}} - ${{needs.Build.outputs.OpenALSoftCommitTitle}} [${{needs.Build.outputs.OpenALSoftCommitDate}}]
Build log: https://github.com/${{env.DSOALRepo}}/actions/runs/${{github.run_id}}"
gh release upload latest-${{needs.Build.outputs.DSOALBranch}} --repo ${{env.DSOALRepo}} --clobber DSOAL.zip