Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with OpenAL Soft and release Win32/64 binaries with versions #52

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b37ac57
GitHub actions to build with OpenAL Soft and release Win32/64 artifac…
ThreeDeeJay Jun 3, 2022
98ed525
Bump DSOAL version to 1.0.1 and update DLL metadata
ThreeDeeJay Jun 3, 2022
a91370c
Revert "Bump DSOAL version to 1.0.1 and update DLL metadata"
ThreeDeeJay Jun 3, 2022
0753a56
Added fetchRecurseSubmodules
ThreeDeeJay Jun 4, 2022
00b605e
Add versions/commit hashes, documentation and update submodule
ThreeDeeJay Jun 21, 2022
00c33c4
Merge branch 'kcat:master' into master
ThreeDeeJay Jun 21, 2022
e20b690
Update openal-soft
ThreeDeeJay Jun 27, 2022
42d12d4
Merge branch 'master' of https://github.com/ThreeDeeJay/dsoal
ThreeDeeJay Jun 27, 2022
87ae4d4
Merge branch 'kcat:master' into master
ThreeDeeJay Jul 6, 2022
a90d0cc
Revert build type to fix binaries
ThreeDeeJay Aug 17, 2022
8956eed
Clone OpenAL Soft via Actions instead of submodule
ThreeDeeJay Oct 24, 2022
577f8bc
Optimize redundant workflow code with a matrix
ThreeDeeJay Jan 25, 2023
5bf8650
Merge branch 'kcat:master' into master
ThreeDeeJay Mar 12, 2023
38e9ba7
Merge branch 'kcat:master' into master
ThreeDeeJay Mar 14, 2023
e387b58
Add daily scheduled and manual runs
ThreeDeeJay Mar 28, 2023
a49b2aa
Merge branch 'kcat:master' into master
ThreeDeeJay Apr 6, 2023
2516abd
Clone kcat/dsoal so commit count matches main repo
ThreeDeeJay Aug 11, 2023
5e2db36
HRTF build, version details, and updated actions
ThreeDeeJay Aug 10, 2024
a5ff213
Fix build trigger on non-master branches
ThreeDeeJay Aug 10, 2024
f1f8d71
Use 8 characters for commit hash to match the log
ThreeDeeJay Aug 10, 2024
392f0f2
Use current DSOAL repo instead of hard-coded value
ThreeDeeJay Aug 10, 2024
d6aa9c2
Remove permissions: contents: write
ThreeDeeJay Aug 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 154 additions & 0 deletions .github/workflows/Tagged.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
name: Tagged build

on:
push:
tags:
- '*.*.*'
paths-ignore:
- '.github/workflows/Untagged.yaml'
workflow_dispatch:

env:
Configuration: Release
DSOALRepo: ${{github.repository}}
DSOALBranch: ${{github.ref_name}}
OpenALSoftRepo: kcat/openal-soft
OpenALSoftBranch: master

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 .
ThreeDeeJay marked this conversation as resolved.
Show resolved Hide resolved
git fetch --tags
echo "DSOALCommitTag=$(git describe --tags)" >> $env:GITHUB_ENV

- name: Clone OpenAL Soft
run: |
git clone --branch ${{env.OpenALSoftBranch}} https://github.com/${{env.OpenALSoftRepo}}.git
cd "openal-soft"
git fetch --tags
echo "OpenALSoftCommitTag=$(git describe --tags --abbrev=0 --match *.*.*)" >> $env:GITHUB_ENV
cd "${{github.workspace}}"

- name: Clone OpenAL Soft v${{env.OpenALSoftCommitTag}}
run: |
rm openal-soft -r -force
git clone --branch ${{env.OpenALSoftCommitTag}} https://github.com/${{env.OpenALSoftRepo}}.git

- name: Get version details
run: |
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
cd "openal-soft"
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
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 "v${{env.DSOALCommitTag}}-${{env.DSOALCommitHashShort}} ${{env.DSOALBranch}}" >> "DSOAL/Documentation/DSOAL-Version.txt"
echo "Commit #${{env.DSOALCommitCount}}" >> "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 "v${{env.OpenALSoftCommitTag}}-${{env.OpenALSoftCommitHashShort}} ${{env.OpenALSoftBranch}}" >> "DSOAL/Documentation/OpenALSoft-Version.txt"
echo "Commit #${{env.OpenALSoftCommitCount}}" >> "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_v${{env.DSOALCommitTag}}+OpenALSoft_v${{env.OpenALSoftCommitTag}}-${{matrix.config.name}}
path: DSOAL/

