Skip to content

Commit

Permalink
Setup initial GitHub CI which runs all unit tests for linux-amd64.
Browse files Browse the repository at this point in the history
  - Fix some minor issues that the CI build environment exhibited.
  - Probably fixed [/issues/5](#5) for WSL.

PiperOrigin-RevId: 627701883
  • Loading branch information
jwcullen committed Apr 24, 2024
1 parent 0a93ec7 commit 600eaa4
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 10 deletions.
10 changes: 10 additions & 0 deletions .github/actions/iamf-tools-builder/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: iamf-tools-builder

description: Run unit tests for IAMF Tools.

runs:
using: composite
steps:
- shell: bash
run: |
bazelisk -c opt test iamf/...
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: build

on: [push, pull_request]

jobs:
linux-amd64:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Build
uses: ./.github/actions/iamf-tools-builder
with:
platform: linux
architecture: amd64
1 change: 1 addition & 0 deletions external/libexpat.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ cc_library(
copts = ["-w"],
defines = [
"XML_STATIC",
"XML_GE",
],
# Internally `libexpat` does not qualify any headers.
includes = [
Expand Down
20 changes: 10 additions & 10 deletions iamf/cli/adm_to_user_metadata/adm/xml_to_adm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,13 @@ bool IsUserMetadataDefined(absl::string_view xxxx_substring) {
bool IsLoudspeakerLayoutValid(absl::string_view xxxx_substring) {
static const absl::NoDestructor<absl::flat_hash_set<std::string>>
kValidLoudspeakerLayouts({
"0001", // Mono
"0002", // Stereo
"0003", // 5.1
"0004", // 5.1.2
"0005", // 5.1.4
"000f", // 7.1
"0017", // 7.1.4
{"0001"}, // Mono
{"0002"}, // Stereo
{"0003"}, // 5.1
{"0004"}, // 5.1.2
{"0005"}, // 5.1.4
{"000f"}, // 7.1
{"0017"}, // 7.1.4
});
return kValidLoudspeakerLayouts->contains(xxxx_substring);
}
Expand All @@ -205,9 +205,9 @@ bool IsLoudspeakerLayoutValid(absl::string_view xxxx_substring) {
bool IsHoaLayoutValid(absl::string_view xxxx_substring) {
static const absl::NoDestructor<absl::flat_hash_set<std::string>>
kValidHoaLayouts({
"0001", // First-order ambisonics.
"0002", // Second-order ambisonics.
"0003", // Third-order ambisonics.
{"0001"}, // First-order ambisonics.
{"0002"}, // Second-order ambisonics.
{"0003"}, // Third-order ambisonics.
});
return kValidHoaLayouts->contains(xxxx_substring);
}
Expand Down

0 comments on commit 600eaa4

Please sign in to comment.