diff --git a/.editorconfig b/.editorconfig index 163c5bf..a1f924e 100644 --- a/.editorconfig +++ b/.editorconfig @@ -51,6 +51,9 @@ indent_size = 4 [*.md] trim_trailing_whitespace = false +[*.{yaml,yml}] +max_line_length = 88 + [.bazelignore] indent_size = 4 diff --git a/.github/actionlint-matcher.json b/.github/actionlint-matcher.json new file mode 100644 index 0000000..bad0289 --- /dev/null +++ b/.github/actionlint-matcher.json @@ -0,0 +1,17 @@ +{ + "problemMatcher": [ + { + "owner": "actionlint", + "pattern": [ + { + "regexp": "^(.+):(\\d+):(\\d+): (.+) \\[(.+)\\]$", + "file": 1, + "line": 2, + "column": 3, + "message": 4, + "code": 5 + } + ] + } + ] +} diff --git a/.github/actionlint-matcher.json.license b/.github/actionlint-matcher.json.license new file mode 100644 index 0000000..f51f40c --- /dev/null +++ b/.github/actionlint-matcher.json.license @@ -0,0 +1,31 @@ +actionlint-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/actionlint.yaml b/.github/actionlint.yaml new file mode 100644 index 0000000..f86e0a7 --- /dev/null +++ b/.github/actionlint.yaml @@ -0,0 +1,38 @@ +# +# actionlint.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/actionlint.json +--- +self-hosted-runner: + labels: + - ubuntu-26.04-arm diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml new file mode 100644 index 0000000..1e1160d --- /dev/null +++ b/.github/workflows/actionlint.yml @@ -0,0 +1,91 @@ +# +# actionlint.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: actionlint + +on: # yamllint disable-line rule:truthy + push: + branches: + - main + pull_request: + branches: + - main + schedule: + - cron: '40 7 * * *' + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + actionlint: + name: actionlint + runs-on: ubuntu-latest + container: debian:trixie-slim + timeout-minutes: 20 + 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 \ + golang \ + shellcheck + apt-get -qq -o Dpkg::Use-Pty=0 autoremove + rm -rf /var/lib/apt/lists/* + go install github.com/rhysd/actionlint/cmd/actionlint@v1.7.12 + env: + DEBIAN_FRONTEND: noninteractive + shell: bash + - name: checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: add problem matcher + run: | + echo "::add-matcher::${GITHUB_WORKSPACE}/.github/actionlint-matcher.json" + shell: bash + - name: actionlint + run: | + "$(go env GOPATH)/bin/actionlint" -oneline + shell: bash diff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.yml new file mode 100644 index 0000000..263a1a6 --- /dev/null +++ b/.github/workflows/bazel.yml @@ -0,0 +1,581 @@ +# +# bazel.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: bazel + +on: # yamllint disable-line rule:truthy + push: + branches: + - main + pull_request: + branches: + - main + schedule: + - cron: '0 5 * * *' + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + bazel-almalinux: + name: bazel almalinux amd64 + runs-on: ubuntu-latest + container: almalinux:10 + timeout-minutes: 30 + steps: + - name: setup + id: setup + run: | + dnf makecache -q --refresh || (sleep 15; dnf makecache -q --refresh) + dnf upgrade -q -y + dnf install -q -y \ + ca-certificates \ + gcc-c++ \ + git \ + python3 \ + wget \ + which + dnf clean all + rm -rf /var/cache/yum + wget --tries=4 --waitretry=15 --retry-on-http-error=429,500,502,503,504 \ + -qO /usr/local/bin/bazelisk \ + https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 + chmod +x /usr/local/bin/bazelisk + ln -s /usr/local/bin/bazelisk /usr/local/bin/bazel + . /etc/os-release + echo "os=${ID}-${VERSION_ID:-rolling}" >> "$GITHUB_OUTPUT" + echo "gcc=$(gcc -dumpfullversion -dumpversion)" >> "$GITHUB_OUTPUT" + shell: bash + - name: checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: cache bazel + uses: actions/cache@v6 + with: + path: | + ~/.cache/bazel + ~/.cache/bazelisk + key: ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', '**/*.bazel', '**/*.bzl') }} # yamllint disable-line rule:line-length + restore-keys: ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel- # yamllint disable-line rule:line-length + - name: build test package + run: | + bazel test \ + --features=treat_warnings_as_errors \ + --flaky_test_attempts=3 \ + ... + shell: bash + + bazel-arch: + name: bazel arch linux amd64 + runs-on: ubuntu-latest + container: archlinux:latest + timeout-minutes: 30 + steps: + - name: setup + id: setup + run: | + pacman --needed --noconfirm --noprogressbar -S -u -y \ + ca-certificates \ + gcc \ + git \ + python \ + wget \ + which + rm -rf \ + /var/cache/pacman/pkg/* \ + /var/lib/pacman/sync/* + wget --tries=4 --waitretry=15 --retry-on-http-error=429,500,502,503,504 \ + -qO /usr/local/bin/bazelisk \ + https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 + chmod +x /usr/local/bin/bazelisk + ln -s /usr/local/bin/bazelisk /usr/local/bin/bazel + . /etc/os-release + echo "os=${ID}-${VERSION_ID:-rolling}" >> "$GITHUB_OUTPUT" + echo "gcc=$(gcc -dumpfullversion -dumpversion)" >> "$GITHUB_OUTPUT" + shell: bash + - name: checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: cache bazel + uses: actions/cache@v6 + with: + path: | + ~/.cache/bazel + ~/.cache/bazelisk + key: ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', '**/*.bazel', '**/*.bzl') }} # yamllint disable-line rule:line-length + restore-keys: ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel- # yamllint disable-line rule:line-length + - name: build test package + run: | + bazel test \ + --features=treat_warnings_as_errors \ + --flaky_test_attempts=3 \ + ... + shell: bash + + bazel-fedora: + name: bazel fedora linux amd64 + runs-on: ubuntu-latest + container: fedora:44 + timeout-minutes: 30 + steps: + - name: setup + id: setup + run: | + dnf makecache -q --refresh || (sleep 15; dnf makecache -q --refresh) + dnf upgrade -q -y + dnf install -q -y \ + ca-certificates \ + gcc-c++ \ + git \ + python3 \ + wget \ + which + dnf clean all + rm -rf /var/cache/yum + wget --tries=4 --waitretry=15 --retry-on-http-error=429,500,502,503,504 \ + -qO /usr/local/bin/bazelisk \ + https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 + chmod +x /usr/local/bin/bazelisk + ln -s /usr/local/bin/bazelisk /usr/local/bin/bazel + . /etc/os-release + echo "os=${ID}-${VERSION_ID:-rolling}" >> "$GITHUB_OUTPUT" + echo "gcc=$(gcc -dumpfullversion -dumpversion)" >> "$GITHUB_OUTPUT" + shell: bash + - name: checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: cache bazel + uses: actions/cache@v6 + with: + path: | + ~/.cache/bazel + ~/.cache/bazelisk + key: ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', '**/*.bazel', '**/*.bzl') }} # yamllint disable-line rule:line-length + restore-keys: ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel- # yamllint disable-line rule:line-length + - name: build test package + run: | + bazel test \ + --features=treat_warnings_as_errors \ + --flaky_test_attempts=3 \ + ... + shell: bash + + bazel-macos: + name: bazel macos arm64 + runs-on: macos-26 + timeout-minutes: 30 + steps: + - name: setup + run: | + brew update -q || (sleep 15; brew update -q) + brew install -q \ + bazelisk \ + git + env: + HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + HOMEBREW_NO_ANALYTICS: 1 + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_INSTALL_CLEANUP: 1 + shell: zsh -efuo pipefail {0} + - name: checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: cache bazel + uses: actions/cache@v6 + with: + path: | + ~/Library/Caches/bazel + ~/Library/Caches/bazelisk + key: ${{ runner.os }}-${{ runner.arch }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', '**/*.bazel', '**/*.bzl') }} # yamllint disable-line rule:line-length + restore-keys: | + ${{ runner.os }}-${{ runner.arch }}-bazel- + - name: build test package + run: | + bazel test \ + --features=treat_warnings_as_errors \ + --flaky_test_attempts=3 \ + ... + shell: zsh -efuo pipefail {0} + + bazel-opensuse: + name: bazel opensuse leap amd64 + runs-on: ubuntu-latest + container: opensuse/leap:16.1 + timeout-minutes: 30 + steps: + - name: setup + id: setup + run: | + zypper -n -q ref || (sleep 15; zypper -n -q ref) + zypper -n -q up + zypper -n -q in --no-recommends \ + ca-certificates \ + gcc-c++ \ + git \ + python3 \ + wget \ + which + zypper -n -q cc -a + wget --tries=4 --waitretry=15 --retry-on-http-error=429,500,502,503,504 \ + -qO /usr/local/bin/bazelisk \ + https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 + chmod +x /usr/local/bin/bazelisk + ln -s /usr/local/bin/bazelisk /usr/local/bin/bazel + . /etc/os-release + echo "os=${ID}-${VERSION_ID:-rolling}" >> "$GITHUB_OUTPUT" + echo "gcc=$(gcc -dumpfullversion -dumpversion)" >> "$GITHUB_OUTPUT" + shell: bash + - name: checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: cache bazel + uses: actions/cache@v6 + with: + path: | + ~/.cache/bazel + ~/.cache/bazelisk + key: ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', '**/*.bazel', '**/*.bzl') }} # yamllint disable-line rule:line-length + restore-keys: ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel- # yamllint disable-line rule:line-length + - name: build test package + run: | + bazel test \ + --features=treat_warnings_as_errors \ + --flaky_test_attempts=3 \ + ... + shell: bash + + bazel-ubuntu: + name: bazel ubuntu amd64 + runs-on: ubuntu-latest + container: ubuntu:26.04 + timeout-minutes: 30 + steps: + - name: setup + id: 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 \ + g++ \ + git \ + python-is-python3 \ + wget + apt-get -qq -o Dpkg::Use-Pty=0 autoremove + rm -rf /var/lib/apt/lists/* + wget --tries=4 --waitretry=15 --retry-on-http-error=429,500,502,503,504 \ + -q \ + https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-amd64.deb + dpkg -i bazelisk-amd64.deb + rm -rf bazelisk-amd64.deb + . /etc/os-release + echo "os=${ID}-${VERSION_ID:-rolling}" >> "$GITHUB_OUTPUT" + echo "gcc=$(gcc -dumpfullversion -dumpversion)" >> "$GITHUB_OUTPUT" + env: + DEBIAN_FRONTEND: noninteractive + shell: bash + - name: checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: cache bazel + uses: actions/cache@v6 + with: + path: | + ~/.cache/bazel + ~/.cache/bazelisk + key: ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', '**/*.bazel', '**/*.bzl') }} # yamllint disable-line rule:line-length + restore-keys: ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel- # yamllint disable-line rule:line-length + - name: build test package + run: | + bazel test \ + --features=treat_warnings_as_errors \ + --flaky_test_attempts=3 \ + ... + shell: bash + + bazel-ubuntu-arm64: + name: bazel ubuntu arm64 + runs-on: ubuntu-26.04-arm + container: ubuntu:26.04 + timeout-minutes: 30 + steps: + - name: setup + id: 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 \ + g++ \ + git \ + python-is-python3 \ + wget + apt-get -qq -o Dpkg::Use-Pty=0 autoremove + rm -rf /var/lib/apt/lists/* + wget --tries=4 --waitretry=15 --retry-on-http-error=429,500,502,503,504 \ + -q \ + https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-arm64.deb + dpkg -i bazelisk-arm64.deb + rm -rf bazelisk-arm64.deb + . /etc/os-release + echo "os=${ID}-${VERSION_ID:-rolling}" >> "$GITHUB_OUTPUT" + echo "gcc=$(gcc -dumpfullversion -dumpversion)" >> "$GITHUB_OUTPUT" + env: + DEBIAN_FRONTEND: noninteractive + shell: bash + - name: checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: cache bazel + uses: actions/cache@v6 + with: + path: | + ~/.cache/bazel + ~/.cache/bazelisk + key: ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', '**/*.bazel', '**/*.bzl') }} # yamllint disable-line rule:line-length + restore-keys: ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel- # yamllint disable-line rule:line-length + - name: build test package + run: | + bazel test \ + --features=treat_warnings_as_errors \ + --flaky_test_attempts=3 \ + ... + shell: bash + + bazel-windows: + name: bazel windows x64 + runs-on: windows-latest + timeout-minutes: 30 + steps: + - name: setup + run: | + $ErrorActionPreference = 'Stop' + $moduleInstalled = $false + for ($i = 1; $i -le 3; $i++) { + try { + if (-not $moduleInstalled) { + Install-Module -Force -Name Microsoft.WinGet.Client + $moduleInstalled = $true + } + $package = Get-WinGetPackage -Id Bazel.Bazelisk ` + -MatchOption Equals -ErrorAction SilentlyContinue + if (-not $package) { + $result = Install-WinGetPackage -Id Bazel.Bazelisk ` + -MatchOption Equals -Mode Silent -Verbose + if ($result.Status -ne 'Ok') { + Write-Host ($result | Format-List * | Out-String) + throw ("WinGet install failed: " + + "$($result.Status) ($($result.ExtendedErrorCode))") + } + } elseif ($package.IsUpdateAvailable) { + $result = Update-WinGetPackage -Id Bazel.Bazelisk ` + -MatchOption Equals -Mode Silent -Verbose + if ($result.Status -ne 'Ok') { + Write-Host ($result | Format-List * | Out-String) + throw ("WinGet update failed: " + + "$($result.Status) ($($result.ExtendedErrorCode))") + } + } + $package = Get-WinGetPackage -Id Git.Git ` + -MatchOption Equals -ErrorAction SilentlyContinue + if (-not $package) { + $result = Install-WinGetPackage -Id Git.Git ` + -MatchOption Equals -Mode Silent + if ($result.Status -ne 'Ok') { + throw \"WinGet install failed: $($result.Status)\" + } + } elseif ($package.IsUpdateAvailable) { + $result = Update-WinGetPackage -Id Git.Git ` + -MatchOption Equals -Mode Silent + if ($result.Status -ne 'Ok') { + throw \"WinGet update failed: $($result.Status)\" + } + } + break + } catch { + if ($i -eq 3) { + $diagDir = Join-Path $env:LOCALAPPDATA ` + 'Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir' + Get-ChildItem $diagDir -Filter 'WinGetCOM-*.log' ` + -ErrorAction SilentlyContinue | + Sort-Object LastWriteTime -Descending | + Select-Object -First 2 | + ForEach-Object { + Write-Host "=== $($_.Name) ===" + Get-Content $_.FullName -Tail 80 + } + throw + } + if ($moduleInstalled) { + try { Repair-WinGetPackageManager -Force -Latest } catch {} + } + Start-Sleep -Seconds 15 + } + } + Add-Content $env:GITHUB_PATH ( + [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + ` + [System.Environment]::GetEnvironmentVariable("Path", "User")) + shell: pwsh + - name: checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: cache bazel + uses: actions/cache@v6 + with: + path: | + ~\AppData\Local\bazel-cache + ~\AppData\Local\bazelisk + key: ${{ runner.os }}-${{ runner.arch }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', '**/*.bazel', '**/*.bzl') }} # yamllint disable-line rule:line-length + restore-keys: | + ${{ runner.os }}-${{ runner.arch }}-bazel- + - name: build test package + run: | + $PSNativeCommandUseErrorActionPreference = $true + bazelisk test ` + --disk_cache="$env:LOCALAPPDATA\bazel-cache\disk" ` + --features=treat_warnings_as_errors ` + --repository_cache="$env:LOCALAPPDATA\bazel-cache\repo" ` + --flaky_test_attempts=3 ` + ... + shell: pwsh + + bazel-windows-arm64: + name: bazel windows arm64 + runs-on: windows-11-arm + timeout-minutes: 30 + steps: + - name: setup + run: | + $ErrorActionPreference = 'Stop' + $moduleInstalled = $false + for ($i = 1; $i -le 3; $i++) { + try { + if (-not $moduleInstalled) { + Install-Module -Force -Name Microsoft.WinGet.Client + $moduleInstalled = $true + } + $bazeliskDir = Join-Path $env:LOCALAPPDATA 'Programs\bazelisk' + $bazeliskExe = Join-Path $bazeliskDir 'bazelisk.exe' + if (-not (Test-Path $bazeliskExe)) { + $bazeliskTmp = "$bazeliskExe.tmp" + New-Item -ItemType Directory -Force -Path $bazeliskDir | Out-Null + Invoke-WebRequest ` + -OutFile $bazeliskTmp ` + -Uri ` + https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-windows-arm64.exe + Move-Item -Force $bazeliskTmp $bazeliskExe + } + $package = Get-WinGetPackage -Id Git.Git ` + -MatchOption Equals -ErrorAction SilentlyContinue + if (-not $package) { + $result = Install-WinGetPackage -Id Git.Git ` + -MatchOption Equals -Mode Silent + if ($result.Status -ne 'Ok') { + throw \"WinGet install failed: $($result.Status)\" + } + } elseif ($package.IsUpdateAvailable) { + $result = Update-WinGetPackage -Id Git.Git ` + -MatchOption Equals -Mode Silent + if ($result.Status -ne 'Ok') { + throw \"WinGet update failed: $($result.Status)\" + } + } + break + } catch { + if ($i -eq 3) { + $diagDir = Join-Path $env:LOCALAPPDATA ` + 'Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir' + Get-ChildItem $diagDir -Filter 'WinGetCOM-*.log' ` + -ErrorAction SilentlyContinue | + Sort-Object LastWriteTime -Descending | + Select-Object -First 2 | + ForEach-Object { + Write-Host "=== $($_.Name) ===" + Get-Content $_.FullName -Tail 80 + } + throw + } + if ($moduleInstalled) { + try { Repair-WinGetPackageManager -Force -Latest } catch {} + } + Start-Sleep -Seconds 15 + } + } + Add-Content $env:GITHUB_PATH ( + [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + ` + [System.Environment]::GetEnvironmentVariable("Path", "User")) + Add-Content $env:GITHUB_PATH (Join-Path $env:LOCALAPPDATA 'Programs\bazelisk') + shell: pwsh + - name: checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: cache bazel + uses: actions/cache@v6 + with: + path: | + ~\AppData\Local\bazel-cache + ~\AppData\Local\bazelisk + key: ${{ runner.os }}-${{ runner.arch }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', '**/*.bazel', '**/*.bzl') }} # yamllint disable-line rule:line-length + restore-keys: | + ${{ runner.os }}-${{ runner.arch }}-bazel- + - name: build test package + run: | + $PSNativeCommandUseErrorActionPreference = $true + bazelisk test ` + --disk_cache="$env:LOCALAPPDATA\bazel-cache\disk" ` + --features=treat_warnings_as_errors ` + --repository_cache="$env:LOCALAPPDATA\bazel-cache\repo" ` + --flaky_test_attempts=3 ` + ... + shell: pwsh diff --git a/.github/workflows/buildifier.yml b/.github/workflows/buildifier.yml new file mode 100644 index 0000000..0acf161 --- /dev/null +++ b/.github/workflows/buildifier.yml @@ -0,0 +1,88 @@ +# +# buildifier.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: buildifier + +on: # yamllint disable-line rule:truthy + push: + branches: + - main + pull_request: + branches: + - main + schedule: + - cron: '50 7 * * *' + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + buildifier: + name: buildifier + runs-on: ubuntu-latest + container: debian:trixie-slim + timeout-minutes: 20 + 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 \ + wget + apt-get -qq -o Dpkg::Use-Pty=0 autoremove + rm -rf /var/lib/apt/lists/* + wget --tries=4 --waitretry=15 --retry-on-http-error=429,500,502,503,504 \ + -qO /usr/local/bin/buildifier \ + https://github.com/bazelbuild/buildtools/releases/latest/download/buildifier-linux-amd64 + chmod +x /usr/local/bin/buildifier + env: + DEBIAN_FRONTEND: noninteractive + shell: bash + - name: checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: buildifier + run: buildifier --lint=warn --mode=check -r . + shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 5f0cbd0..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,1153 +0,0 @@ -# -# ci.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 -# -# -# - ---- -name: ci - -on: # yamllint disable-line rule:truthy - push: - branches: - - main - pull_request: - branches: - - main - schedule: - - cron: '0 5 * * *' - -permissions: - contents: read - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - bazel-almalinux: - name: bazel almalinux amd64 - runs-on: ubuntu-latest - container: almalinux:10 - timeout-minutes: 30 - steps: - - name: setup - id: setup - run: | - dnf makecache -q --refresh || (sleep 15; dnf makecache -q --refresh) - dnf upgrade -q -y - dnf install -q -y \ - ca-certificates \ - gcc-c++ \ - git \ - python3 \ - wget \ - which - dnf clean all - rm -rf /var/cache/yum - wget --tries=4 --waitretry=15 --retry-on-http-error=429,500,502,503,504 \ - -qO /usr/local/bin/bazelisk \ - https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 - chmod +x /usr/local/bin/bazelisk - ln -s /usr/local/bin/bazelisk /usr/local/bin/bazel - . /etc/os-release - echo "os=${ID}-${VERSION_ID:-rolling}" >> "$GITHUB_OUTPUT" - echo "gcc=$(gcc -dumpfullversion -dumpversion)" >> "$GITHUB_OUTPUT" - shell: bash - - name: checkout - uses: actions/checkout@v7 - with: - persist-credentials: false - - name: cache bazel - uses: actions/cache@v6 - with: - path: | - ~/.cache/bazel - ~/.cache/bazelisk - key: | - ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', '**/*.bazel', '**/*.bzl') }} - restore-keys: | - ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel- - - name: build test package - run: | - bazel test \ - --features=treat_warnings_as_errors \ - --flaky_test_attempts=3 \ - ... - shell: bash - - bazel-arch: - name: bazel arch linux amd64 - runs-on: ubuntu-latest - container: archlinux:latest - timeout-minutes: 30 - steps: - - name: setup - id: setup - run: | - pacman --needed --noconfirm --noprogressbar -S -u -y \ - ca-certificates \ - gcc \ - git \ - python \ - wget \ - which - rm -rf \ - /var/cache/pacman/pkg/* \ - /var/lib/pacman/sync/* - wget --tries=4 --waitretry=15 --retry-on-http-error=429,500,502,503,504 \ - -qO /usr/local/bin/bazelisk \ - https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 - chmod +x /usr/local/bin/bazelisk - ln -s /usr/local/bin/bazelisk /usr/local/bin/bazel - . /etc/os-release - echo "os=${ID}-${VERSION_ID:-rolling}" >> "$GITHUB_OUTPUT" - echo "gcc=$(gcc -dumpfullversion -dumpversion)" >> "$GITHUB_OUTPUT" - shell: bash - - name: checkout - uses: actions/checkout@v7 - with: - persist-credentials: false - - name: cache bazel - uses: actions/cache@v6 - with: - path: | - ~/.cache/bazel - ~/.cache/bazelisk - key: | - ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', '**/*.bazel', '**/*.bzl') }} - restore-keys: | - ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel- - - name: build test package - run: | - bazel test \ - --features=treat_warnings_as_errors \ - --flaky_test_attempts=3 \ - ... - shell: bash - - bazel-fedora: - name: bazel fedora linux amd64 - runs-on: ubuntu-latest - container: fedora:44 - timeout-minutes: 30 - steps: - - name: setup - id: setup - run: | - dnf makecache -q --refresh || (sleep 15; dnf makecache -q --refresh) - dnf upgrade -q -y - dnf install -q -y \ - ca-certificates \ - gcc-c++ \ - git \ - python3 \ - wget \ - which - dnf clean all - rm -rf /var/cache/yum - wget --tries=4 --waitretry=15 --retry-on-http-error=429,500,502,503,504 \ - -qO /usr/local/bin/bazelisk \ - https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 - chmod +x /usr/local/bin/bazelisk - ln -s /usr/local/bin/bazelisk /usr/local/bin/bazel - . /etc/os-release - echo "os=${ID}-${VERSION_ID:-rolling}" >> "$GITHUB_OUTPUT" - echo "gcc=$(gcc -dumpfullversion -dumpversion)" >> "$GITHUB_OUTPUT" - shell: bash - - name: checkout - uses: actions/checkout@v7 - with: - persist-credentials: false - - name: cache bazel - uses: actions/cache@v6 - with: - path: | - ~/.cache/bazel - ~/.cache/bazelisk - key: | - ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', '**/*.bazel', '**/*.bzl') }} - restore-keys: | - ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel- - - name: build test package - run: | - bazel test \ - --features=treat_warnings_as_errors \ - --flaky_test_attempts=3 \ - ... - shell: bash - - bazel-macos: - name: bazel macos arm64 - runs-on: macos-26 - timeout-minutes: 30 - steps: - - name: setup - run: | - brew update -q || (sleep 15; brew update -q) - brew install -q \ - bazelisk \ - git - env: - HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - HOMEBREW_NO_ANALYTICS: 1 - HOMEBREW_NO_AUTO_UPDATE: 1 - HOMEBREW_NO_INSTALL_CLEANUP: 1 - shell: zsh -efuo pipefail {0} - - name: checkout - uses: actions/checkout@v7 - with: - persist-credentials: false - - name: cache bazel - uses: actions/cache@v6 - with: - path: | - ~/Library/Caches/bazel - ~/Library/Caches/bazelisk - key: | - ${{ runner.os }}-${{ runner.arch }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', '**/*.bazel', '**/*.bzl') }} - restore-keys: | - ${{ runner.os }}-${{ runner.arch }}-bazel- - - name: build test package - run: | - bazel test \ - --features=treat_warnings_as_errors \ - --flaky_test_attempts=3 \ - ... - shell: zsh -efuo pipefail {0} - - bazel-opensuse: - name: bazel opensuse leap amd64 - runs-on: ubuntu-latest - container: opensuse/leap:16.1 - timeout-minutes: 30 - steps: - - name: setup - id: setup - run: | - zypper -n -q ref || (sleep 15; zypper -n -q ref) - zypper -n -q up - zypper -n -q in --no-recommends \ - ca-certificates \ - gcc-c++ \ - git \ - python3 \ - wget \ - which - zypper -n -q cc -a - wget --tries=4 --waitretry=15 --retry-on-http-error=429,500,502,503,504 \ - -qO /usr/local/bin/bazelisk \ - https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 - chmod +x /usr/local/bin/bazelisk - ln -s /usr/local/bin/bazelisk /usr/local/bin/bazel - . /etc/os-release - echo "os=${ID}-${VERSION_ID:-rolling}" >> "$GITHUB_OUTPUT" - echo "gcc=$(gcc -dumpfullversion -dumpversion)" >> "$GITHUB_OUTPUT" - shell: bash - - name: checkout - uses: actions/checkout@v7 - with: - persist-credentials: false - - name: cache bazel - uses: actions/cache@v6 - with: - path: | - ~/.cache/bazel - ~/.cache/bazelisk - key: | - ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', '**/*.bazel', '**/*.bzl') }} - restore-keys: | - ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel- - - name: build test package - run: | - bazel test \ - --features=treat_warnings_as_errors \ - --flaky_test_attempts=3 \ - ... - shell: bash - - bazel-ubuntu: - name: bazel ubuntu amd64 - runs-on: ubuntu-latest - container: ubuntu:26.04 - timeout-minutes: 30 - steps: - - name: setup - id: 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 \ - g++ \ - git \ - python-is-python3 \ - wget - apt-get -qq -o Dpkg::Use-Pty=0 autoremove - rm -rf /var/lib/apt/lists/* - wget --tries=4 --waitretry=15 --retry-on-http-error=429,500,502,503,504 \ - -q https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-amd64.deb - dpkg -i bazelisk-amd64.deb - rm -rf bazelisk-amd64.deb - . /etc/os-release - echo "os=${ID}-${VERSION_ID:-rolling}" >> "$GITHUB_OUTPUT" - echo "gcc=$(gcc -dumpfullversion -dumpversion)" >> "$GITHUB_OUTPUT" - env: - DEBIAN_FRONTEND: noninteractive - shell: bash - - name: checkout - uses: actions/checkout@v7 - with: - persist-credentials: false - - name: cache bazel - uses: actions/cache@v6 - with: - path: | - ~/.cache/bazel - ~/.cache/bazelisk - key: | - ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', '**/*.bazel', '**/*.bzl') }} - restore-keys: | - ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel- - - name: build test package - run: | - bazel test \ - --features=treat_warnings_as_errors \ - --flaky_test_attempts=3 \ - ... - shell: bash - - bazel-ubuntu-arm64: - name: bazel ubuntu arm64 - runs-on: ubuntu-26.04-arm - container: ubuntu:26.04 - timeout-minutes: 30 - steps: - - name: setup - id: 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 \ - g++ \ - git \ - python-is-python3 \ - wget - apt-get -qq -o Dpkg::Use-Pty=0 autoremove - rm -rf /var/lib/apt/lists/* - wget --tries=4 --waitretry=15 --retry-on-http-error=429,500,502,503,504 \ - -q https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-arm64.deb - dpkg -i bazelisk-arm64.deb - rm -rf bazelisk-arm64.deb - . /etc/os-release - echo "os=${ID}-${VERSION_ID:-rolling}" >> "$GITHUB_OUTPUT" - echo "gcc=$(gcc -dumpfullversion -dumpversion)" >> "$GITHUB_OUTPUT" - env: - DEBIAN_FRONTEND: noninteractive - shell: bash - - name: checkout - uses: actions/checkout@v7 - with: - persist-credentials: false - - name: cache bazel - uses: actions/cache@v6 - with: - path: | - ~/.cache/bazel - ~/.cache/bazelisk - key: | - ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', '**/*.bazel', '**/*.bzl') }} - restore-keys: | - ${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.os }}-gcc-${{ steps.setup.outputs.gcc }}-bazel- - - name: build test package - run: | - bazel test \ - --features=treat_warnings_as_errors \ - --flaky_test_attempts=3 \ - ... - shell: bash - - bazel-windows: - name: bazel windows x64 - runs-on: windows-latest - timeout-minutes: 30 - steps: - - name: setup - run: | - $ErrorActionPreference = 'Stop' - $moduleInstalled = $false - for ($i = 1; $i -le 3; $i++) { - try { - if (-not $moduleInstalled) { - Install-Module -Force -Name Microsoft.WinGet.Client - $moduleInstalled = $true - } - $package = Get-WinGetPackage -Id Bazel.Bazelisk ` - -MatchOption Equals -ErrorAction SilentlyContinue - if (-not $package) { - $result = Install-WinGetPackage -Id Bazel.Bazelisk ` - -MatchOption Equals -Mode Silent -Verbose - if ($result.Status -ne 'Ok') { - Write-Host ($result | Format-List * | Out-String) - throw "WinGet install failed: $($result.Status) ($($result.ExtendedErrorCode))" - } - } elseif ($package.IsUpdateAvailable) { - $result = Update-WinGetPackage -Id Bazel.Bazelisk ` - -MatchOption Equals -Mode Silent -Verbose - if ($result.Status -ne 'Ok') { - Write-Host ($result | Format-List * | Out-String) - throw "WinGet update failed: $($result.Status) ($($result.ExtendedErrorCode))" - } - } - $package = Get-WinGetPackage -Id Git.Git ` - -MatchOption Equals -ErrorAction SilentlyContinue - if (-not $package) { - $result = Install-WinGetPackage -Id Git.Git ` - -MatchOption Equals -Mode Silent - if ($result.Status -ne 'Ok') { throw "WinGet install failed: $($result.Status)" } - } elseif ($package.IsUpdateAvailable) { - $result = Update-WinGetPackage -Id Git.Git ` - -MatchOption Equals -Mode Silent - if ($result.Status -ne 'Ok') { throw "WinGet update failed: $($result.Status)" } - } - break - } catch { - if ($i -eq 3) { - $diagDir = Join-Path $env:LOCALAPPDATA ` - 'Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir' - Get-ChildItem $diagDir -Filter 'WinGetCOM-*.log' -ErrorAction SilentlyContinue | - Sort-Object LastWriteTime -Descending | - Select-Object -First 2 | - ForEach-Object { - Write-Host "=== $($_.Name) ===" - Get-Content $_.FullName -Tail 80 - } - throw - } - if ($moduleInstalled) { try { Repair-WinGetPackageManager -Force -Latest } catch {} } - Start-Sleep -Seconds 15 - } - } - Add-Content $env:GITHUB_PATH ( - [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + ` - [System.Environment]::GetEnvironmentVariable("Path", "User")) - shell: pwsh - - name: checkout - uses: actions/checkout@v7 - with: - persist-credentials: false - - name: cache bazel - uses: actions/cache@v6 - with: - path: | - ~\AppData\Local\bazel-cache - ~\AppData\Local\bazelisk - key: | - ${{ runner.os }}-${{ runner.arch }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', '**/*.bazel', '**/*.bzl') }} - restore-keys: | - ${{ runner.os }}-${{ runner.arch }}-bazel- - - name: build test package - run: | - $PSNativeCommandUseErrorActionPreference = $true - bazelisk test ` - --disk_cache="$env:LOCALAPPDATA\bazel-cache\disk" ` - --features=treat_warnings_as_errors ` - --repository_cache="$env:LOCALAPPDATA\bazel-cache\repo" ` - --flaky_test_attempts=3 ` - ... - shell: pwsh - - bazel-windows-arm64: - name: bazel windows arm64 - runs-on: windows-11-arm - timeout-minutes: 30 - steps: - - name: setup - run: | - $ErrorActionPreference = 'Stop' - $moduleInstalled = $false - for ($i = 1; $i -le 3; $i++) { - try { - if (-not $moduleInstalled) { - Install-Module -Force -Name Microsoft.WinGet.Client - $moduleInstalled = $true - } - $bazeliskDir = Join-Path $env:LOCALAPPDATA 'Programs\bazelisk' - $bazeliskExe = Join-Path $bazeliskDir 'bazelisk.exe' - if (-not (Test-Path $bazeliskExe)) { - $bazeliskTmp = "$bazeliskExe.tmp" - New-Item -ItemType Directory -Force -Path $bazeliskDir | Out-Null - Invoke-WebRequest ` - -Uri https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-windows-arm64.exe ` - -OutFile $bazeliskTmp - Move-Item -Force $bazeliskTmp $bazeliskExe - } - $package = Get-WinGetPackage -Id Git.Git ` - -MatchOption Equals -ErrorAction SilentlyContinue - if (-not $package) { - $result = Install-WinGetPackage -Id Git.Git ` - -MatchOption Equals -Mode Silent - if ($result.Status -ne 'Ok') { throw "WinGet install failed: $($result.Status)" } - } elseif ($package.IsUpdateAvailable) { - $result = Update-WinGetPackage -Id Git.Git ` - -MatchOption Equals -Mode Silent - if ($result.Status -ne 'Ok') { throw "WinGet update failed: $($result.Status)" } - } - break - } catch { - if ($i -eq 3) { - $diagDir = Join-Path $env:LOCALAPPDATA ` - 'Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir' - Get-ChildItem $diagDir -Filter 'WinGetCOM-*.log' -ErrorAction SilentlyContinue | - Sort-Object LastWriteTime -Descending | - Select-Object -First 2 | - ForEach-Object { - Write-Host "=== $($_.Name) ===" - Get-Content $_.FullName -Tail 80 - } - throw - } - if ($moduleInstalled) { try { Repair-WinGetPackageManager -Force -Latest } catch {} } - Start-Sleep -Seconds 15 - } - } - Add-Content $env:GITHUB_PATH ( - [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + ` - [System.Environment]::GetEnvironmentVariable("Path", "User")) - Add-Content $env:GITHUB_PATH (Join-Path $env:LOCALAPPDATA 'Programs\bazelisk') - shell: pwsh - - name: checkout - uses: actions/checkout@v7 - with: - persist-credentials: false - - name: cache bazel - uses: actions/cache@v6 - with: - path: | - ~\AppData\Local\bazel-cache - ~\AppData\Local\bazelisk - key: | - ${{ runner.os }}-${{ runner.arch }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', '**/*.bazel', '**/*.bzl') }} - restore-keys: | - ${{ runner.os }}-${{ runner.arch }}-bazel- - - name: build test package - run: | - $PSNativeCommandUseErrorActionPreference = $true - bazelisk test ` - --disk_cache="$env:LOCALAPPDATA\bazel-cache\disk" ` - --features=treat_warnings_as_errors ` - --repository_cache="$env:LOCALAPPDATA\bazel-cache\repo" ` - --flaky_test_attempts=3 ` - ... - shell: pwsh - - cmake-almalinux: - name: cmake almalinux amd64 - runs-on: ubuntu-latest - container: almalinux:10 - timeout-minutes: 30 - steps: - - name: setup - run: | - dnf makecache -q --refresh || (sleep 15; dnf makecache -q --refresh) - dnf upgrade -q -y - dnf install -q -y \ - ca-certificates \ - cmake \ - dnf-plugins-core \ - gcc-c++ \ - git \ - glibc-langpack-en \ - graphviz \ - make \ - pkgconf-pkg-config \ - rpm-build - dnf config-manager --set-enabled crb - dnf install -q -y doxygen - dnf clean all - rm -rf /var/cache/yum - shell: bash - - name: checkout - uses: actions/checkout@v7 - with: - persist-credentials: false - - name: build test package - run: | - mkdir _build - cd _build - cmake \ - -DBUILD_DOCUMENTATION:BOOL=ON \ - -DBUILD_TESTING:BOOL=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=install \ - -DENABLE_HARDENING:BOOL=ON \ - -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ - -DENABLE_OPENMP:BOOL=ON \ - -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ - -DWARNINGS_AS_ERRORS:BOOL=ON \ - --warn-uninitialized \ - .. - cmake --build . - ctest . --repeat after-timeout:3 - cmake --install . - cpack -G RPM - cpack -G RPM --config CPackSourceConfig.cmake - shell: bash - - cmake-alpine: - name: cmake alpine linux amd64 - runs-on: ubuntu-latest - container: alpine:3 - timeout-minutes: 30 - steps: - - name: setup - run: | - apk upgrade -q --no-cache || (sleep 15; apk upgrade -q --no-cache) - (apk add -q --no-cache \ - ca-certificates \ - cmake \ - doxygen \ - g++ \ - git \ - graphviz \ - make \ - pkgconf) || (sleep 15; apk add -q --no-cache \ - ca-certificates \ - cmake \ - doxygen \ - g++ \ - git \ - graphviz \ - make \ - pkgconf) - shell: sh - - name: checkout - uses: actions/checkout@v7 - with: - persist-credentials: false - - name: build test package - run: | - mkdir _build - cd _build - cmake \ - -DBUILD_DOCUMENTATION:BOOL=ON \ - -DBUILD_TESTING:BOOL=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=install \ - -DENABLE_HARDENING:BOOL=ON \ - -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ - -DENABLE_OPENMP:BOOL=ON \ - -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ - -DWARNINGS_AS_ERRORS:BOOL=ON \ - --warn-uninitialized \ - .. - cmake --build . - ctest . --repeat after-timeout:3 - cmake --install . - cpack -G TGZ - cpack -G TGZ --config CPackSourceConfig.cmake - shell: sh - - cmake-arch: - name: cmake arch linux amd64 - runs-on: ubuntu-latest - container: archlinux:latest - timeout-minutes: 30 - steps: - - name: setup - run: | - pacman --needed --noconfirm --noprogressbar -S -u -y \ - ca-certificates \ - cmake \ - doxygen \ - gcc \ - git \ - graphviz \ - make \ - pkgconf - rm -rf \ - /var/cache/pacman/pkg/* \ - /var/lib/pacman/sync/* - shell: bash - - name: checkout - uses: actions/checkout@v7 - with: - persist-credentials: false - - name: build test package - run: | - mkdir _build - cd _build - cmake \ - -DBUILD_DOCUMENTATION:BOOL=ON \ - -DBUILD_TESTING:BOOL=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=install \ - -DENABLE_HARDENING:BOOL=ON \ - -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ - -DENABLE_OPENMP:BOOL=ON \ - -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ - -DWARNINGS_AS_ERRORS:BOOL=ON \ - --warn-uninitialized \ - .. - cmake --build . - ctest . --repeat after-timeout:3 - cmake --install . - cpack -G TGZ - cpack -G TGZ --config CPackSourceConfig.cmake - shell: bash - - cmake-fedora: - name: cmake fedora linux amd64 - runs-on: ubuntu-latest - container: fedora:44 - timeout-minutes: 30 - steps: - - name: setup - run: | - dnf makecache -q --refresh || (sleep 15; dnf makecache -q --refresh) - dnf upgrade -q -y - dnf install -q -y \ - ca-certificates \ - cmake \ - doxygen \ - gcc-c++ \ - git \ - glibc-langpack-en \ - graphviz \ - make \ - pkgconf-pkg-config \ - rpm-build - dnf clean all - rm -rf /var/cache/yum - shell: bash - - name: checkout - uses: actions/checkout@v7 - with: - persist-credentials: false - - name: build test package - run: | - mkdir _build - cd _build - cmake \ - -DBUILD_DOCUMENTATION:BOOL=ON \ - -DBUILD_TESTING:BOOL=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=install \ - -DENABLE_HARDENING:BOOL=ON \ - -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ - -DENABLE_OPENMP:BOOL=ON \ - -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ - -DWARNINGS_AS_ERRORS:BOOL=ON \ - --warn-uninitialized \ - .. - cmake --build . - ctest . --repeat after-timeout:3 - cmake --install . - cpack -G RPM - cpack -G RPM --config CPackSourceConfig.cmake - shell: bash - - cmake-macos: - name: cmake macos arm64 - runs-on: macos-26 - timeout-minutes: 30 - steps: - - name: setup - run: | - brew update -q || (sleep 15; brew update -q) - brew install -q \ - cmake \ - doxygen \ - git \ - graphviz - env: - HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - HOMEBREW_NO_ANALYTICS: 1 - HOMEBREW_NO_AUTO_UPDATE: 1 - HOMEBREW_NO_INSTALL_CLEANUP: 1 - shell: zsh -efuo pipefail {0} - - name: checkout - uses: actions/checkout@v7 - with: - persist-credentials: false - - name: build test package - run: | - mkdir _build - cd _build - cmake \ - -DBUILD_DOCUMENTATION:BOOL=ON \ - -DBUILD_TESTING:BOOL=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=install \ - -DENABLE_HARDENING:BOOL=ON \ - -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ - -DENABLE_OPENMP:BOOL=OFF \ - -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ - -DWARNINGS_AS_ERRORS:BOOL=ON \ - --warn-uninitialized \ - .. - cmake --build . - ctest . --repeat after-timeout:3 - cmake --install . - cpack -G TGZ - cpack -G TGZ --config CPackSourceConfig.cmake - shell: zsh -efuo pipefail {0} - - cmake-opensuse: - name: cmake opensuse leap amd64 - runs-on: ubuntu-latest - container: opensuse/leap:16.1 - timeout-minutes: 30 - steps: - - name: setup - run: | - zypper -n -q ref || (sleep 15; zypper -n -q ref) - zypper -n -q up - zypper -n -q in --no-recommends \ - ca-certificates \ - cmake \ - doxygen \ - gcc-c++ \ - git \ - graphviz \ - make \ - pkgconf \ - rpm-build - zypper -n -q cc -a - shell: bash - - name: checkout - uses: actions/checkout@v7 - with: - persist-credentials: false - - name: build test package - run: | - mkdir _build - cd _build - cmake \ - -DBUILD_DOCUMENTATION:BOOL=ON \ - -DBUILD_TESTING:BOOL=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=install \ - -DENABLE_HARDENING:BOOL=ON \ - -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ - -DENABLE_OPENMP:BOOL=ON \ - -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ - -DWARNINGS_AS_ERRORS:BOOL=ON \ - --warn-uninitialized \ - .. - cmake --build . - ctest . --repeat after-timeout:3 - cmake --install . - cpack -G RPM - cpack -G RPM --config CPackSourceConfig.cmake - shell: bash - - cmake-ubuntu: - name: cmake ubuntu amd64 - runs-on: ubuntu-latest - container: ubuntu:26.04 - timeout-minutes: 30 - 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 \ - cmake \ - doxygen \ - dpkg-dev \ - file \ - g++ \ - git \ - graphviz \ - make \ - pkgconf - 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 - with: - persist-credentials: false - - name: build test package - run: | - mkdir _build - cd _build - cmake \ - -DBUILD_DOCUMENTATION:BOOL=ON \ - -DBUILD_TESTING:BOOL=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=install \ - -DENABLE_HARDENING:BOOL=ON \ - -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ - -DENABLE_OPENMP:BOOL=ON \ - -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ - -DWARNINGS_AS_ERRORS:BOOL=ON \ - --warn-uninitialized \ - .. - cmake --build . - ctest . --repeat after-timeout:3 - cmake --install . - cpack -G DEB - cpack -G DEB --config CPackSourceConfig.cmake - shell: bash - - cmake-ubuntu-arm64: - name: cmake ubuntu arm64 - runs-on: ubuntu-26.04-arm - container: ubuntu:26.04 - timeout-minutes: 30 - 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 \ - cmake \ - doxygen \ - dpkg-dev \ - file \ - g++ \ - git \ - graphviz \ - make \ - pkgconf - 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 - with: - persist-credentials: false - - name: build test package - run: | - mkdir _build - cd _build - cmake \ - -DBUILD_DOCUMENTATION:BOOL=ON \ - -DBUILD_TESTING:BOOL=ON \ - -DCMAKE_INSTALL_PREFIX:PATH=install \ - -DENABLE_HARDENING:BOOL=ON \ - -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ - -DENABLE_OPENMP:BOOL=ON \ - -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ - -DWARNINGS_AS_ERRORS:BOOL=ON \ - --warn-uninitialized \ - .. - cmake --build . - ctest . --repeat after-timeout:3 - cmake --install . - cpack -G DEB - cpack -G DEB --config CPackSourceConfig.cmake - shell: bash - - cmake-windows: - name: cmake windows amd64 - runs-on: windows-latest - timeout-minutes: 30 - steps: - - name: setup - run: | - $ErrorActionPreference = 'Stop' - $moduleInstalled = $false - for ($i = 1; $i -le 3; $i++) { - try { - if (-not $moduleInstalled) { - Install-Module -Force -Name Microsoft.WinGet.Client - $moduleInstalled = $true - } - $package = Get-WinGetPackage -Id Git.Git ` - -MatchOption Equals -ErrorAction SilentlyContinue - if (-not $package) { - $result = Install-WinGetPackage -Id Git.Git ` - -MatchOption Equals -Mode Silent - if ($result.Status -ne 'Ok') { throw "WinGet install failed: $($result.Status)" } - } elseif ($package.IsUpdateAvailable) { - $result = Update-WinGetPackage -Id Git.Git ` - -MatchOption Equals -Mode Silent - if ($result.Status -ne 'Ok') { throw "WinGet update failed: $($result.Status)" } - } - $package = Get-WinGetPackage -Id Kitware.CMake ` - -MatchOption Equals -ErrorAction SilentlyContinue - if (-not $package) { - $result = Install-WinGetPackage -Id Kitware.CMake ` - -MatchOption Equals -Mode Silent - if ($result.Status -ne 'Ok') { throw "WinGet install failed: $($result.Status)" } - } elseif ($package.IsUpdateAvailable) { - $result = Update-WinGetPackage -Id Kitware.CMake ` - -MatchOption Equals -Mode Silent - if ($result.Status -ne 'Ok') { throw "WinGet update failed: $($result.Status)" } - } - break - } catch { - if ($i -eq 3) { - $diagDir = Join-Path $env:LOCALAPPDATA ` - 'Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir' - Get-ChildItem $diagDir -Filter 'WinGetCOM-*.log' -ErrorAction SilentlyContinue | - Sort-Object LastWriteTime -Descending | - Select-Object -First 2 | - ForEach-Object { - Write-Host "=== $($_.Name) ===" - Get-Content $_.FullName -Tail 80 - } - throw - } - if ($moduleInstalled) { try { Repair-WinGetPackageManager -Force -Latest } catch {} } - Start-Sleep -Seconds 15 - } - } - Add-Content $env:GITHUB_PATH ( - [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + ` - [System.Environment]::GetEnvironmentVariable("Path", "User")) - shell: pwsh - - name: checkout - uses: actions/checkout@v7 - with: - persist-credentials: false - - name: build test package - run: | - $PSNativeCommandUseErrorActionPreference = $true - mkdir _build - cd _build - cmake ` - -DBUILD_DOCUMENTATION:BOOL=ON ` - -DBUILD_TESTING:BOOL=ON ` - -DCMAKE_INSTALL_PREFIX:PATH=install ` - -DENABLE_HARDENING:BOOL=ON ` - -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON ` - -DENABLE_OPENMP:BOOL=OFF ` - -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF ` - -DWARNINGS_AS_ERRORS:BOOL=ON ` - --warn-uninitialized ` - .. - cmake --build . --config Release - ctest . --build-config Release --repeat after-timeout:3 - cmake --install . - cpack -C Release -G ZIP - cpack -C Release -G ZIP --config CPackSourceConfig.cmake - shell: pwsh - - cmake-windows-arm64: - name: cmake windows arm64 - runs-on: windows-11-arm - timeout-minutes: 30 - steps: - - name: setup - run: | - $ErrorActionPreference = 'Stop' - $moduleInstalled = $false - for ($i = 1; $i -le 3; $i++) { - try { - if (-not $moduleInstalled) { - Install-Module -Force -Name Microsoft.WinGet.Client - $moduleInstalled = $true - } - $package = Get-WinGetPackage -Id Git.Git ` - -MatchOption Equals -ErrorAction SilentlyContinue - if (-not $package) { - $result = Install-WinGetPackage -Id Git.Git ` - -MatchOption Equals -Mode Silent - if ($result.Status -ne 'Ok') { throw "WinGet install failed: $($result.Status)" } - } elseif ($package.IsUpdateAvailable) { - $result = Update-WinGetPackage -Id Git.Git ` - -MatchOption Equals -Mode Silent - if ($result.Status -ne 'Ok') { throw "WinGet update failed: $($result.Status)" } - } - $package = Get-WinGetPackage -Id Kitware.CMake ` - -MatchOption Equals -ErrorAction SilentlyContinue - if (-not $package) { - $result = Install-WinGetPackage -Id Kitware.CMake ` - -MatchOption Equals -Mode Silent - if ($result.Status -ne 'Ok') { throw "WinGet install failed: $($result.Status)" } - } elseif ($package.IsUpdateAvailable) { - $result = Update-WinGetPackage -Id Kitware.CMake ` - -MatchOption Equals -Mode Silent - if ($result.Status -ne 'Ok') { throw "WinGet update failed: $($result.Status)" } - } - break - } catch { - if ($i -eq 3) { - $diagDir = Join-Path $env:LOCALAPPDATA ` - 'Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir' - Get-ChildItem $diagDir -Filter 'WinGetCOM-*.log' -ErrorAction SilentlyContinue | - Sort-Object LastWriteTime -Descending | - Select-Object -First 2 | - ForEach-Object { - Write-Host "=== $($_.Name) ===" - Get-Content $_.FullName -Tail 80 - } - throw - } - if ($moduleInstalled) { try { Repair-WinGetPackageManager -Force -Latest } catch {} } - Start-Sleep -Seconds 15 - } - } - Add-Content $env:GITHUB_PATH ( - [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + ` - [System.Environment]::GetEnvironmentVariable("Path", "User")) - shell: pwsh - - name: checkout - uses: actions/checkout@v7 - with: - persist-credentials: false - - name: build test package - run: | - $PSNativeCommandUseErrorActionPreference = $true - mkdir _build - cd _build - cmake ` - -DBUILD_DOCUMENTATION:BOOL=ON ` - -DBUILD_TESTING:BOOL=ON ` - -DCMAKE_INSTALL_PREFIX:PATH=install ` - -DENABLE_HARDENING:BOOL=ON ` - -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON ` - -DENABLE_OPENMP:BOOL=OFF ` - -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF ` - -DWARNINGS_AS_ERRORS:BOOL=ON ` - --warn-uninitialized ` - .. - cmake --build . --config Release - ctest . --build-config Release --repeat after-timeout:3 - cmake --install . - cpack -C Release -G ZIP - cpack -C Release -G ZIP --config CPackSourceConfig.cmake - shell: pwsh diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml new file mode 100644 index 0000000..3f2f073 --- /dev/null +++ b/.github/workflows/cmake.yml @@ -0,0 +1,653 @@ +# +# cmake.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: cmake + +on: # yamllint disable-line rule:truthy + push: + branches: + - main + pull_request: + branches: + - main + schedule: + - cron: '10 5 * * *' + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + cmake-almalinux: + name: cmake almalinux amd64 + runs-on: ubuntu-latest + container: almalinux:10 + timeout-minutes: 30 + steps: + - name: setup + run: | + dnf makecache -q --refresh || (sleep 15; dnf makecache -q --refresh) + dnf upgrade -q -y + dnf install -q -y \ + ca-certificates \ + cmake \ + dnf-plugins-core \ + gcc-c++ \ + git \ + glibc-langpack-en \ + graphviz \ + make \ + pkgconf-pkg-config \ + rpm-build + dnf config-manager --set-enabled crb + dnf install -q -y doxygen + dnf clean all + rm -rf /var/cache/yum + shell: bash + - name: checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: build test package + run: | + mkdir _build + cd _build + cmake \ + -DBUILD_DOCUMENTATION:BOOL=ON \ + -DBUILD_TESTING:BOOL=ON \ + -DCMAKE_INSTALL_PREFIX:PATH=install \ + -DENABLE_HARDENING:BOOL=ON \ + -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ + -DENABLE_OPENMP:BOOL=ON \ + -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ + -DWARNINGS_AS_ERRORS:BOOL=ON \ + --warn-uninitialized \ + .. + cmake --build . + ctest . --repeat after-timeout:3 + cmake --install . + cpack -G RPM + cpack -G RPM --config CPackSourceConfig.cmake + shell: bash + + cmake-alpine: + name: cmake alpine linux amd64 + runs-on: ubuntu-latest + container: alpine:3 + timeout-minutes: 30 + steps: + - name: setup + run: | + apk upgrade -q --no-cache || (sleep 15; apk upgrade -q --no-cache) + (apk add -q --no-cache \ + ca-certificates \ + cmake \ + doxygen \ + g++ \ + git \ + graphviz \ + make \ + pkgconf) || (sleep 15; apk add -q --no-cache \ + ca-certificates \ + cmake \ + doxygen \ + g++ \ + git \ + graphviz \ + make \ + pkgconf) + shell: sh + - name: checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: build test package + run: | + mkdir _build + cd _build + cmake \ + -DBUILD_DOCUMENTATION:BOOL=ON \ + -DBUILD_TESTING:BOOL=ON \ + -DCMAKE_INSTALL_PREFIX:PATH=install \ + -DENABLE_HARDENING:BOOL=ON \ + -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ + -DENABLE_OPENMP:BOOL=ON \ + -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ + -DWARNINGS_AS_ERRORS:BOOL=ON \ + --warn-uninitialized \ + .. + cmake --build . + ctest . --repeat after-timeout:3 + cmake --install . + cpack -G TGZ + cpack -G TGZ --config CPackSourceConfig.cmake + shell: sh + + cmake-arch: + name: cmake arch linux amd64 + runs-on: ubuntu-latest + container: archlinux:latest + timeout-minutes: 30 + steps: + - name: setup + run: | + pacman --needed --noconfirm --noprogressbar -S -u -y \ + ca-certificates \ + cmake \ + doxygen \ + gcc \ + git \ + graphviz \ + make \ + pkgconf + rm -rf \ + /var/cache/pacman/pkg/* \ + /var/lib/pacman/sync/* + shell: bash + - name: checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: build test package + run: | + mkdir _build + cd _build + cmake \ + -DBUILD_DOCUMENTATION:BOOL=ON \ + -DBUILD_TESTING:BOOL=ON \ + -DCMAKE_INSTALL_PREFIX:PATH=install \ + -DENABLE_HARDENING:BOOL=ON \ + -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ + -DENABLE_OPENMP:BOOL=ON \ + -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ + -DWARNINGS_AS_ERRORS:BOOL=ON \ + --warn-uninitialized \ + .. + cmake --build . + ctest . --repeat after-timeout:3 + cmake --install . + cpack -G TGZ + cpack -G TGZ --config CPackSourceConfig.cmake + shell: bash + + cmake-fedora: + name: cmake fedora linux amd64 + runs-on: ubuntu-latest + container: fedora:44 + timeout-minutes: 30 + steps: + - name: setup + run: | + dnf makecache -q --refresh || (sleep 15; dnf makecache -q --refresh) + dnf upgrade -q -y + dnf install -q -y \ + ca-certificates \ + cmake \ + doxygen \ + gcc-c++ \ + git \ + glibc-langpack-en \ + graphviz \ + make \ + pkgconf-pkg-config \ + rpm-build + dnf clean all + rm -rf /var/cache/yum + shell: bash + - name: checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: build test package + run: | + mkdir _build + cd _build + cmake \ + -DBUILD_DOCUMENTATION:BOOL=ON \ + -DBUILD_TESTING:BOOL=ON \ + -DCMAKE_INSTALL_PREFIX:PATH=install \ + -DENABLE_HARDENING:BOOL=ON \ + -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ + -DENABLE_OPENMP:BOOL=ON \ + -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ + -DWARNINGS_AS_ERRORS:BOOL=ON \ + --warn-uninitialized \ + .. + cmake --build . + ctest . --repeat after-timeout:3 + cmake --install . + cpack -G RPM + cpack -G RPM --config CPackSourceConfig.cmake + shell: bash + + cmake-macos: + name: cmake macos arm64 + runs-on: macos-26 + timeout-minutes: 30 + steps: + - name: setup + run: | + brew update -q || (sleep 15; brew update -q) + brew install -q \ + cmake \ + doxygen \ + git \ + graphviz + env: + HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + HOMEBREW_NO_ANALYTICS: 1 + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_INSTALL_CLEANUP: 1 + shell: zsh -efuo pipefail {0} + - name: checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: build test package + run: | + mkdir _build + cd _build + cmake \ + -DBUILD_DOCUMENTATION:BOOL=ON \ + -DBUILD_TESTING:BOOL=ON \ + -DCMAKE_INSTALL_PREFIX:PATH=install \ + -DENABLE_HARDENING:BOOL=ON \ + -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ + -DENABLE_OPENMP:BOOL=OFF \ + -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ + -DWARNINGS_AS_ERRORS:BOOL=ON \ + --warn-uninitialized \ + .. + cmake --build . + ctest . --repeat after-timeout:3 + cmake --install . + cpack -G TGZ + cpack -G TGZ --config CPackSourceConfig.cmake + shell: zsh -efuo pipefail {0} + + cmake-opensuse: + name: cmake opensuse leap amd64 + runs-on: ubuntu-latest + container: opensuse/leap:16.1 + timeout-minutes: 30 + steps: + - name: setup + run: | + zypper -n -q ref || (sleep 15; zypper -n -q ref) + zypper -n -q up + zypper -n -q in --no-recommends \ + ca-certificates \ + cmake \ + doxygen \ + gcc-c++ \ + git \ + graphviz \ + make \ + pkgconf \ + rpm-build + zypper -n -q cc -a + shell: bash + - name: checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: build test package + run: | + mkdir _build + cd _build + cmake \ + -DBUILD_DOCUMENTATION:BOOL=ON \ + -DBUILD_TESTING:BOOL=ON \ + -DCMAKE_INSTALL_PREFIX:PATH=install \ + -DENABLE_HARDENING:BOOL=ON \ + -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ + -DENABLE_OPENMP:BOOL=ON \ + -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ + -DWARNINGS_AS_ERRORS:BOOL=ON \ + --warn-uninitialized \ + .. + cmake --build . + ctest . --repeat after-timeout:3 + cmake --install . + cpack -G RPM + cpack -G RPM --config CPackSourceConfig.cmake + shell: bash + + cmake-ubuntu: + name: cmake ubuntu amd64 + runs-on: ubuntu-latest + container: ubuntu:26.04 + timeout-minutes: 30 + 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 \ + cmake \ + doxygen \ + dpkg-dev \ + file \ + g++ \ + git \ + graphviz \ + make \ + pkgconf + 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 + with: + persist-credentials: false + - name: build test package + run: | + mkdir _build + cd _build + cmake \ + -DBUILD_DOCUMENTATION:BOOL=ON \ + -DBUILD_TESTING:BOOL=ON \ + -DCMAKE_INSTALL_PREFIX:PATH=install \ + -DENABLE_HARDENING:BOOL=ON \ + -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ + -DENABLE_OPENMP:BOOL=ON \ + -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ + -DWARNINGS_AS_ERRORS:BOOL=ON \ + --warn-uninitialized \ + .. + cmake --build . + ctest . --repeat after-timeout:3 + cmake --install . + cpack -G DEB + cpack -G DEB --config CPackSourceConfig.cmake + shell: bash + + cmake-ubuntu-arm64: + name: cmake ubuntu arm64 + runs-on: ubuntu-26.04-arm + container: ubuntu:26.04 + timeout-minutes: 30 + 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 \ + cmake \ + doxygen \ + dpkg-dev \ + file \ + g++ \ + git \ + graphviz \ + make \ + pkgconf + 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 + with: + persist-credentials: false + - name: build test package + run: | + mkdir _build + cd _build + cmake \ + -DBUILD_DOCUMENTATION:BOOL=ON \ + -DBUILD_TESTING:BOOL=ON \ + -DCMAKE_INSTALL_PREFIX:PATH=install \ + -DENABLE_HARDENING:BOOL=ON \ + -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ + -DENABLE_OPENMP:BOOL=ON \ + -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ + -DWARNINGS_AS_ERRORS:BOOL=ON \ + --warn-uninitialized \ + .. + cmake --build . + ctest . --repeat after-timeout:3 + cmake --install . + cpack -G DEB + cpack -G DEB --config CPackSourceConfig.cmake + shell: bash + + cmake-windows: + name: cmake windows amd64 + runs-on: windows-latest + timeout-minutes: 30 + steps: + - name: setup + run: | + $ErrorActionPreference = 'Stop' + $moduleInstalled = $false + for ($i = 1; $i -le 3; $i++) { + try { + if (-not $moduleInstalled) { + Install-Module -Force -Name Microsoft.WinGet.Client + $moduleInstalled = $true + } + $package = Get-WinGetPackage -Id Git.Git ` + -MatchOption Equals -ErrorAction SilentlyContinue + if (-not $package) { + $result = Install-WinGetPackage -Id Git.Git ` + -MatchOption Equals -Mode Silent + if ($result.Status -ne 'Ok') { + throw \"WinGet install failed: $($result.Status)\" + } + } elseif ($package.IsUpdateAvailable) { + $result = Update-WinGetPackage -Id Git.Git ` + -MatchOption Equals -Mode Silent + if ($result.Status -ne 'Ok') { + throw \"WinGet update failed: $($result.Status)\" + } + } + $package = Get-WinGetPackage -Id Kitware.CMake ` + -MatchOption Equals -ErrorAction SilentlyContinue + if (-not $package) { + $result = Install-WinGetPackage -Id Kitware.CMake ` + -MatchOption Equals -Mode Silent + if ($result.Status -ne 'Ok') { + throw \"WinGet install failed: $($result.Status)\" + } + } elseif ($package.IsUpdateAvailable) { + $result = Update-WinGetPackage -Id Kitware.CMake ` + -MatchOption Equals -Mode Silent + if ($result.Status -ne 'Ok') { + throw \"WinGet update failed: $($result.Status)\" + } + } + break + } catch { + if ($i -eq 3) { + $diagDir = Join-Path $env:LOCALAPPDATA ` + 'Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir' + Get-ChildItem $diagDir -Filter 'WinGetCOM-*.log' ` + -ErrorAction SilentlyContinue | + Sort-Object LastWriteTime -Descending | + Select-Object -First 2 | + ForEach-Object { + Write-Host "=== $($_.Name) ===" + Get-Content $_.FullName -Tail 80 + } + throw + } + if ($moduleInstalled) { + try { Repair-WinGetPackageManager -Force -Latest } catch {} + } + Start-Sleep -Seconds 15 + } + } + Add-Content $env:GITHUB_PATH ( + [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + ` + [System.Environment]::GetEnvironmentVariable("Path", "User")) + shell: pwsh + - name: checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: build test package + run: | + $PSNativeCommandUseErrorActionPreference = $true + mkdir _build + cd _build + cmake ` + -DBUILD_DOCUMENTATION:BOOL=ON ` + -DBUILD_TESTING:BOOL=ON ` + -DCMAKE_INSTALL_PREFIX:PATH=install ` + -DENABLE_HARDENING:BOOL=ON ` + -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON ` + -DENABLE_OPENMP:BOOL=OFF ` + -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF ` + -DWARNINGS_AS_ERRORS:BOOL=ON ` + --warn-uninitialized ` + .. + cmake --build . --config Release + ctest . --build-config Release --repeat after-timeout:3 + cmake --install . + cpack -C Release -G ZIP + cpack -C Release -G ZIP --config CPackSourceConfig.cmake + shell: pwsh + + cmake-windows-arm64: + name: cmake windows arm64 + runs-on: windows-11-arm + timeout-minutes: 30 + steps: + - name: setup + run: | + $ErrorActionPreference = 'Stop' + $moduleInstalled = $false + for ($i = 1; $i -le 3; $i++) { + try { + if (-not $moduleInstalled) { + Install-Module -Force -Name Microsoft.WinGet.Client + $moduleInstalled = $true + } + $package = Get-WinGetPackage -Id Git.Git ` + -MatchOption Equals -ErrorAction SilentlyContinue + if (-not $package) { + $result = Install-WinGetPackage -Id Git.Git ` + -MatchOption Equals -Mode Silent + if ($result.Status -ne 'Ok') { + throw \"WinGet install failed: $($result.Status)\" + } + } elseif ($package.IsUpdateAvailable) { + $result = Update-WinGetPackage -Id Git.Git ` + -MatchOption Equals -Mode Silent + if ($result.Status -ne 'Ok') { + throw \"WinGet update failed: $($result.Status)\" + } + } + $package = Get-WinGetPackage -Id Kitware.CMake ` + -MatchOption Equals -ErrorAction SilentlyContinue + if (-not $package) { + $result = Install-WinGetPackage -Id Kitware.CMake ` + -MatchOption Equals -Mode Silent + if ($result.Status -ne 'Ok') { + throw \"WinGet install failed: $($result.Status)\" + } + } elseif ($package.IsUpdateAvailable) { + $result = Update-WinGetPackage -Id Kitware.CMake ` + -MatchOption Equals -Mode Silent + if ($result.Status -ne 'Ok') { + throw \"WinGet update failed: $($result.Status)\" + } + } + break + } catch { + if ($i -eq 3) { + $diagDir = Join-Path $env:LOCALAPPDATA ` + 'Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir' + Get-ChildItem $diagDir -Filter 'WinGetCOM-*.log' ` + -ErrorAction SilentlyContinue | + Sort-Object LastWriteTime -Descending | + Select-Object -First 2 | + ForEach-Object { + Write-Host "=== $($_.Name) ===" + Get-Content $_.FullName -Tail 80 + } + throw + } + if ($moduleInstalled) { + try { Repair-WinGetPackageManager -Force -Latest } catch {} + } + Start-Sleep -Seconds 15 + } + } + Add-Content $env:GITHUB_PATH ( + [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + ` + [System.Environment]::GetEnvironmentVariable("Path", "User")) + shell: pwsh + - name: checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: build test package + run: | + $PSNativeCommandUseErrorActionPreference = $true + mkdir _build + cd _build + cmake ` + -DBUILD_DOCUMENTATION:BOOL=ON ` + -DBUILD_TESTING:BOOL=ON ` + -DCMAKE_INSTALL_PREFIX:PATH=install ` + -DENABLE_HARDENING:BOOL=ON ` + -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON ` + -DENABLE_OPENMP:BOOL=OFF ` + -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF ` + -DWARNINGS_AS_ERRORS:BOOL=ON ` + --warn-uninitialized ` + .. + cmake --build . --config Release + ctest . --build-config Release --repeat after-timeout:3 + cmake --install . + cpack -C Release -G ZIP + cpack -C Release -G ZIP --config CPackSourceConfig.cmake + shell: pwsh diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 8e17883..8d4dc2e 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -31,6 +31,7 @@ # # +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json --- name: codeql @@ -42,7 +43,16 @@ on: # yamllint disable-line rule:truthy branches: - main schedule: - - cron: '0 6 * * 3' + - cron: '50 4 * * 3' + +permissions: + actions: read + contents: read + security-events: write + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: analyze: diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml index feb741f..d5a4856 100644 --- a/.github/workflows/reuse.yml +++ b/.github/workflows/reuse.yml @@ -50,7 +50,7 @@ permissions: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: reuse: diff --git a/.github/workflows/yamllint.yml b/.github/workflows/yamllint.yml new file mode 100644 index 0000000..ec1fe8c --- /dev/null +++ b/.github/workflows/yamllint.yml @@ -0,0 +1,83 @@ +# +# yamllint.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: yamllint + +on: # yamllint disable-line rule:truthy + push: + branches: + - main + pull_request: + branches: + - main + schedule: + - cron: '30 7 * * *' + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + yamllint-debian: + name: yamllint debian amd64 + runs-on: ubuntu-latest + container: debian:trixie-slim + timeout-minutes: 20 + 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 \ + yamllint + 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 + with: + persist-credentials: false + - name: yamllint + run: | + yamllint --format github . + shell: bash diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ad1f606..5b1a1e2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,6 +31,7 @@ # # +# yaml-language-server: $schema=https://json.schemastore.org/pre-commit-config.json --- repos: - repo: https://codeberg.org/fsfe/reuse-tool @@ -80,9 +81,3 @@ repos: - id: actionlint args: - -oneline - - - - - - diff --git a/.yamllint.yaml b/.yamllint.yaml index b94204f..8147e01 100644 --- a/.yamllint.yaml +++ b/.yamllint.yaml @@ -36,5 +36,6 @@ extends: default rules: line-length: - max: 80 + max: 88 + allow-non-breakable-words: true level: warning diff --git a/QUALITY_DECLARATION.md b/QUALITY_DECLARATION.md index fc5e178..bac2e67 100644 --- a/QUALITY_DECLARATION.md +++ b/QUALITY_DECLARATION.md @@ -118,10 +118,12 @@ maintainer [@snape](https://github.com/snape) before merging. CI is performed via GitHub Actions on every push and pull request to `main`, and on a daily schedule: -- [`.github/workflows/ci.yml`](.github/workflows/ci.yml): builds and tests - with CMake and Bazel on AlmaLinux, Arch Linux, Fedora, openSUSE, Ubuntu - (amd64 and arm64), macOS (arm64), and Windows (amd64 and arm64), - and with CMake on Alpine Linux (amd64). CMake builds +- [`.github/workflows/bazel.yml`](.github/workflows/bazel.yml): builds and tests + with Bazel on AlmaLinux, Arch Linux, Fedora, openSUSE, Ubuntu + (amd64 and arm64), macOS (arm64), and Windows (amd64 and arm64). +- [`.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 enable `BUILD_TESTING`, `ENABLE_HARDENING`, `ENABLE_INTERPROCEDURAL_OPTIMIZATION`, `ENABLE_OPENMP` (on Linux), and `WARNINGS_AS_ERRORS`. diff --git a/README.md b/README.md index 1e374c4..d571508 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,8 @@ applied to kinematically constrained non-holonomic robots such as cars. We have implemented our approach, and we show simulation results in challenging environments with large numbers of robots and obstacles. -![Build Status](https://github.com/snape/AVO2/actions/workflows/ci.yml/badge.svg?branch=main) +![Bazel](https://github.com/snape/AVO2/actions/workflows/bazel.yml/badge.svg?branch=main) +![CMake](https://github.com/snape/AVO2/actions/workflows/cmake.yml/badge.svg?branch=main) SPDX-FileCopyrightText: 2010 University of North Carolina at Chapel Hill