Skip to content

ci

ci #694

Workflow file for this run

#
# 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-22.04
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@v3
- name: post-checkout setup
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
- name: build package
run: bazel build ...
shell: bash
bazel_macos:
name: bazel macos latest
runs-on: macos-latest
steps:
- name: pre-checkout 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 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@v3
- name: post-checkout setup
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
- name: build package
run: bazel build ...
shell: zsh -efuo pipefail {0}
bazel_ubuntu:
name: bazel ubuntu 22.04
runs-on: ubuntu-22.04
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 \
libicu70 \
liblttng-ust1 \
python-is-python3 \
zlib1g
curl -sS https://bazel.build/bazel-release.pub.gpg | 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: post-checkout setup
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
- name: build package
run: bazel build ...
shell: bash
dotnet_alpine:
name: dotnet alpine 3
runs-on: ubuntu-22.04
container: alpine:3
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@v3
- name: post-checkout setup
uses: actions/setup-dotnet@v3
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-22.04
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@v3
- name: post-checkout setup
uses: actions/setup-dotnet@v3
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-22.04
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@v3
- name: post-checkout setup
uses: actions/setup-dotnet@v3
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 latest
runs-on: macos-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup
uses: actions/setup-dotnet@v3
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-22.04
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@v3
- name: post-checkout setup
uses: actions/setup-dotnet@v3
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 22.04
runs-on: ubuntu-22.04
container: ubuntu:22.04
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 \
libicu70 \
liblttng-ust1 \
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@v3
- name: post-checkout setup
uses: actions/setup-dotnet@v3
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@v3
- name: setup
uses: actions/setup-dotnet@v3
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