Skip to content

Commit ecf068f

Browse files
authored
Merge pull request #2 from trsonic/github-ci
Enable automated build and tests via GitHub Actions.
2 parents d72b251 + 26ce8f4 commit ecf068f

41 files changed

Lines changed: 555228 additions & 554475 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.bazelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# use it. Starting with bazel 8, this flag flips to default false.
33
common --enable_workspace
44

5+
build --enable_runfiles
6+
57
# Use the default C++ toolchain to build the tools used during the
68
# build.
79
build --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
@@ -18,4 +20,5 @@ build:macos --cxxopt=-std=c++20
1820
build:macos --cxxopt=-Wno-sign-compare
1921

2022
build:windows --cxxopt=-std:c++20
23+
build:windows --linkopt=/STACK:8388608
2124
startup --windows_enable_symlinks
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: obr-builder
2+
3+
description: Run unit tests for obr.
4+
5+
inputs:
6+
platform:
7+
description: "The platform to build for."
8+
type: string
9+
default: linux
10+
11+
runs:
12+
using: composite
13+
steps:
14+
- shell: bash
15+
run: |
16+
# Configure platform-specific settings.
17+
if [[ "${{inputs.platform}}" == "windows" ]]; then
18+
# Windows works best with a very short path as per https://bazel.build/configure/windows#long-path-issues.
19+
echo "startup --output_user_root=C:/" >> .bazelrc
20+
fi
21+
22+
# Run all unit tests.
23+
bazelisk test -c opt --test_output=errors obr/...
24+

.github/workflows/ci-bazel.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Bazel build and tests on multiple platforms.
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
linux-amd64:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout repo
10+
uses: actions/checkout@v4
11+
- name: Build
12+
uses: ./.github/actions/obr-builder
13+
with:
14+
platform: linux
15+
- name: Upload Bazel test logs
16+
if: always()
17+
uses: actions/upload-artifact@v4
18+
with:
19+
name: bazel-test-logs-linux-amd64
20+
path: bazel-testlogs/**/*.log
21+
22+
macos-arm64:
23+
runs-on: macos-latest
24+
steps:
25+
- name: Checkout repo
26+
uses: actions/checkout@v4
27+
- name: Build
28+
uses: ./.github/actions/obr-builder
29+
with:
30+
platform: macos
31+
- name: Upload Bazel test logs
32+
if: always()
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: bazel-test-logs-macos-arm64
36+
path: bazel-testlogs/**/*.log
37+
38+
macos-amd64:
39+
runs-on: macos-13
40+
steps:
41+
- name: Checkout repo
42+
uses: actions/checkout@v4
43+
- name: Build
44+
uses: ./.github/actions/obr-builder
45+
with:
46+
platform: macos
47+
- name: Upload Bazel test logs
48+
if: always()
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: bazel-test-logs-macos-amd64
52+
path: bazel-testlogs/**/*.log
53+
54+
windows:
55+
runs-on: windows-latest
56+
steps:
57+
- name: Checkout repo
58+
uses: actions/checkout@v4
59+
- name: Build
60+
uses: ./.github/actions/obr-builder
61+
with:
62+
platform: windows
63+
- name: Upload Bazel test logs
64+
if: always()
65+
uses: actions/upload-artifact@v4
66+
with:
67+
name: bazel-test-logs-windows
68+
path: bazel-testlogs/**/*.log
69+

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ add_library(pffft STATIC
5151
file(GLOB SourceFiles CONFIGURE_DEPENDS
5252
"${CMAKE_CURRENT_SOURCE_DIR}/obr/*/*.cc"
5353
"${CMAKE_CURRENT_SOURCE_DIR}/obr/*/*.h"
54+
"${CMAKE_CURRENT_SOURCE_DIR}/obr/ambisonic_binaural_decoder/binaural_filters/*.cc"
55+
"${CMAKE_CURRENT_SOURCE_DIR}/obr/ambisonic_binaural_decoder/binaural_filters/*.h"
5456
)
5557

5658
# Exclude the following files / directories.

WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ git_repository(
2121
git_repository(
2222
name = "pffft",
2323
build_file = "pffft.BUILD",
24-
commit = "180c2d62717c0150d8aebd165fce19ee4e5f86f9",
24+
commit = "d7a4c0206a29423478776d6b23a37bbb308f21d5",
2525
remote = "https://bitbucket.org/jpommier/pffft.git",
2626
)

obr/ambisonic_binaural_decoder/BUILD

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ cc_library(
1515
],
1616
)
1717

18-
cc_library(
19-
name = "binaural_filters",
20-
srcs = ["binaural_filters.cc"],
21-
hdrs = ["binaural_filters.h"],
22-
)
23-
2418
cc_library(
2519
name = "dsp_utils",
2620
srcs = ["dsp_utils.cc"],
@@ -100,10 +94,10 @@ cc_library(
10094
srcs = ["sh_hrir_creator.cc"],
10195
hdrs = ["sh_hrir_creator.h"],
10296
deps = [
103-
":binaural_filters",
10497
":planar_interleaved_conversion",
10598
":resampler",
10699
":wav",
100+
"//obr/ambisonic_binaural_decoder/binaural_filters:binaural_filters_wrapper",
107101
"//obr/audio_buffer",
108102
"//obr/common",
109103
"@com_google_absl//absl/log",

obr/ambisonic_binaural_decoder/binaural_filters.cc

Lines changed: 0 additions & 554425 deletions
This file was deleted.

obr/ambisonic_binaural_decoder/binaural_filters.h

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package(default_visibility = ["//obr:__subpackages__"])
2+
3+
cc_library(
4+
name = "binaural_filters_wrapper",
5+
srcs = [
6+
"binaural_filters_1_oa_l.cc",
7+
"binaural_filters_1_oa_r.cc",
8+
"binaural_filters_2_oa_l.cc",
9+
"binaural_filters_2_oa_r.cc",
10+
"binaural_filters_3_oa_l.cc",
11+
"binaural_filters_3_oa_r.cc",
12+
"binaural_filters_4_oa_l.cc",
13+
"binaural_filters_4_oa_r.cc",
14+
"binaural_filters_5_oa_l.cc",
15+
"binaural_filters_5_oa_r.cc",
16+
"binaural_filters_6_oa_l.cc",
17+
"binaural_filters_6_oa_r.cc",
18+
"binaural_filters_7_oa_l.cc",
19+
"binaural_filters_7_oa_r.cc",
20+
"binaural_filters_wrapper.cc",
21+
],
22+
hdrs = [
23+
"binaural_filters_1_oa_l.h",
24+
"binaural_filters_1_oa_r.h",
25+
"binaural_filters_2_oa_l.h",
26+
"binaural_filters_2_oa_r.h",
27+
"binaural_filters_3_oa_l.h",
28+
"binaural_filters_3_oa_r.h",
29+
"binaural_filters_4_oa_l.h",
30+
"binaural_filters_4_oa_r.h",
31+
"binaural_filters_5_oa_l.h",
32+
"binaural_filters_5_oa_r.h",
33+
"binaural_filters_6_oa_l.h",
34+
"binaural_filters_6_oa_r.h",
35+
"binaural_filters_7_oa_l.h",
36+
"binaural_filters_7_oa_r.h",
37+
"binaural_filters_wrapper.h",
38+
],
39+
deps = [],
40+
)

0 commit comments

Comments
 (0)