Skip to content

Commit

Permalink
Update ci and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
snape committed Jun 15, 2023
1 parent 8c49f5a commit 4475188
Show file tree
Hide file tree
Showing 11 changed files with 320 additions and 38 deletions.
15 changes: 14 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,24 @@
# <https://gamma.cs.unc.edu/RVO2/>
#

build --enable_platform_specific_config=true
build --force_pic=true
build --incompatible_strict_action_env=true
build --legacy_external_runfiles=false
build --remote_upload_local_results=false
build --sandbox_default_allow_network=false

build:macos --apple_generate_dsym=true
build:macos --apple_crosstool_top=@local_config_apple_cc//:toolchain
build:macos --apple_platform_type=macos
build:macos --crosstool_top=@local_config_apple_cc//:toolchain
build:macos --host_crosstool_top=@local_config_apple_cc//:toolchain

common --enable_platform_specific_config=true
common --heap_dump_on_oom=true

startup --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1

test --incompatible_exclusive_test_sandboxed=true
test --test_verbose_timeout_warnings=true

try-import %workspace%/.user.bazelrc
8 changes: 8 additions & 0 deletions .buildifier.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "auto",
"mode": "fix",
"lint": "fix",
"warningsList": [
"all"
]
}
30 changes: 30 additions & 0 deletions .buildifier.json.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.buildifier.json
RVO2-3D Library

SPDX-FileCopyrightText: 2008 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 <geom@cs.unc.edu>.

The authors may be contacted via:

Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, 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

<https://gamma.cs.unc.edu/RVO2/>
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
* text=auto

*.bazel text diff=python linguist-language=starlark whitespace-4
*.bzlmod text diff=python linguist-language=starlark whitespace-4
*.cc text diff=cpp linguist-language=c++ whitespace-2
*.cff text linguist-documentation whitespace-2
*.cfg text whitespace-2
Expand Down
110 changes: 107 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: checkout
uses: actions/checkout@v3
- name: build test package
run: bazel test --flaky_test_attempts=3 ...
run: bazel test --enable_bzlmod=0 --flaky_test_attempts=3 ...
shell: bash

bazel_macos:
Expand All @@ -80,6 +80,8 @@ jobs:
rm -f \
/usr/local/bin/2to3 \
/usr/local/bin/2to3-3.* \
/usr/local/bin/go \
/usr/local/bin/gofmt \
/usr/local/bin/idle3 \
/usr/local/bin/idle3.* \
/usr/local/bin/pydoc3 \
Expand All @@ -101,7 +103,7 @@ jobs:
HOMEBREW_NO_INSTALL_CLEANUP: 1
shell: zsh -efuo pipefail {0}
- name: build test package
run: bazel test --flaky_test_attempts=3 ...
run: bazel test --enable_bzlmod=0 --flaky_test_attempts=3 ...
shell: zsh -efuo pipefail {0}

bazel_ubuntu:
Expand Down Expand Up @@ -140,7 +142,107 @@ jobs:
- name: checkout
uses: actions/checkout@v3
- name: build test package
run: bazel test --flaky_test_attempts=3 ...
run: bazel test --enable_bzlmod=0 --flaky_test_attempts=3 ...
shell: bash

