|
| 1 | +on: |
| 2 | + push: |
| 3 | + branches: |
| 4 | + - master |
| 5 | + pull_request: |
| 6 | + |
| 7 | +env: |
| 8 | + DISPLAY: '0:0' |
| 9 | + |
| 10 | +jobs: |
| 11 | + linux: |
| 12 | + strategy: |
| 13 | + matrix: |
| 14 | + include: |
| 15 | + - DOCKER_IMAGE: ubuntu:trusty |
| 16 | + - DOCKER_IMAGE: ubuntu:xenial |
| 17 | + - DOCKER_IMAGE: ubuntu:bionic |
| 18 | + - DOCKER_IMAGE: ubuntu:bionic |
| 19 | + COLLISION_LIB: PQP |
| 20 | + - DOCKER_IMAGE: ubuntu:bionic |
| 21 | + COLLISION_LIB: BULLET |
| 22 | + - DOCKER_IMAGE: ubuntu:focal |
| 23 | + - DOCKER_IMAGE: debian:stretch |
| 24 | + - DOCKER_IMAGE: osrf/ubuntu_armhf:trusty |
| 25 | + - DOCKER_IMAGE: osrf/ubuntu_armhf:xenial |
| 26 | + - DOCKER_IMAGE: osrf/ubuntu_arm64:trusty |
| 27 | + - DOCKER_IMAGE: osrf/ubuntu_arm64:xenial |
| 28 | + - DOCKER_IMAGE: osrf/ubuntu_arm64:bionic |
| 29 | + - DOCKER_IMAGE: osrf/ubuntu_arm64:focal |
| 30 | + - DOCKER_IMAGE: osrf/debian_arm64:stretch |
| 31 | + fail-fast: false |
| 32 | + |
| 33 | + runs-on: ubuntu-latest |
| 34 | + timeout-minutes: 90 |
| 35 | + |
| 36 | + name: linux |
| 37 | + |
| 38 | + steps: |
| 39 | + - name: Checkout |
| 40 | + uses: actions/checkout@v2 |
| 41 | + - name: Run test |
| 42 | + shell: bash |
| 43 | + run: | |
| 44 | + set -x |
| 45 | + export CI_SOURCE_PATH=$(pwd) |
| 46 | + export REPOSITORY_NAME=${PWD##*/} |
| 47 | + export TRAVIS_BRANCH=${GITHUB_REF#refs/heads/} |
| 48 | + export TRAVIS_OS_NAME=linux |
| 49 | + export DOCKER_IMAGE=${{matrix.DOCKER_IMAGE}} |
| 50 | + if [[ "$DOCKER_IMAGE" == *"arm"* ]]; then sudo apt-get install -y -qq qemu-user-static git; fi |
| 51 | + echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME" |
| 52 | + docker run --rm -v $CI_SOURCE_PATH:$CI_SOURCE_PATH -e "DOCKER_IMAGE=$DOCKER_IMAGE" -e "COLLISION_LIB=$COLLISION_LIB" -e "CI_SOURCE_PATH=$CI_SOURCE_PATH" -e "HOME=$HOME" -t $DOCKER_IMAGE sh -c "cd $CI_SOURCE_PATH; ./.travis.sh" |
| 53 | +
|
| 54 | + doc: |
| 55 | + runs-on: ubuntu-latest |
| 56 | + timeout-minutes: 60 |
| 57 | + |
| 58 | + steps: |
| 59 | + - name: Checkout |
| 60 | + uses: actions/checkout@v2 |
| 61 | + - name: Run test |
| 62 | + shell: bash |
| 63 | + run: | |
| 64 | + set -x |
| 65 | + sudo apt-get install -y -qq git make gcc g++ libjpeg-dev libxext-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev libpq-dev libpng-dev xfonts-100dpi xfonts-75dpi pkg-config libbullet-dev |
| 66 | + make |
| 67 | + sudo apt-get install -y -qq texlive-binaries texlive-lang-cjk texlive-lang-japanese poppler-utils nkf latex2html |
| 68 | + (source bashrc.eus; cd doc/; make pdf) |
| 69 | + (source bashrc.eus; cd doc/; make html) |
| 70 | +
|
| 71 | +
|
| 72 | + osx: |
| 73 | + runs-on: macos-latest |
| 74 | + timeout-minutes: 60 |
| 75 | + steps: |
| 76 | + - name: Checkout |
| 77 | + uses: actions/checkout@v2 |
| 78 | + - name: Get brew cache directory |
| 79 | + id: brew-cache |
| 80 | + run: echo "::set-output name=dir::$(brew --cache)/downloads" |
| 81 | + - name: Brew cache |
| 82 | + uses: actions/cache@v2 |
| 83 | + with: |
| 84 | + path: ${{ steps.brew-cache.outputs.dir }} |
| 85 | + key: ${{ runner.os }}-${{ hashFiles('.github/workflows/Brewfile') }} |
| 86 | + - name: Brew config |
| 87 | + run: | |
| 88 | + cd .github/workflows/ |
| 89 | + brew config |
| 90 | + - name: Run test |
| 91 | + shell: bash |
| 92 | + run: | |
| 93 | + set -x |
| 94 | + export CI_SOURCE_PATH=$(pwd) |
| 95 | + export REPOSITORY_NAME=${PWD##*/} |
| 96 | + export TRAVIS_BRANCH=${GITHUB_REF#refs/heads/} |
| 97 | + export LC_CTYPE=C |
| 98 | + echo insecure >> ~/.curlrc |
| 99 | + export HOMEBREW_CURLRC=1 |
| 100 | + HOMEBREW_NO_AUTO_UPDATE=1 brew install coreutils |
| 101 | + export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" |
| 102 | + # since macos-11, we need to install GL/gl.h |
| 103 | + HOMEBREW_NO_AUTO_UPDATE=1 brew install mesa-glu |
| 104 | + ./.travis-osx.sh |
| 105 | + - name: Cleanup some brew downloads |
| 106 | + run: cd ${{ steps.brew-cache.outputs.dir }} && ls -lsS | head -n 10 | awk '{ print $10 }' | xargs rm -rf |
0 commit comments