forked from kcat/dsoal
-
Notifications
You must be signed in to change notification settings - Fork 4
171 lines (153 loc) · 10.8 KB
/
Copy pathUntagged.yaml
File metadata and controls
171 lines (153 loc) · 10.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
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"
copy "${{github.workspace}}/fmt-11.2.0/LICENSE" "DSOAL/Documentation/DSOAL-License_fmt.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-License_BSD-3Clause.txt"
copy "${{github.workspace}}/openal-soft/LICENSE-pffft" "DSOAL/Documentation/OpenALSoft-License_PFFFT.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"
curl https://raw.githubusercontent.com/kcat/openal-soft/master/logging/log.cmd -o "Release/DSOAL/Win32/log.cmd"
curl https://raw.githubusercontent.com/kcat/openal-soft/master/logging/log.cmd -o "Release/DSOAL/Win64/log.cmd"
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 -mx=9
7z a DSOAL.7z ./Release/DSOAL ./Release/DSOAL+HRTF -mx=9 -m0=lzma2
cp DSOAL.zip DSOAL_r${{needs.Build.outputs.DSOALCommitCount}}.zip
cp DSOAL.7z DSOAL_r${{needs.Build.outputs.DSOALCommitCount}}.7z
- 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 DSOAL.7z