diff --git a/.github/actions/iamf-tools-builder/action.yml b/.github/actions/iamf-tools-builder/action.yml new file mode 100644 index 00000000..7aa7218c --- /dev/null +++ b/.github/actions/iamf-tools-builder/action.yml @@ -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/... diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..6969021b --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/external/libexpat.BUILD b/external/libexpat.BUILD index 19baa80e..46ed71c5 100644 --- a/external/libexpat.BUILD +++ b/external/libexpat.BUILD @@ -30,6 +30,7 @@ cc_library( copts = ["-w"], defines = [ "XML_STATIC", + "XML_GE", ], # Internally `libexpat` does not qualify any headers. includes = [ diff --git a/iamf/cli/adm_to_user_metadata/adm/xml_to_adm.cc b/iamf/cli/adm_to_user_metadata/adm/xml_to_adm.cc index 75d7e62b..f3339b4b 100644 --- a/iamf/cli/adm_to_user_metadata/adm/xml_to_adm.cc +++ b/iamf/cli/adm_to_user_metadata/adm/xml_to_adm.cc @@ -189,13 +189,13 @@ bool IsUserMetadataDefined(absl::string_view xxxx_substring) { bool IsLoudspeakerLayoutValid(absl::string_view xxxx_substring) { static const absl::NoDestructor> 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); } @@ -205,9 +205,9 @@ bool IsLoudspeakerLayoutValid(absl::string_view xxxx_substring) { bool IsHoaLayoutValid(absl::string_view xxxx_substring) { static const absl::NoDestructor> 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); }