[#56] fix(build): define M_PI
manually if <math.h>
does not defin…
#62
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Build' | |
on: | |
push: | |
paths: | |
- include/*.h | |
- src/** | |
- vendor/** | |
- support/*.cmake | |
- CMakeLists.txt | |
- .github/workflows/build.yml | |
jobs: | |
linux: | |
name: "Linux" | |
runs-on: 'ubuntu-latest' | |
container: | |
image: 'ghcr.io/lmichaelis/images:clang-14' | |
steps: | |
- uses: 'actions/checkout@v3' | |
with: | |
submodules: 'recursive' | |
- name: 'Configure' | |
run: 'cmake -B build -DCMAKE_BUILD_TYPE=Release' | |
- name: 'Build' | |
run: 'cmake --build build --config Release' | |
- name: 'Publish Library' | |
uses: 'actions/upload-artifact@v3' | |
with: | |
name: 'Linux x86-64 Shared Object' | |
path: 'build/libdmusic*' | |
android: | |
name: "Android" | |
runs-on: 'ubuntu-latest' | |
container: | |
image: 'cimg/android:2023.04.1-ndk' | |
steps: | |
- uses: 'actions/checkout@v3' | |
with: | |
submodules: 'recursive' | |
- name: 'Configure' | |
run: 'cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_NDK="$(ANDROID_NDK_ROOT)" -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DCMAKE_ANDROID_STL_TYPE=c++_static' | |
- name: 'Build' | |
run: 'cmake --build build --config Release' | |
- name: 'Publish Library' | |
uses: 'actions/upload-artifact@v3' | |
with: | |
name: 'ARM x64 Shared Object' | |
path: 'build/libdmusic*' | |
macos: | |
name: "MacOS" | |
runs-on: 'macos-11' | |
steps: | |
- uses: 'actions/checkout@v3' | |
with: | |
submodules: 'recursive' | |
- uses: 'maxim-lobanov/setup-xcode@v1' | |
with: | |
xcode-version: 13 | |
- name: 'Configure' | |
run: 'cmake -B build -DCMAKE_BUILD_TYPE=Release' | |
- name: 'Build' | |
run: 'cmake --build build --config Release' | |
- name: 'Publish Library' | |
uses: 'actions/upload-artifact@v3' | |
with: | |
name: 'MacOS x86-64 DyLib' | |
path: 'build/libdmusic*' | |
windows: | |
name: "Windows" | |
runs-on: 'windows-latest' | |
defaults: | |
run: | |
shell: 'msys2 {0}' | |
steps: | |
- uses: 'actions/checkout@v3' | |
with: | |
submodules: 'recursive' | |
- name: 'Install MinGW' | |
uses: 'msys2/setup-msys2@v2' | |
with: | |
msystem: 'mingw64' | |
update: true | |
install: >- | |
git | |
make | |
pacboy: >- | |
toolchain:p | |
cmake:p | |
ninja:p | |
- name: 'Configure' | |
run: 'cmake -B build -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release' | |
- name: 'Build' | |
run: 'cmake --build build --config Release -j 2' | |
- name: 'Rename Artifact' | |
run: 'mv build/libdmusic.dll build/dmusic.dll' | |
- name: 'Publish Library' | |
uses: 'actions/upload-artifact@v3' | |
with: | |
name: 'Windows x86-64 DLL' | |
path: 'build/dmusic.dll' | |
windows-32: | |
name: "Windows (32-bit)" | |
runs-on: 'windows-latest' | |
defaults: | |
run: | |
shell: 'msys2 {0}' | |
steps: | |
- uses: 'actions/checkout@v3' | |
with: | |
submodules: 'recursive' | |
- name: 'Install MinGW' | |
uses: 'msys2/setup-msys2@v2' | |
with: | |
msystem: 'mingw32' | |
update: true | |
install: >- | |
git | |
make | |
pacboy: >- | |
toolchain:p | |
cmake:p | |
ninja:p | |
- name: 'Configure' | |
run: 'cmake -B build -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release' | |
- name: 'Build' | |
run: 'cmake --build build --config Release -j 2' | |
- name: 'Rename Artifact' | |
run: 'mv build/libdmusic.dll build/dmusic.dll' | |
- name: 'Publish Library' | |
uses: 'actions/upload-artifact@v3' | |
with: | |
name: 'Windows i386 DLL' | |
path: 'build/dmusic.dll' |