diff --git a/.github/codespell-matcher.json b/.github/codespell-matcher.json new file mode 100644 index 0000000..70322a8 --- /dev/null +++ b/.github/codespell-matcher.json @@ -0,0 +1,16 @@ +{ + "problemMatcher": [ + { + "owner": "codespell", + "severity": "warning", + "pattern": [ + { + "regexp": "^(.+):(\\d+): (.+)$", + "file": 1, + "line": 2, + "message": 3 + } + ] + } + ] +} diff --git a/.github/codespell-matcher.json.license b/.github/codespell-matcher.json.license new file mode 100644 index 0000000..3beb5a4 --- /dev/null +++ b/.github/codespell-matcher.json.license @@ -0,0 +1,31 @@ +codespell-matcher.json +AVO2 Library + +SPDX-FileCopyrightText: 2010 University of North Carolina at Chapel Hill +SPDX-License-Identifier: Apache-2.0 + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +Please send all bug reports to . + +The authors may be contacted via: + +Jur van den Berg, Jamie Snape, Stephen J. Guy, and Dinesh Manocha +Dept. of Computer Science +201 S. Columbia St. +Frederick P. Brooks, Jr. Computer Science Bldg. +Chapel Hill, N.C. 27599-3175 +United States of America + + + diff --git a/.github/markdownlint-matcher.json b/.github/markdownlint-matcher.json new file mode 100644 index 0000000..420a607 --- /dev/null +++ b/.github/markdownlint-matcher.json @@ -0,0 +1,17 @@ +{ + "problemMatcher": [ + { + "owner": "markdownlint", + "severity": "warning", + "pattern": [ + { + "regexp": "^(.+):(\\d+): (MD\\d+) (.+)$", + "file": 1, + "line": 2, + "code": 3, + "message": 4 + } + ] + } + ] +} diff --git a/.github/markdownlint-matcher.json.license b/.github/markdownlint-matcher.json.license new file mode 100644 index 0000000..2cec08b --- /dev/null +++ b/.github/markdownlint-matcher.json.license @@ -0,0 +1,31 @@ +markdownlint-matcher.json +AVO2 Library + +SPDX-FileCopyrightText: 2010 University of North Carolina at Chapel Hill +SPDX-License-Identifier: Apache-2.0 + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +Please send all bug reports to . + +The authors may be contacted via: + +Jur van den Berg, Jamie Snape, Stephen J. Guy, and Dinesh Manocha +Dept. of Computer Science +201 S. Columbia St. +Frederick P. Brooks, Jr. Computer Science Bldg. +Chapel Hill, N.C. 27599-3175 +United States of America + + + diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml index 0ec3288..15422ce 100644 --- a/.github/workflows/actionlint.yml +++ b/.github/workflows/actionlint.yml @@ -70,7 +70,7 @@ jobs: actionlint: name: actionlint runs-on: ubuntu-latest - container: debian:trixie-slim + container: ubuntu:26.04 timeout-minutes: 20 steps: - name: setup diff --git a/.github/workflows/actions-lock.yml b/.github/workflows/actions-lock.yml index cf53f0e..1b6d520 100644 --- a/.github/workflows/actions-lock.yml +++ b/.github/workflows/actions-lock.yml @@ -62,6 +62,7 @@ jobs: verify: name: verify runs-on: ubuntu-latest + timeout-minutes: 10 steps: - name: checkout uses: actions/checkout@v7.0.1 diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock index c24b3c6..9f7f7e4 100644 --- a/.github/workflows/actions.lock +++ b/.github/workflows/actions.lock @@ -12,20 +12,31 @@ workflows: - 'actions/checkout@v7.0.1' '.github/workflows/buildifier.yml': - 'actions/checkout@v7.0.1' + '.github/workflows/check-jsonschema.yml': + - 'actions/checkout@v7.0.1' + - 'astral-sh/setup-uv@v10.4.0' '.github/workflows/cmake.yml': - 'actions/checkout@v7.0.1' '.github/workflows/codeql.yml': - 'actions/checkout@v7.0.1' - 'github/codeql-action@v4.39.5' + '.github/workflows/codespell.yml': + - 'actions/checkout@v7.0.1' + - 'astral-sh/setup-uv@v10.4.0' '.github/workflows/docker.yml': - 'actions/checkout@v7.0.1' - 'docker/build-push-action@v7.4.0' - 'docker/setup-buildx-action@v4.4.1' '.github/workflows/hadolint.yml': - 'actions/checkout@v7.0.1' + '.github/workflows/markdownlint.yml': + - 'actions/checkout@v7.0.1' '.github/workflows/reuse.yml': - 'actions/checkout@v7.0.1' - 'fsfe/reuse-action@v6.0.0' + '.github/workflows/validate-cff.yml': + - 'actions/checkout@v7.0.1' + - 'astral-sh/setup-uv@v10.4.0' '.github/workflows/yamllint.yml': - 'actions/checkout@v7.0.1' dependencies: @@ -39,6 +50,11 @@ dependencies: commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1' owner_id: 44036562 repo_id: 197814629 + 'astral-sh/setup-uv@v10.4.0': + ref: 'v10.4.0' + commit: 'sha1-1db35dd8eee11c5894872e0b383ae6c406cf738d' + owner_id: 115962839 + repo_id: 846733598 'docker/build-push-action@v7.4.0': ref: 'v7.4.0' commit: 'sha1-c3c9e263c25d99ce0380d002d59b67737d91b0dc' diff --git a/.github/workflows/buildifier.yml b/.github/workflows/buildifier.yml index 78ef0d5..45a1281 100644 --- a/.github/workflows/buildifier.yml +++ b/.github/workflows/buildifier.yml @@ -76,7 +76,7 @@ jobs: buildifier: name: buildifier runs-on: ubuntu-latest - container: debian:trixie-slim + container: ubuntu:26.04 timeout-minutes: 20 steps: - name: setup diff --git a/.github/workflows/check-jsonschema.yml b/.github/workflows/check-jsonschema.yml new file mode 100644 index 0000000..744bb65 --- /dev/null +++ b/.github/workflows/check-jsonschema.yml @@ -0,0 +1,116 @@ +# +# check-jsonschema.yml +# AVO2 Library +# +# SPDX-FileCopyrightText: 2010 University of North Carolina at Chapel Hill +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Please send all bug reports to . +# +# The authors may be contacted via: +# +# Jur van den Berg, Jamie Snape, Stephen J. Guy, and Dinesh Manocha +# Dept. of Computer Science +# 201 S. Columbia St. +# Frederick P. Brooks, Jr. Computer Science Bldg. +# Chapel Hill, N.C. 27599-3175 +# United States of America +# +# +# + +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json +--- +name: check-jsonschema + +on: # yamllint disable-line rule:truthy + push: + branches: + - main + paths: + - .github/workflows/*.yaml + - .github/workflows/*.yml + - compose.yaml + - renovate.json + pull_request: + branches: + - main + paths: + - .github/workflows/*.yaml + - .github/workflows/*.yml + - compose.yaml + - renovate.json + schedule: + - cron: '20 9 * * *' + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + check-jsonschema: + name: check-jsonschema + runs-on: ubuntu-latest + container: ubuntu:26.04 + timeout-minutes: 10 + steps: + - name: setup + run: | + apt-get -qq -o APT::Acquire::Retries=4 update \ + || (sleep 15; apt-get -qq -o APT::Acquire::Retries=4 update) + apt-get -qq -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 \ + --no-install-recommends install \ + ca-certificates \ + git + apt-get -qq -o Dpkg::Use-Pty=0 autoremove + rm -rf /var/lib/apt/lists/* + env: + DEBIAN_FRONTEND: noninteractive + shell: bash + - name: checkout + uses: actions/checkout@v7.0.1 + with: + persist-credentials: false + - name: setup uv + uses: astral-sh/setup-uv@v10.4.0 + with: + enable-cache: true + - name: install python + run: uv python install + shell: bash + - name: check-github-workflows + run: | + shopt -s nullglob + files=(.github/workflows/*.yaml .github/workflows/*.yml) + uvx check-jsonschema \ + --builtin-schema vendor.github-workflows "${files[@]}" + shell: bash + - name: check-github-workflows-require-timeout + run: | + shopt -s nullglob + files=(.github/workflows/*.yaml .github/workflows/*.yml) + uvx check-jsonschema \ + --builtin-schema custom.github-workflows-require-timeout \ + "${files[@]}" + shell: bash + - name: check-compose-spec + run: uvx check-jsonschema --builtin-schema vendor.compose-spec compose.yaml + shell: bash + - name: check-renovate + run: uvx check-jsonschema --builtin-schema vendor.renovate renovate.json + shell: bash diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 0c39e7f..41df553 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -58,6 +58,7 @@ jobs: analyze: name: analyze runs-on: ubuntu-latest + timeout-minutes: 60 steps: - name: checkout uses: actions/checkout@v7.0.1 diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000..6495964 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,93 @@ +# +# codespell.yml +# AVO2 Library +# +# SPDX-FileCopyrightText: 2010 University of North Carolina at Chapel Hill +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Please send all bug reports to . +# +# The authors may be contacted via: +# +# Jur van den Berg, Jamie Snape, Stephen J. Guy, and Dinesh Manocha +# Dept. of Computer Science +# 201 S. Columbia St. +# Frederick P. Brooks, Jr. Computer Science Bldg. +# Chapel Hill, N.C. 27599-3175 +# United States of America +# +# +# + +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json +--- +name: codespell + +on: # yamllint disable-line rule:truthy + push: + branches: + - main + pull_request: + branches: + - main + schedule: + - cron: '30 6 * * *' + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + codespell: + name: codespell + runs-on: ubuntu-latest + container: ubuntu:26.04 + timeout-minutes: 10 + steps: + - name: setup + run: | + apt-get -qq -o APT::Acquire::Retries=4 update \ + || (sleep 15; apt-get -qq -o APT::Acquire::Retries=4 update) + apt-get -qq -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 \ + --no-install-recommends install \ + ca-certificates \ + git + apt-get -qq -o Dpkg::Use-Pty=0 autoremove + rm -rf /var/lib/apt/lists/* + env: + DEBIAN_FRONTEND: noninteractive + shell: bash + - name: checkout + uses: actions/checkout@v7.0.1 + with: + persist-credentials: false + - name: setup uv + uses: astral-sh/setup-uv@v10.4.0 + with: + enable-cache: true + - name: install python + run: uv python install + shell: bash + - name: add problem matcher + run: | + echo "::add-matcher::${GITHUB_WORKSPACE}/.github/codespell-matcher.json" + shell: bash + - name: codespell + run: | + uvx codespell + shell: bash diff --git a/.github/workflows/hadolint.yml b/.github/workflows/hadolint.yml index 8dccd01..02b0821 100644 --- a/.github/workflows/hadolint.yml +++ b/.github/workflows/hadolint.yml @@ -68,7 +68,7 @@ jobs: hadolint: name: hadolint runs-on: ubuntu-latest - container: debian:trixie-slim + container: ubuntu:26.04 timeout-minutes: 20 steps: - name: setup diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml new file mode 100644 index 0000000..c2bfffa --- /dev/null +++ b/.github/workflows/markdownlint.yml @@ -0,0 +1,104 @@ +# +# markdownlint.yml +# AVO2 Library +# +# SPDX-FileCopyrightText: 2010 University of North Carolina at Chapel Hill +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Please send all bug reports to . +# +# The authors may be contacted via: +# +# Jur van den Berg, Jamie Snape, Stephen J. Guy, and Dinesh Manocha +# Dept. of Computer Science +# 201 S. Columbia St. +# Frederick P. Brooks, Jr. Computer Science Bldg. +# Chapel Hill, N.C. 27599-3175 +# United States of America +# +# +# + +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json +--- +name: markdownlint + +on: # yamllint disable-line rule:truthy + push: + branches: + - main + paths: + - '**/*.md' + - .github/markdownlint-matcher.json + - .github/workflows/markdownlint.yml + - .mdl_style.rb + - .mdlrc + - .mdlrc.style + pull_request: + branches: + - main + paths: + - '**/*.md' + - .github/markdownlint-matcher.json + - .github/workflows/markdownlint.yml + - .mdl_style.rb + - .mdlrc + - .mdlrc.style + schedule: + - cron: '50 7 * * *' + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + markdownlint: + name: markdownlint + runs-on: ubuntu-latest + container: ubuntu:26.04 + timeout-minutes: 10 + steps: + - name: setup + run: | + apt-get -qq -o APT::Acquire::Retries=4 update \ + || (sleep 15; apt-get -qq -o APT::Acquire::Retries=4 update) + apt-get -qq -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 \ + upgrade + apt-get -qq -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 \ + --no-install-recommends install \ + ca-certificates \ + git \ + markdownlint + apt-get -qq -o Dpkg::Use-Pty=0 autoremove + rm -rf /var/lib/apt/lists/* + env: + DEBIAN_FRONTEND: noninteractive + shell: bash + - name: checkout + uses: actions/checkout@v7.0.1 + with: + persist-credentials: false + - name: add problem matcher + run: | + echo "::add-matcher::${GITHUB_WORKSPACE}/.github/markdownlint-matcher.json" + shell: bash + - name: markdownlint + run: | + shopt -s dotglob globstar + mdl -- **/*.md + shell: bash diff --git a/.github/workflows/validate-cff.yml b/.github/workflows/validate-cff.yml new file mode 100644 index 0000000..18f4810 --- /dev/null +++ b/.github/workflows/validate-cff.yml @@ -0,0 +1,94 @@ +# +# validate-cff.yml +# AVO2 Library +# +# SPDX-FileCopyrightText: 2010 University of North Carolina at Chapel Hill +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Please send all bug reports to . +# +# The authors may be contacted via: +# +# Jur van den Berg, Jamie Snape, Stephen J. Guy, and Dinesh Manocha +# Dept. of Computer Science +# 201 S. Columbia St. +# Frederick P. Brooks, Jr. Computer Science Bldg. +# Chapel Hill, N.C. 27599-3175 +# United States of America +# +# +# + +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json +--- +name: validate-cff + +on: # yamllint disable-line rule:truthy + push: + branches: + - main + paths: + - .github/workflows/validate-cff.yml + - CITATION.cff + pull_request: + branches: + - main + paths: + - .github/workflows/validate-cff.yml + - CITATION.cff + schedule: + - cron: '00 9 * * *' + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + validate-cff: + name: validate-cff + runs-on: ubuntu-latest + container: ubuntu:26.04 + timeout-minutes: 10 + steps: + - name: setup + run: | + apt-get -qq -o APT::Acquire::Retries=4 update \ + || (sleep 15; apt-get -qq -o APT::Acquire::Retries=4 update) + apt-get -qq -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 \ + --no-install-recommends install \ + ca-certificates \ + git + apt-get -qq -o Dpkg::Use-Pty=0 autoremove + rm -rf /var/lib/apt/lists/* + env: + DEBIAN_FRONTEND: noninteractive + shell: bash + - name: checkout + uses: actions/checkout@v7.0.1 + with: + persist-credentials: false + - name: setup uv + uses: astral-sh/setup-uv@v10.4.0 + with: + enable-cache: true + - name: install python + run: uv python install + shell: bash + - name: validate-cff + run: uvx cffconvert --validate + shell: bash diff --git a/.github/workflows/yamllint.yml b/.github/workflows/yamllint.yml index 1ed7a79..ec93a40 100644 --- a/.github/workflows/yamllint.yml +++ b/.github/workflows/yamllint.yml @@ -61,10 +61,10 @@ concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: - yamllint-debian: - name: yamllint debian amd64 + yamllint: + name: yamllint runs-on: ubuntu-latest - container: debian:trixie-slim + container: ubuntu:26.04 timeout-minutes: 20 steps: - name: setup diff --git a/.hadolint.yaml b/.hadolint.yaml new file mode 100644 index 0000000..71ded14 --- /dev/null +++ b/.hadolint.yaml @@ -0,0 +1,48 @@ +# +# .hadolint.yaml +# AVO2 Library +# +# SPDX-FileCopyrightText: 2010 University of North Carolina at Chapel Hill +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Please send all bug reports to . +# +# The authors may be contacted via: +# +# Jur van den Berg, Jamie Snape, Stephen J. Guy, and Dinesh Manocha +# Dept. of Computer Science +# 201 S. Columbia St. +# Frederick P. Brooks, Jr. Computer Science Bldg. +# Chapel Hill, N.C. 27599-3175 +# United States of America +# +# +# + +# yaml-language-server: $schema=https://json.schemastore.org/hadolint.json +--- +label-schema: + org.opencontainers.image.authors: text + org.opencontainers.image.base.name: text + org.opencontainers.image.description: text + org.opencontainers.image.licenses: spdx + org.opencontainers.image.source: url + org.opencontainers.image.title: text + org.opencontainers.image.url: url + org.opencontainers.image.vendor: text + org.opencontainers.image.version: semver + +trustedRegistries: + - docker.io diff --git a/QUALITY_DECLARATION.md b/QUALITY_DECLARATION.md index b3a7b2a..8ac3dfe 100644 --- a/QUALITY_DECLARATION.md +++ b/QUALITY_DECLARATION.md @@ -128,6 +128,9 @@ and on a daily schedule: (amd64 and arm64), macOS (arm64), and Windows (amd64 and arm64). - [`.github/workflows/buildifier.yml`](.github/workflows/buildifier.yml): enforces Bazel file formatting with buildifier. +- [`.github/workflows/check-jsonschema.yml`](.github/workflows/check-jsonschema.yml): + validates [`compose.yaml`](compose.yaml) and [`renovate.json`](renovate.json) + against their respective schemas. - [`.github/workflows/cmake.yml`](.github/workflows/cmake.yml): builds and tests with CMake on AlmaLinux, Alpine Linux, Arch Linux, Fedora, openSUSE, Ubuntu (amd64 and arm64), macOS (arm64), and Windows (amd64 and arm64). CMake builds @@ -136,12 +139,18 @@ and on a daily schedule: `WARNINGS_AS_ERRORS`. - [`.github/workflows/codeql.yml`](.github/workflows/codeql.yml): runs GitHub CodeQL semantic code analysis for C++ on a weekly schedule. +- [`.github/workflows/codespell.yml`](.github/workflows/codespell.yml): + checks spelling in source files and documentation with codespell. - [`.github/workflows/docker.yml`](.github/workflows/docker.yml): builds the development environment Docker image (amd64 and arm64) on a weekly schedule. - [`.github/workflows/hadolint.yml`](.github/workflows/hadolint.yml): lints the Dockerfile with hadolint. +- [`.github/workflows/markdownlint.yml`](.github/workflows/markdownlint.yml): + lints Markdown files with markdownlint. - [`.github/workflows/reuse.yml`](.github/workflows/reuse.yml): verifies REUSE license compliance. +- [`.github/workflows/validate-cff.yml`](.github/workflows/validate-cff.yml): + validates [`CITATION.cff`](CITATION.cff) against the CFF schema. - [`.github/workflows/yamllint.yml`](.github/workflows/yamllint.yml): lints all YAML files with yamllint.