diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 64d5e4a7..ec311dd2 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -1,4 +1,7 @@ name: Build and Test +permissions: + contents: read + pull-requests: write on: workflow_dispatch: pull_request: @@ -72,11 +75,11 @@ jobs: if: ${{ matrix.name == 'macos-brew' }} shell: bash run: | - brew install git cmake expat uriparser curl + brew install expat uriparser - name: Install dependencies (macos-xcode-universal) if: ${{ matrix.name == 'macos-xcode-universal' }} - uses: maxim-lobanov/setup-xcode@v1 + uses: maxim-lobanov/setup-xcode@v1.7.0 with: xcode-version: latest-stable @@ -86,7 +89,7 @@ jobs: git --version cmake --version - - uses: actions/checkout@v4 + - uses: actions/checkout@v6.0.2 with: fetch-depth: 0 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index d7b468a5..36e75ef6 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -13,12 +13,8 @@ name: "CodeQL Advanced" on: push: - branches: [ "main" ] pull_request: - branches: [ "main" ] - schedule: - - cron: '45 10 * * 3' - + jobs: analyze: name: Analyze (${{ matrix.language }}) @@ -28,16 +24,6 @@ jobs: # - https://gh.io/using-larger-runners (GitHub.com only) # Consider using larger runners or machines with greater resources for possible analysis time improvements. runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} - permissions: - # required for all workflows - security-events: write - - # required to fetch internal or private CodeQL packs - packages: read - - # only required for workflows in private repositories - actions: read - contents: read strategy: fail-fast: false @@ -57,7 +43,7 @@ jobs: # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6.0.2 # Add any setup steps before running the `github/codeql-action/init` action. # This includes steps like installing compilers or runtimes (`actions/setup-node` @@ -67,7 +53,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v4 + uses: github/codeql-action/init@v4.35.1 with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} @@ -96,6 +82,6 @@ jobs: exit 1 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v4 + uses: github/codeql-action/analyze@v4.35.1 with: category: "/language:${{matrix.language}}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 50a26d4f..eede5862 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,7 @@ name: Release +permissions: + contents: read + pull-requests: write on: workflow_dispatch: jobs: @@ -6,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6.0.2 with: fetch-depth: 0 @@ -23,7 +26,7 @@ jobs: mv ../source_release . - name: Upload source release - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7.0.1 with: name: source-release path: | @@ -36,9 +39,9 @@ jobs: matrix: include: - name: windows - os: windows-2019 + os: windows-2022 - name: macos-xcode-universal - os: macos-13 + os: macos-14 - name: ubuntu os: ubuntu-latest @@ -60,12 +63,12 @@ jobs: uuid-dev \ libcurl4-openssl-dev - - uses: maxim-lobanov/setup-xcode@v1 + - uses: maxim-lobanov/setup-xcode@v1.7.0 if: ${{ contains(matrix.name, 'xcode') }} with: xcode-version: latest-stable - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v8.0.1 with: name: source-release @@ -108,7 +111,7 @@ jobs: - name: Upload binary release if: ${{ !contains(matrix.os, 'ubuntu') }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7.0.1 with: name: binary-release-${{ matrix.name }} path: | diff --git a/CHANGELOG.md b/CHANGELOG.md index c22fc8e7..5757851d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # bmx Changelog -## Version next +## v1.7 ### Breaking changes diff --git a/CMakeLists.txt b/CMakeLists.txt index cb73d177..23807229 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,9 +13,9 @@ else() endif() project(bmx - VERSION 1.6 + VERSION 1.7 DESCRIPTION "A C++ library and set of utilities to read and write the SMPTE ST 377-1 MXF file format" - HOMEPAGE_URL https://github.com/bbc/bmx + HOMEPAGE_URL https://github.com/ebu/bmx LANGUAGES C CXX ) diff --git a/Dockerfile b/Dockerfile index ad6e6e2d..6531ffd0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ################################################## # Build layer ################################################## -FROM debian:latest as build +FROM debian:latest AS build WORKDIR /build @@ -33,9 +33,9 @@ RUN mkdir build && cd build && \ ################################################## # Runtime layer ################################################## -FROM debian:latest as runtime +FROM debian:latest AS runtime -LABEL org.opencontainers.image.source=https://github.com/bbc/bmx +LABEL org.opencontainers.image.source=https://github.com/ebu/bmx LABEL org.opencontainers.image.description="A useful set of tools for handling MXF and related files" LABEL org.opencontainers.image.licenses=BSD-3-Clause diff --git a/README.md b/README.md index add89d8e..db8d0d60 100644 --- a/README.md +++ b/README.md @@ -156,7 +156,7 @@ project(example_project LANGUAGES CXX) include(FetchContent) FetchContent_Declare(bmx - GIT_REPOSITORY "https://github.com/bbc/bmx" + GIT_REPOSITORY "https://github.com/ebu/bmx" GIT_TAG "origin/main" ) FetchContent_MakeAvailable(bmx) @@ -240,7 +240,7 @@ This example runs `bmxtranswrap` from input `./sources/in.mxf` to output `./dest ## Source and Binary Distributions -Source distributions, including dependencies, and binaries are made available in the [Releases](https://github.com/bbc/bmx/releases) on GitHub. Older distributions can be found on [SourceForge](https://sourceforge.net/projects/bmxlib/files/). +Source distributions, including dependencies, and binaries are made available in the [Releases](https://github.com/ebu/bmx/releases) on GitHub. Older distributions can be found on [SourceForge](https://sourceforge.net/projects/bmxlib/files/). Source and binary distributions are generally only created when a new feature is required for creating standard compliant sample files for example, or when a release hasn't been made for a long time. diff --git a/cmake/ext_expat.cmake b/cmake/ext_expat.cmake index a8f9d00a..c6995b3e 100644 --- a/cmake/ext_expat.cmake +++ b/cmake/ext_expat.cmake @@ -3,7 +3,7 @@ if(expat_link_lib) endif() -if(MSVC OR BMX_BUILD_EXPAT_SOURCE) +if(BMX_BUILD_EXPAT_SOURCE) include(FetchContent) set(EXPAT_BUILD_DOCS OFF CACHE INTERNAL "") @@ -22,26 +22,16 @@ if(MSVC OR BMX_BUILD_EXPAT_SOURCE) ) else() FetchContent_Declare(FT_libexpat + SOURCE_SUBDIR expat GIT_REPOSITORY https://github.com/libexpat/libexpat - GIT_TAG R_2_5_0 + GIT_TAG R_2_8_0 ) endif() - # Use FetchContent_Populate because the CMakeLists.txt is in the expat/ sub-directory - FetchContent_GetProperties(FT_libexpat) - if(NOT FT_libexpat_POPULATED) - FetchContent_Populate(FT_libexpat) - - add_subdirectory("${ft_libexpat_SOURCE_DIR}/expat" ${ft_libexpat_BINARY_DIR}) - endif() + FetchContent_MakeAvailable(FT_libexpat) set(expat_link_lib expat) else() - include(FindEXPAT) - - if(NOT EXPAT_FOUND) - message(FATAL_ERROR "expat dependency not found") - endif() - + find_package(EXPAT REQUIRED) set(expat_link_lib EXPAT::EXPAT) endif() diff --git a/cmake/options.cmake b/cmake/options.cmake index a13a3add..667a5965 100644 --- a/cmake/options.cmake +++ b/cmake/options.cmake @@ -41,6 +41,9 @@ if(UNIX) elseif(MSVC) # Shared library currently not supported set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build using shared libraries") + + # Option to build expat from source in deps/ or from the git repo + option(BMX_BUILD_EXPAT_SOURCE "Build expat from source" ON) # Option to set to use the runtime set(BMX_SET_MSVC_RUNTIME "MD" CACHE STRING "Set MSVC debug/release runtime to 'MD' (MultiThreadedDLL), 'MT' (MultiThreaded) or 'default' (use the default)") diff --git a/deps/libMXF/CMakeLists.txt b/deps/libMXF/CMakeLists.txt index b1b01c5b..648ea435 100644 --- a/deps/libMXF/CMakeLists.txt +++ b/deps/libMXF/CMakeLists.txt @@ -13,7 +13,7 @@ else() endif() project(libMXF - VERSION 1.6 + VERSION 1.7 DESCRIPTION "Low-level C library for reading and writing the SMPTE ST 377-1 MXF file format" HOMEPAGE_URL https://github.com/bbc/libMXF LANGUAGES C CXX diff --git a/deps/libMXFpp/CMakeLists.txt b/deps/libMXFpp/CMakeLists.txt index e4ae81ec..dd6c66d3 100644 --- a/deps/libMXFpp/CMakeLists.txt +++ b/deps/libMXFpp/CMakeLists.txt @@ -13,7 +13,7 @@ else() endif() project(libMXF++ - VERSION 1.6 + VERSION 1.7 DESCRIPTION "C++ wrapper library for libMXF that supports reading and writing the SMPTE ST 377-1 MXF file format" HOMEPAGE_URL https://github.com/bbc/libMXFpp LANGUAGES CXX diff --git a/docs/release.md b/docs/release.md index 46115b84..8b4ce552 100644 --- a/docs/release.md +++ b/docs/release.md @@ -9,10 +9,10 @@ This describes the steps for making a release. * Go through the PRs since the last release and add each PR and descriptive text to the `Breaking changes`, `Features`, `Bug fixes` or `Build changes` sections * Update the versions in the 3 main CMakeLists.txt files in the `project` blocks, where `VERSION` has the form `.` * The files are [bmx CMakeLists.txt](../CMakeLists.txt), [libMXF CmakeLists.txt](../deps/libMXF/CMakeLists.txt) and [libMXFpp CmakeLists.txt](../deps/libMXFpp/CMakeLists.txt) -* Run the [Build & Test](https://github.com/bbc/bmx/actions/workflows/build_and_test.yml) workflow in GitHub Actions using the release branch and fix any build errors and warnings +* Run the [Build & Test](https://github.com/ebu/bmx/actions/workflows/build_and_test.yml) workflow in GitHub Actions using the release branch and fix any build errors and warnings * Check the [runner versions](https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners) (e.g. `windows-2019` and `macos-13`) in the [release.yml](../.github/workflows/release.yml) workflow file are still available * Select the oldest macOS version available to help with compatibility -* Run the [Release](https://github.com/bbc/bmx/actions/workflows/release.yml) workflow in GitHub Actions using the release branch to check it succeeds +* Run the [Release](https://github.com/ebu/bmx/actions/workflows/release.yml) workflow in GitHub Actions using the release branch to check it succeeds * On the release branch, create a temporary tag and then delete the tag once the workflow succeeds: ```bash @@ -43,18 +43,18 @@ git push origin v${BMX_VERSION} ## Create the Release Packages -* Run the [Release](https://github.com/bbc/bmx/actions/workflows/release.yml) workflow in GitHub Actions +* Run the [Release](https://github.com/ebu/bmx/actions/workflows/release.yml) workflow in GitHub Actions * Download the Artifacts and extract the individual source and binary zips for the release ## Create a GitHub Release -* Create a [new release](https://github.com/bbc/bmx/releases) +* Create a [new release](https://github.com/ebu/bmx/releases) * Copy the previous release's text as a starting point * Select the `v.` tag * Change the CHANGELOG link * Update the zip filenames with the new version * Update the compiler versions used for the binaries - * These can be found in the actions output in the `Win64 binary release` and `MacOS Universal binary release` build steps in the 2 jobs of the [Release](https://github.com/bbc/bmx/actions/workflows/release.yml) workflow in GitHub Actions + * These can be found in the actions output in the `Win64 binary release` and `MacOS Universal binary release` build steps in the 2 jobs of the [Release](https://github.com/ebu/bmx/actions/workflows/release.yml) workflow in GitHub Actions * Upload the source and binary zips to the release ## Create a Docker Image for the GitHub Container Registry diff --git a/meta/rdd6_xml_creator/index.html b/meta/rdd6_xml_creator/index.html index dd8b088d..d75a2791 100644 --- a/meta/rdd6_xml_creator/index.html +++ b/meta/rdd6_xml_creator/index.html @@ -17,10 +17,10 @@