mirror of
https://github.com/panda3d/panda3d.git
synced 2026-05-02 20:50:17 -05:00
general: Reset back to master's travis, add CMake jobs to ci.yml
This commit is contained in:
@@ -1,6 +1,336 @@
|
||||
name: Continuous Integration
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
cmake:
|
||||
name: CMake Buildsystem
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
matrix:
|
||||
profile:
|
||||
- ubuntu-xenial-standard-unity-makefile
|
||||
- ubuntu-bionic-coverage-ninja
|
||||
- macos-eigen-coverage-unity-xcode
|
||||
- macos-nometa-standard-makefile
|
||||
- windows-standard-unity-msvc
|
||||
- windows-nopython-nometa-standard-msvc
|
||||
|
||||
include:
|
||||
- profile: ubuntu-xenial-standard-unity-makefile
|
||||
os: ubuntu-16.04
|
||||
config: Standard
|
||||
unity: YES
|
||||
generator: Unix Makefiles
|
||||
compiler: Default
|
||||
metalibs: YES
|
||||
python: YES
|
||||
eigen: NO
|
||||
|
||||
- profile: ubuntu-bionic-coverage-ninja
|
||||
os: ubuntu-18.04
|
||||
config: Coverage
|
||||
unity: NO
|
||||
generator: Ninja
|
||||
compiler: Clang
|
||||
metalibs: YES
|
||||
python: YES
|
||||
eigen: NO
|
||||
|
||||
- profile: macos-eigen-coverage-unity-xcode
|
||||
os: macOS-10.14
|
||||
config: Coverage
|
||||
unity: YES
|
||||
generator: Xcode
|
||||
compiler: Default
|
||||
metalibs: YES
|
||||
python: YES
|
||||
eigen: YES
|
||||
|
||||
- profile: macos-nometa-standard-makefile
|
||||
os: macOS-10.14
|
||||
config: Standard
|
||||
unity: NO
|
||||
generator: Unix Makefiles
|
||||
compiler: Default
|
||||
metalibs: NO
|
||||
python: YES
|
||||
eigen: NO
|
||||
|
||||
- profile: windows-standard-unity-msvc
|
||||
os: windows-2019
|
||||
config: Standard
|
||||
unity: NO # FIXME when GH Actions runners upgrade CMake to >=3.16.1
|
||||
generator: Visual Studio 16 2019
|
||||
compiler: Default
|
||||
metalibs: YES
|
||||
python: YES
|
||||
eigen: NO
|
||||
|
||||
- profile: windows-nopython-nometa-standard-msvc
|
||||
os: windows-2019
|
||||
config: Standard
|
||||
unity: NO
|
||||
generator: Visual Studio 16 2019
|
||||
compiler: Default
|
||||
metalibs: NO
|
||||
python: NO
|
||||
eigen: NO
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
fetch-depth: 10
|
||||
|
||||
- name: Self-destruct makepanda
|
||||
run: python makepanda/selfdestruct.py --yes
|
||||
|
||||
- name: Install dependencies (macOS)
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
curl -O https://www.panda3d.org/download/panda3d-1.10.5/panda3d-1.10.5-tools-mac.tar.gz
|
||||
tar -xf panda3d-1.10.5-tools-mac.tar.gz
|
||||
|
||||
echo "##[set-env name=thirdpartyOption;]-D THIRDPARTY_DIRECTORY=../panda3d-1.10.5/thirdparty" -DHAVE_CG=OFF
|
||||
|
||||
- name: Install dependencies (Ubuntu)
|
||||
if: startsWith(matrix.os, 'ubuntu')
|
||||
run: >
|
||||
sudo apt-get update
|
||||
|
||||
sudo apt-get install
|
||||
build-essential ninja-build clang llvm
|
||||
bison flex
|
||||
libeigen3-dev libfreetype6-dev libgl1-mesa-dev libjpeg-dev libode-dev
|
||||
libopenal-dev libpng-dev libssl-dev libvorbis-dev libx11-dev
|
||||
libxcursor-dev libxrandr-dev nvidia-cg-toolkit zlib1g-dev
|
||||
|
||||
# Workaround for CMake 3.12 finding this first:
|
||||
|
||||
sudo rm /usr/bin/x86_64-linux-gnu-python2.7-config
|
||||
|
||||
- name: Cache dependencies (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: thirdparty-tools
|
||||
key: ci-cmake-${{ runner.OS }}-thirdparty-v1.10.5-r1
|
||||
- name: Install dependencies (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
shell: powershell
|
||||
run: |
|
||||
if (!(Test-Path thirdparty-tools/panda3d-1.10.5)) {
|
||||
$wc = New-Object System.Net.WebClient
|
||||
$wc.DownloadFile("https://www.panda3d.org/download/panda3d-1.10.5/panda3d-1.10.5-tools-win64.zip", "thirdparty-tools.zip")
|
||||
Expand-Archive -Path thirdparty-tools.zip
|
||||
}
|
||||
|
||||
echo "##[set-env name=thirdpartyOption;]-D THIRDPARTY_DIRECTORY=../thirdparty-tools/panda3d-1.10.5/thirdparty"
|
||||
|
||||
- name: Configure
|
||||
shell: bash
|
||||
env:
|
||||
CMAKE_GENERATOR: "${{ matrix.generator }}"
|
||||
run: >
|
||||
mkdir build
|
||||
|
||||
cd build
|
||||
|
||||
if ${{ matrix.compiler == 'Clang' }}; then
|
||||
if [[ "$CMAKE_GENERATOR" == *Studio*2019* ]]; then
|
||||
export CMAKE_GENERATOR_TOOLSET=ClangCL thirdpartyOption="$thirdpartyOption -DHAVE_HARFBUZZ=NO"
|
||||
elif [[ "$CMAKE_GENERATOR" == *Studio* ]]; then
|
||||
export CMAKE_GENERATOR_TOOLSET=LLVM thirdpartyOption="$thirdpartyOption -DHAVE_HARFBUZZ=NO"
|
||||
else
|
||||
export CC=clang CXX=clang++
|
||||
fi
|
||||
fi
|
||||
|
||||
cmake
|
||||
-D CMAKE_UNITY_BUILD=${{ matrix.unity }}
|
||||
-D CMAKE_BUILD_TYPE="${{ matrix.config }}"
|
||||
-D BUILD_METALIBS=${{ matrix.metalibs }}
|
||||
-D HAVE_PYTHON=${{ matrix.python }}
|
||||
-D HAVE_EIGEN=${{ matrix.eigen }}
|
||||
${thirdpartyOption:-}
|
||||
..
|
||||
|
||||
- name: Build (no Python)
|
||||
if: contains(matrix.python, 'NO')
|
||||
# BEGIN A
|
||||
working-directory: build
|
||||
run: cmake --build . --config ${{ matrix.config }}
|
||||
# END A
|
||||
|
||||
- name: Setup Python (Python 2.7)
|
||||
if: contains(matrix.python, 'YES')
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 2.7
|
||||
- name: Configure (Python 2.7)
|
||||
if: contains(matrix.python, 'YES')
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: >
|
||||
cmake -DWANT_PYTHON_VERSION=2.7
|
||||
-DPython_FIND_REGISTRY=NEVER -DPython_ROOT=$pythonLocation .
|
||||
- name: Build (Python 2.7)
|
||||
if: contains(matrix.python, 'YES')
|
||||
# BEGIN A
|
||||
working-directory: build
|
||||
run: cmake --build . --config ${{ matrix.config }}
|
||||
# END A
|
||||
- name: Test (Python 2.7)
|
||||
# BEGIN B
|
||||
if: contains(matrix.python, 'YES')
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: |
|
||||
PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:FILEPATH' CMakeCache.txt | sed 's/.*=//')
|
||||
$PYTHON_EXECUTABLE -m pip install pytest pytest-cov
|
||||
export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw
|
||||
ctest -V -C ${{ matrix.config }}
|
||||
# END B
|
||||
|
||||
- name: Setup Python (Python 3.5)
|
||||
if: contains(matrix.python, 'YES')
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.5
|
||||
- name: Configure (Python 3.5)
|
||||
if: contains(matrix.python, 'YES')
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: >
|
||||
cmake -DWANT_PYTHON_VERSION=3.5
|
||||
-DPython_FIND_REGISTRY=NEVER -DPython_ROOT=$pythonLocation .
|
||||
- name: Build (Python 3.5)
|
||||
if: contains(matrix.python, 'YES')
|
||||
# BEGIN A
|
||||
working-directory: build
|
||||
run: cmake --build . --config ${{ matrix.config }}
|
||||
# END A
|
||||
- name: Test (Python 3.5)
|
||||
# BEGIN B
|
||||
if: contains(matrix.python, 'YES')
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: |
|
||||
PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:FILEPATH' CMakeCache.txt | sed 's/.*=//')
|
||||
$PYTHON_EXECUTABLE -m pip install pytest pytest-cov
|
||||
export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw
|
||||
ctest -V -C ${{ matrix.config }}
|
||||
# END B
|
||||
|
||||
- name: Setup Python (Python 3.6)
|
||||
if: contains(matrix.python, 'YES')
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.6
|
||||
- name: Configure (Python 3.6)
|
||||
if: contains(matrix.python, 'YES')
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: >
|
||||
cmake -DWANT_PYTHON_VERSION=3.6
|
||||
-DPython_FIND_REGISTRY=NEVER -DPython_ROOT=$pythonLocation .
|
||||
- name: Build (Python 3.6)
|
||||
if: contains(matrix.python, 'YES')
|
||||
# BEGIN A
|
||||
working-directory: build
|
||||
run: cmake --build . --config ${{ matrix.config }}
|
||||
# END A
|
||||
- name: Test (Python 3.6)
|
||||
# BEGIN B
|
||||
if: contains(matrix.python, 'YES')
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: |
|
||||
PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:FILEPATH' CMakeCache.txt | sed 's/.*=//')
|
||||
$PYTHON_EXECUTABLE -m pip install pytest pytest-cov
|
||||
export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw
|
||||
ctest -V -C ${{ matrix.config }}
|
||||
# END B
|
||||
|
||||
- name: Setup Python (Python 3.7)
|
||||
if: contains(matrix.python, 'YES')
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Configure (Python 3.7)
|
||||
if: contains(matrix.python, 'YES')
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: >
|
||||
cmake -DWANT_PYTHON_VERSION=3.7
|
||||
-DPython_FIND_REGISTRY=NEVER -DPython_ROOT=$pythonLocation .
|
||||
- name: Build (Python 3.7)
|
||||
if: contains(matrix.python, 'YES')
|
||||
# BEGIN A
|
||||
working-directory: build
|
||||
run: cmake --build . --config ${{ matrix.config }}
|
||||
# END A
|
||||
- name: Test (Python 3.7)
|
||||
# BEGIN B
|
||||
if: contains(matrix.python, 'YES')
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: |
|
||||
PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:FILEPATH' CMakeCache.txt | sed 's/.*=//')
|
||||
$PYTHON_EXECUTABLE -m pip install pytest pytest-cov
|
||||
export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw
|
||||
ctest -V -C ${{ matrix.config }}
|
||||
# END B
|
||||
|
||||
- name: Setup Python (Python 3.8)
|
||||
if: contains(matrix.python, 'YES')
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.8
|
||||
- name: Configure (Python 3.8)
|
||||
if: contains(matrix.python, 'YES')
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: >
|
||||
cmake -DWANT_PYTHON_VERSION=3.8
|
||||
-DPython_FIND_REGISTRY=NEVER -DPython_ROOT=$pythonLocation .
|
||||
- name: Build (Python 3.8)
|
||||
if: contains(matrix.python, 'YES')
|
||||
# BEGIN A
|
||||
working-directory: build
|
||||
run: cmake --build . --config ${{ matrix.config }}
|
||||
# END A
|
||||
- name: Test (Python 3.8)
|
||||
# BEGIN B
|
||||
if: contains(matrix.python, 'YES')
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: |
|
||||
PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:FILEPATH' CMakeCache.txt | sed 's/.*=//')
|
||||
$PYTHON_EXECUTABLE -m pip install pytest pytest-cov
|
||||
export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw
|
||||
ctest -V -C ${{ matrix.config }}
|
||||
# END B
|
||||
|
||||
- name: Upload coverage reports
|
||||
if: always() && matrix.config == 'Coverage'
|
||||
working-directory: build
|
||||
shell: bash
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
run: |
|
||||
shopt -s expand_aliases
|
||||
if ${{ runner.os == 'macOS' }}; then alias llvm-profdata='xcrun llvm-profdata' llvm-cov='xcrun llvm-cov'; fi
|
||||
|
||||
python -m coverage combine $(find . -name '.coverage.*')
|
||||
|
||||
llvm-profdata merge pid-*.profraw -o coverage.profdata
|
||||
llvm-cov show $(grep -Rl LLVM_PROFILE_FILE . | sed 's/^/-object /') -instr-profile=coverage.profdata > coverage.txt
|
||||
bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
makepanda:
|
||||
strategy:
|
||||
matrix:
|
||||
|
||||
+14
-78
@@ -1,28 +1,18 @@
|
||||
language: cpp
|
||||
sudo: false
|
||||
|
||||
cache: ccache
|
||||
|
||||
# Build matrix:
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
compiler:
|
||||
- clang
|
||||
env:
|
||||
- BUILD_METALIBS=ON COMPOSITE_SOURCE_LIMIT=30
|
||||
- BUILD_METALIBS=ON COMPOSITE_SOURCE_LIMIT=30 PYTHON_INTERP=python2.7
|
||||
- BUILD_METALIBS=OFF COMPOSITE_SOURCE_LIMIT=30
|
||||
- BUILD_METALIBS=ON COMPOSITE_SOURCE_LIMIT=0
|
||||
matrix:
|
||||
exclude:
|
||||
- os: osx
|
||||
env: BUILD_METALIBS=ON COMPOSITE_SOURCE_LIMIT=0
|
||||
include:
|
||||
- os: osx
|
||||
env: BUILD_METALIBS=ON COMPOSITE_SOURCE_LIMIT=30 COMPOSITE_SOURCE_EXCLUSIONS='p3showbase;p3dtoolutil;p3cocoadisplay;p3osxdisplay;p3tinydisplay;p3display'
|
||||
- compiler: clang
|
||||
env: PYTHONV=python3 FLAGS=--installer
|
||||
- compiler: clang
|
||||
env: PYTHONV=python2.7 FLAGS=--override=STDFLOAT_DOUBLE=1
|
||||
- compiler: gcc
|
||||
|
||||
env: PYTHONV=python2.7 FLAGS=--optimize=4
|
||||
before_install:
|
||||
- export CC=gcc-4.7
|
||||
- export CXX=g++-4.7
|
||||
- compiler: clang
|
||||
env: PYTHONV=python3 FLAGS=--no-python SKIP_TESTS=1
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
@@ -32,10 +22,6 @@ addons:
|
||||
- g++-4.7
|
||||
- bison
|
||||
- flex
|
||||
- libavcodec-dev
|
||||
- libavformat-dev
|
||||
- libavresample-dev
|
||||
- libavutil-dev
|
||||
- libfreetype6-dev
|
||||
- libgl1-mesa-dev
|
||||
- libjpeg-dev
|
||||
@@ -43,7 +29,6 @@ addons:
|
||||
- libopenal-dev
|
||||
- libpng-dev
|
||||
- libssl-dev
|
||||
- libswscale-dev
|
||||
- libvorbis-dev
|
||||
- libx11-dev
|
||||
- libxcursor-dev
|
||||
@@ -51,64 +36,15 @@ addons:
|
||||
- nvidia-cg-toolkit
|
||||
- python-dev
|
||||
- python3-dev
|
||||
- python3-pip
|
||||
- python-virtualenv
|
||||
- zlib1g-dev
|
||||
- fakeroot
|
||||
|
||||
before_install:
|
||||
# clean up remnants of makepanda
|
||||
- makepanda/selfdestruct.py --yes
|
||||
|
||||
install:
|
||||
- >
|
||||
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
brew install python@3 eigen libsquish zlib ffmpeg freetype \
|
||||
bullet opencv assimp libvorbis openssl ccache || true
|
||||
brew install ode --with-shared
|
||||
|
||||
# We can't trust brew to make the right symlinks, so execute commands as modules
|
||||
${PYTHON_INTERP:-python3} -m pip install virtualenv
|
||||
${PYTHON_INTERP:-python3} -m virtualenv venv
|
||||
else
|
||||
virtualenv --python=${PYTHON_INTERP:-python3} venv
|
||||
fi
|
||||
- source venv/bin/activate
|
||||
- pip install pytest
|
||||
|
||||
before_script:
|
||||
- mkdir built
|
||||
- cd built
|
||||
|
||||
- virtualenv --python=$PYTHONV venv && source venv/bin/activate
|
||||
- $PYTHONV -m pip install pytest
|
||||
script:
|
||||
# This is kind of a hack, but needed to test non-metalib builds (until
|
||||
# interrogate has a way of explicitly calling init_libpanda)
|
||||
- '[ "x$BUILD_METALIBS" == "xON" -o "x$TRAVIS_OS_NAME" == "xosx" ] || export LDFLAGS=-Wl,--no-as-needed'
|
||||
|
||||
- >
|
||||
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
if [[ "$PYTHON_INTERP" == "python2.7" ]]; then
|
||||
export PY2_CMAKE_ARGS=-DPYTHON_EXECUTABLE=/usr/local/Frameworks/Python.framework/Versions/2.7/bin/python
|
||||
fi
|
||||
|
||||
cmake -DBUILD_METALIBS=$BUILD_METALIBS \
|
||||
-DWANT_PYTHON_VERSION=$(python -V 2>&1 | cut -d' ' -f2) \
|
||||
-DCMAKE_{C,CXX}_COMPILER_LAUNCHER=ccache \
|
||||
-DCOMPOSITE_SOURCE_EXCLUSIONS="$COMPOSITE_SOURCE_EXCLUSIONS" \
|
||||
-DCOMPOSITE_SOURCE_LIMIT=$COMPOSITE_SOURCE_LIMIT \
|
||||
-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl $PY2_CMAKE_ARGS ..
|
||||
else
|
||||
cmake -DHAVE_GTK2=NO -DBUILD_METALIBS=$BUILD_METALIBS \
|
||||
-DWANT_PYTHON_VERSION=$(python -V 2>&1 | cut -d' ' -f2) \
|
||||
-DCMAKE_{C,CXX}_COMPILER_LAUNCHER=ccache \
|
||||
-DCOMPOSITE_SOURCE_EXCLUSIONS="$COMPOSITE_SOURCE_EXCLUSIONS" \
|
||||
-DCOMPOSITE_SOURCE_LIMIT=$COMPOSITE_SOURCE_LIMIT ..
|
||||
fi
|
||||
- make -j4
|
||||
|
||||
- export PYTHONPATH=$PWD
|
||||
- pytest -v ../tests
|
||||
|
||||
- $PYTHONV makepanda/makepanda.py --everything --git-commit $TRAVIS_COMMIT $FLAGS --threads 4
|
||||
- test -n "$SKIP_TESTS" || LD_LIBRARY_PATH=built/lib PYTHONPATH=built $PYTHONV -m pytest -v tests
|
||||
notifications:
|
||||
irc:
|
||||
channels:
|
||||
|
||||
Reference in New Issue
Block a user