Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[workflow] Build OpenGL on GHCI zhen server #1865

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .github/workflows/docs.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .github/workflows/gardener.yml

This file was deleted.

144 changes: 8 additions & 136 deletions .github/workflows/persubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,149 +4,21 @@ on:
types: [opened, synchronize, reopened]

jobs:
build_and_test_cpu:
name: Build and Test (CPU)
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip ci') && github.event.sender.login != 'taichi-gardener' }}

build_and_test_gpu:
strategy:
matrix:
include:
- os: ubuntu-latest
python: 3.6
with_cc: OFF
- os: macos-latest
python: 3.7
with_cc: OFF
- os: ubuntu-16.04 # TODO(archibate): windows-latest
python: 3.8
with_cc: OFF
- os: ubuntu-latest
python: 3.8
with_cc: ON
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}

- name: Download Pre-Built LLVM 10.0.0
run: |
python misc/ci_download.py
mkdir taichi-llvm
cd taichi-llvm
unzip ../taichi-llvm.zip
env:
CI_PLATFORM: ${{ matrix.os }}

- name: Build
run: |
export TAICHI_REPO_DIR=`pwd`
export PATH=$TAICHI_REPO_DIR/taichi-llvm/bin/:$PATH
export CXX=clang++
python misc/ci_setup.py ci
env:
CI_SETUP_CMAKE_ARGS: -DTI_WITH_OPENGL:BOOL=OFF -DTI_WITH_CC:BOOL=${{ matrix.with_cc }}

- name: Test
run: |
export TAICHI_REPO_DIR=`pwd`
export PATH=$TAICHI_REPO_DIR/bin:$PATH
export PATH=$TAICHI_REPO_DIR/taichi-llvm/bin/:$PATH
export PYTHONPATH=$TAICHI_REPO_DIR/python
python examples/laplace.py
ti diagnose
ti test -vr2 -t2

build_and_test_cuda:
name: Build and Test (CUDA)
- python: 3.7
with_opengl: ON
name: Build and Test (GPU)
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip ci') && github.event.sender.login != 'taichi-gardener' }}
runs-on: [zhen]
steps:
- uses: actions/checkout@v2
#sudo apt-get install libx11-dev libxcursor-dev libxi-dev
#sudo apt-get install libxrandr-dev libxinerama-dev libglvnd-dev

- name: Build
run: |
git --version
export TAICHI_REPO_DIR=`pwd`
export PATH=/home/github/taichi-llvm/bin/:$PATH
export CXX=clang++-8
export PYTHON=/usr/bin/python3.7
$PYTHON misc/ci_setup.py ci
env:
CI_SETUP_CMAKE_ARGS: -DTI_WITH_OPENGL:BOOL=OFF -DTI_WITH_CC:BOOL=${{ matrix.with_cc }}

- name: Test
run: |
export PYTHON=/usr/bin/python3.7
export TAICHI_REPO_DIR=`pwd`
export PATH=$TAICHI_REPO_DIR/bin:$PATH
export PATH=/home/github/taichi-llvm/bin/:$PATH
export PYTHONPATH=$TAICHI_REPO_DIR/python
$PYTHON examples/laplace.py
ti diagnose
ti test -vr2 -t2

check_previous_run:
name: Checks the Workflow Run of the Previous Commit
runs-on: ubuntu-latest
if: ${{ contains(github.event.pull_request.labels.*.name, 'skip ci') || github.event.sender.login == 'taichi-gardener' }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Check the previous run
env:
PR: ${{ github.event.pull_request.number }}
SHA: ${{ github.event.pull_request.head.sha }}
# https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token
# https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets
# Do not leak the secret
OAUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python misc/ci_check_previous_run.py --pr "${PR}" --sha "${SHA}" --token "${OAUTH_TOKEN}"

code_format:
name: Code Format
runs-on: ubuntu-latest
# Run this job unconditionally -- it is a required check for merging.
# if: ${{ !contains(github.event.pull_request.requested_reviewers.*.login, 'taichi-gardener') }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Check code format
run: |
git fetch https://github.com/taichi-dev/taichi.git refs/heads/master
git reset FETCH_HEAD
git add .
git config user.email "[email protected]"
git config user.name "Taichi Gardener"
git commit -m "fake squash commit" || true
git checkout -b _last_squash
git checkout -b _enforced_format
git reset FETCH_HEAD
python3 -m pip install --user yapf gitpython colorama
python3 python/taichi/code_format.py
git add .
git commit -m "enforce code format" || true
# exit with 1 if there were differences:
git diff _last_squash _enforced_format --exit-code

title_format:
name: Check PR Title
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Run PR Title Checker
run: |
pip install semver GitPython
python misc/ci_check_pr_title.py "$PR_TITLE"
env:
PR_TITLE: ${{ github.event.pull_request.title }}
xvfb-run glewinfo
69 changes: 0 additions & 69 deletions .travis.yml

This file was deleted.