outputs:
DSOALBranch: ${{env.DSOALBranch}}
DSOALCommitHashShort: ${{env.DSOALCommitHashShort}}
DSOALCommitDate: ${{env.DSOALCommitDate}}
DSOALCommitCount: ${{env.DSOALCommitCount}}
DSOALCommitTag: ${{env.DSOALCommitTag}}
OpenALSoftRepo: ${{env.OpenALSoftRepo}}
OpenALSoftBranch: ${{env.OpenALSoftBranch}}
OpenALSoftCommitHashShort: ${{env.OpenALSoftCommitHashShort}}
OpenALSoftCommitDate: ${{env.OpenALSoftCommitDate}}
OpenALSoftCommitCount: ${{env.OpenALSoftCommitCount}}
OpenALSoftCommitTag: ${{env.OpenALSoftCommitTag}}

Release:
needs: Build
runs-on: ubuntu-latest
steps:

- name: Download a Build Artifact
uses: actions/download-artifact@v4
with:
path: Release

- name: Collect binaries
run: |
mv "Release/DSOAL_v${{needs.Build.outputs.DSOALCommitTag}}+OpenALSoft_v${{needs.Build.outputs.OpenALSoftCommitTag}}-Win32" "Release/Win32"
mv "Release/DSOAL_v${{needs.Build.outputs.DSOALCommitTag}}+OpenALSoft_v${{needs.Build.outputs.OpenALSoftCommitTag}}-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: |
cd Release
7z a DSOAL.zip ./DSOAL/*
7z a DSOAL+HRTF.zip ./DSOAL+HRTF/*

- name: GitHub pre-release
uses: "slord399/[email protected]"
with:
repo_token: "${{secrets.GITHUB_TOKEN}}"
automatic_release_tag: "${{needs.Build.outputs.DSOALCommitTag}}"
prerelease: false
title: "DSOAL v${{needs.Build.outputs.DSOALCommitTag}} + OpenAL Soft v${{needs.Build.outputs.OpenALSoftCommitTag}}"
files: "Release/*"
143 changes: 143 additions & 0 deletions .github/workflows/Untagged.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
name: Untagged build

on:
push:
branches:
- '*'
tags-ignore:
- '*.*.*'
paths-ignore:
- '.github/workflows/Tagged.yaml'
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

env:
Configuration: Release
DSOALRepo: ${{github.repository}}
DSOALBranch: ${{github.ref_name}}
OpenALSoftRepo: kcat/openal-soft
OpenALSoftBranch: master

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 "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
cd "openal-soft"
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
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 "r${{env.DSOALCommitCount}}@${{env.DSOALCommitHashShort}} ${{env.DSOALBranch}}" >> "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 "r${{env.OpenALSoftCommitCount}}@${{env.OpenALSoftCommitHashShort}} ${{env.OpenALSoftBranch}}" >> "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:
DSOALBranch: ${{env.DSOALBranch}}
DSOALCommitHashShort: ${{env.DSOALCommitHashShort}}
DSOALCommitDate: ${{env.DSOALCommitDate}}
DSOALCommitCount: ${{env.DSOALCommitCount}}
OpenALSoftRepo: ${{env.OpenALSoftRepo}}
OpenALSoftBranch: ${{env.OpenALSoftBranch}}
OpenALSoftCommitHashShort: ${{env.OpenALSoftCommitHashShort}}
OpenALSoftCommitDate: ${{env.OpenALSoftCommitDate}}
OpenALSoftCommitCount: ${{env.OpenALSoftCommitCount}}

Release:
needs: Build
runs-on: ubuntu-latest
steps:

- name: Download a Build Artifact
uses: actions/download-artifact@v4
with:
path: 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: |
cd Release
7z a DSOAL.zip ./DSOAL/*
7z a DSOAL+HRTF.zip ./DSOAL+HRTF/*

- name: GitHub pre-release
uses: "slord399/[email protected]"
with:
repo_token: "${{secrets.GITHUB_TOKEN}}"
automatic_release_tag: "latest-${{needs.Build.outputs.DSOALBranch}}"
prerelease: true
title: "DSOAL r${{needs.Build.outputs.DSOALCommitCount}}@${{needs.Build.outputs.DSOALCommitHashShort}} + OpenAL Soft r${{needs.Build.outputs.OpenALSoftCommitCount}}@${{needs.Build.outputs.OpenALSoftCommitHashShort}}"
files: "Release/*"
42 changes: 0 additions & 42 deletions .github/workflows/default-ci.yaml

This file was deleted.