bzlmod_arch:
name: bzlmod arch latest
runs-on: ubuntu-22.04
container: archlinux:latest
steps:
- name: setup
run: |
pacman --needed --noconfirm --noprogressbar -S -u -y \
bazel \
ca-certificates \
gcc \
git \
python \
which
rm -rf \
/var/cache/pacman/pkg/* \
/var/lib/pacman/sync/*
shell: bash
- name: checkout
uses: actions/checkout@v3
- name: build test package
run: bazel test --enable_bzlmod=1 --flaky_test_attempts=3 ...
shell: bash

bzlmod_macos:
name: bzlmod macos latest
runs-on: macos-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup
run: |
rm -f \
/usr/local/bin/2to3 \
/usr/local/bin/2to3-3.* \
/usr/local/bin/go \
/usr/local/bin/gofmt \
/usr/local/bin/idle3 \
/usr/local/bin/idle3.* \
/usr/local/bin/pydoc3 \
/usr/local/bin/pydoc3.* \
/usr/local/bin/python3 \
/usr/local/bin/python3.* \
/usr/local/bin/python3-config \
/usr/local/bin/python3.*-config \
/usr/local/lib/libtcl8.*.dylib \
/usr/local/lib/libtk8.*.dylib
brew update-reset -q
brew upgrade -f -q
brew bundle install -q --no-lock
brew cleanup -q -s
rm -rf $(brew --cache)
env:
HOMEBREW_NO_ANALYTICS: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
shell: zsh -efuo pipefail {0}
- name: build test package
run: bazel test --enable_bzlmod=1 --flaky_test_attempts=3 ...
shell: zsh -efuo pipefail {0}

bzlmod_ubuntu:
name: bzlmod ubuntu 22.04
runs-on: ubuntu-22.04
container: ubuntu:latest
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 \
g++ \
git \
gnupg \
python-is-python3 \
wget
wget -qO - https://bazel.build/bazel-release.pub.gpg 2>/dev/null | gpg --dearmor - \
> /usr/share/keyrings/bazel-archive-keyring.gpg
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/bazel-archive-keyring.gpg] https://storage.googleapis.com/bazel-apt stable jdk1.8' \
> /etc/apt/sources.list.d/bazel.list
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 \
bazel
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@v3
- name: build test package
run: bazel test --enable_bzlmod=1 --flaky_test_attempts=3 ...
shell: bash

cmake_alpine:
Expand Down Expand Up @@ -287,6 +389,8 @@ jobs:
rm -f \
/usr/local/bin/2to3 \
/usr/local/bin/2to3-3.* \
/usr/local/bin/go \
/usr/local/bin/gofmt \
/usr/local/bin/idle3 \
/usr/local/bin/idle3.* \
/usr/local/bin/pydoc3 \
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ jobs:
name: analyze
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v3
- name: initialize codeql
uses: github/codeql-action/init@v2
with:
languages: cpp
- name: autobuild
uses: github/codeql-action/autobuild@v2
- name: perform codeql analysis
uses: github/codeql-action/analyze@v2
- name: checkout
uses: actions/checkout@v3
- name: initialize codeql
uses: github/codeql-action/init@v2
with:
languages: cpp
- name: autobuild
uses: github/codeql-action/autobuild@v2
- name: perform codeql analysis
uses: github/codeql-action/analyze@v2
40 changes: 40 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#
# .yamllint.yaml
# RVO2-3D Library
#
# SPDX-FileCopyrightText: 2008 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 <geom@cs.unc.edu>.
#
# The authors may be contacted via:
#
# Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, 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
#
# <https://gamma.cs.unc.edu/RVO2/>
#

---
extends: default

rules:
line-length:
max: 80
level: warning
56 changes: 56 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# -*- mode: bazel; -*-
# vi: set ft=bazel:

#
# WORKSPACE.bazel
# RVO2-3D Library
#
# SPDX-FileCopyrightText: 2008 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 <geom@cs.unc.edu>.
#
# The authors may be contacted via:
#
# Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, 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
#
# <https://gamma.cs.unc.edu/RVO2/>
#

module(
name = "rvo_3d",
version = "1.1.0",
)

bazel_dep(
name = "apple_support",
version = "1.6.0",
repo_name = "build_bazel_apple_support"
)

apple_cc_configure = use_extension(
"@build_bazel_apple_support//crosstool:setup.bzl",
"apple_cc_configure_extension",
)
use_repo(apple_cc_configure, "local_config_apple_cc")

bazel_dep(name = "rules_cc", version = "0.0.6")
bazel_dep(name = "rules_license", version = "0.0.4")
bazel_dep(name = "rules_pkg", version = "0.9.1", dev_dependency = True)
Loading

0 comments on commit 4475188

Please sign in to comment.