ci #1130
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# ci.yml | |
# RVO2 Library C# | |
# | |
# 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/> | |
# | |
--- | |
name: ci | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
release: | |
types: | |
- published | |
schedule: | |
- cron: '0 5 * * *' | |
env: | |
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
jobs: | |
bazel_arch: | |
name: bazel arch latest | |
runs-on: ubuntu-latest | |
container: archlinux:latest | |
steps: | |
- name: pre-checkout setup | |
run: | | |
pacman --needed --noconfirm --noprogressbar -S -u -y \ | |
bazel \ | |
ca-certificates \ | |
curl \ | |
gcc \ | |
git \ | |
icu \ | |
lttng-ust \ | |
python \ | |
which \ | |
zlib | |
rm -rf \ | |
/var/cache/pacman/pkg/* \ | |
/var/lib/pacman/sync/* | |
shell: bash | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: post-checkout setup | |
uses: actions/setup-dotnet@v4 | |
with: | |
global-json-file: global.json | |
- name: build package | |
run: bazel build ... | |
shell: bash | |
bazel_macos: | |
name: bazel macos 14 | |
runs-on: macos-14 | |
steps: | |
- name: pre-checkout setup | |
run: | | |
brew update -q | |
brew upgrade -f -q | |
brew unlink -q bazelisk | |
brew install -q \ | |
bazel \ | |
buildifier \ | |
git \ | |
python \ | |
jsonlint \ | |
markdownlint-cli \ | |
yamllint | |
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: checkout | |
uses: actions/checkout@v4 | |
- name: post-checkout setup | |
uses: actions/setup-dotnet@v4 | |
with: | |
global-json-file: global.json | |
- name: build package | |
run: bazel build ... | |
shell: zsh -efuo pipefail {0} | |
bazel_ubuntu: | |
name: bazel ubuntu latest | |
runs-on: ubuntu-latest | |
container: ubuntu:latest | |
steps: | |
- name: pre-checkout 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 \ | |
curl \ | |
g++ \ | |
git \ | |
gnupg \ | |
libicu74 \ | |
liblttng-ust1t64 \ | |
python-is-python3 \ | |
zlib1g | |
curl -sS https://bazel.build/bazel-release.pub.gpg | gpg --dearmor - \ | |
> /usr/share/keyrings/bazel-archive-keyring.gpg | |
echo 'deb [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@v4 | |
- name: post-checkout setup | |
uses: actions/setup-dotnet@v4 | |
with: | |
global-json-file: global.json | |
- name: build package | |
run: bazel build ... | |
shell: bash | |
dotnet_alpine: | |
name: dotnet alpine latest | |
runs-on: ubuntu-latest | |
container: alpine:latest | |
steps: | |
- name: pre-checkout setup | |
run: | | |
apk upgrade -q --no-cache | |
apk add -q --no-cache \ | |
bash \ | |
ca-certificates \ | |
curl \ | |
git \ | |
icu \ | |
lttng-ust \ | |
zlib | |
shell: sh | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: post-checkout setup | |
uses: actions/setup-dotnet@v4 | |
with: | |
global-json-file: global.json | |
- name: build package debug | |
run: | | |
dotnet build --configuration Debug --nologo RVOCS.sln | |
dotnet pack --configuration Debug --no-build --nologo RVOCS/RVOCS.csproj | |
shell: sh | |
- name: build package release | |
run: | | |
dotnet build --configuration Release --nologo RVOCS.sln | |
dotnet pack --configuration Release --no-build --nologo RVOCS/RVOCS.csproj | |
shell: sh | |
dotnet_arch: | |
name: dotnet arch latest | |
runs-on: ubuntu-latest | |
container: archlinux:latest | |
steps: | |
- name: pre-checkout setup | |
run: | | |
pacman --needed --noconfirm --noprogressbar -S -u -y \ | |
ca-certificates \ | |
curl \ | |
git \ | |
icu \ | |
lttng-ust \ | |
zlib | |
rm -rf \ | |
/var/cache/pacman/pkg/* \ | |
/var/lib/pacman/sync/* | |
shell: bash | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: post-checkout setup | |
uses: actions/setup-dotnet@v4 | |
with: | |
global-json-file: global.json | |
- name: build package debug | |
run: | | |
dotnet build --configuration Debug --nologo RVOCS.sln | |
dotnet pack --configuration Debug --no-build --nologo RVOCS/RVOCS.csproj | |
shell: bash | |
- name: build package release | |
run: | | |
dotnet build --configuration Release --nologo RVOCS.sln | |
dotnet pack --configuration Release --no-build --nologo RVOCS/RVOCS.csproj | |
shell: bash | |
dotnet_fedora: | |
name: dotnet fedora latest | |
runs-on: ubuntu-latest | |
container: fedora:latest | |
steps: | |
- name: pre-checkout setup | |
run: | | |
dnf makecache -q --refresh || (sleep 15; dnf makecache -q --refresh) | |
dnf upgrade -q -y | |
dnf install -q -y \ | |
ca-certificates \ | |
curl \ | |
findutils \ | |
git \ | |
glibc-langpack-en \ | |
libicu \ | |
lttng-ust \ | |
zlib | |
dnf clean all | |
rm -rf /var/cache/yum | |
shell: bash | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: post-checkout setup | |
uses: actions/setup-dotnet@v4 | |
with: | |
global-json-file: global.json | |
- name: build package debug | |
run: | | |
dotnet build --configuration Debug --nologo RVOCS.sln | |
dotnet pack --configuration Debug --no-build --nologo RVOCS/RVOCS.csproj | |
shell: bash | |
- name: build package release | |
run: | | |
dotnet build --configuration Release --nologo RVOCS.sln | |
dotnet pack --configuration Release --no-build --nologo RVOCS/RVOCS.csproj | |
shell: bash | |
dotnet_macos: | |
name: dotnet macos 14 | |
runs-on: macos-14 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: setup | |
uses: actions/setup-dotnet@v4 | |
with: | |
global-json-file: global.json | |
- name: build package debug | |
run: | | |
dotnet build --configuration Debug --nologo RVOCS.sln | |
dotnet pack --configuration Debug --no-build --nologo RVOCS/RVOCS.csproj | |
shell: zsh -efuo pipefail {0} | |
- name: build and pack release | |
run: | | |
dotnet build --configuration Release --nologo RVOCS.sln | |
dotnet pack --configuration Release --no-build --nologo RVOCS/RVOCS.csproj | |
shell: zsh -efuo pipefail {0} | |
dotnet_rockylinux: | |
name: dotnet rockylinux 9 | |
runs-on: ubuntu-latest | |
container: rockylinux:9 | |
steps: | |
- name: pre-checkout setup | |
run: | | |
dnf makecache -q --refresh || (sleep 15; dnf makecache -q --refresh) | |
dnf upgrade -q -y | |
dnf install -q -y \ | |
ca-certificates \ | |
curl-minimal \ | |
findutils \ | |
git \ | |
glibc-langpack-en \ | |
libicu \ | |
lttng-ust \ | |
zlib | |
dnf clean all | |
rm -rf /var/cache/yum | |
shell: bash | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: post-checkout setup | |
uses: actions/setup-dotnet@v4 | |
with: | |
global-json-file: global.json | |
- name: build package debug | |
run: | | |
dotnet build --configuration Debug --nologo RVOCS.sln | |
dotnet pack --configuration Debug --no-build --nologo RVOCS/RVOCS.csproj | |
shell: bash | |
- name: build package release | |
run: | | |
dotnet build --configuration Release --nologo RVOCS.sln | |
dotnet pack --configuration Release --no-build --nologo RVOCS/RVOCS.csproj | |
shell: bash | |
dotnet_ubuntu: | |
name: dotnet ubuntu latest | |
runs-on: ubuntu-latest | |
container: ubuntu:latest | |
steps: | |
- name: pre-checkout 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 \ | |
curl \ | |
git \ | |
libicu74 \ | |
liblttng-ust1t64 \ | |
zlib1g | |
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@v4 | |
- name: post-checkout setup | |
uses: actions/setup-dotnet@v4 | |
with: | |
global-json-file: global.json | |
source-url: https://nuget.pkg.github.com/snape/index.json | |
env: | |
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: build package debug | |
run: | | |
dotnet build --configuration Debug --nologo RVOCS.sln | |
dotnet pack --configuration Debug --no-build --nologo RVOCS/RVOCS.csproj | |
shell: bash | |
- name: build package release | |
run: | | |
dotnet build --configuration Release --nologo RVOCS.sln | |
dotnet pack --configuration Release --no-build --nologo RVOCS/RVOCS.csproj | |
shell: bash | |
- name: push | |
run: | | |
dotnet nuget push --no-symbols true --skip-duplicate RVOCS/bin/Release/RVOCS.*.nupkg | |
shell: bash | |
if: ${{ github.event.release.published }} | |
dotnet_windows: | |
name: dotnet windows latest | |
runs-on: windows-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: setup | |
uses: actions/setup-dotnet@v4 | |
with: | |
global-json-file: global.json | |
- name: build package debug | |
run: | | |
dotnet build --configuration Debug RVOCS.sln | |
dotnet pack --configuration Debug --no-build RVOCS\RVOCS.csproj | |
shell: pwsh | |
- name: build and pack release | |
run: | | |
dotnet build --configuration Release RVOCS.sln | |
dotnet pack --configuration Release --no-build RVOCS\RVOCS.csproj | |
shell: pwsh |