From a3691748dba267c1fa1c9b40f60451793d931d81 Mon Sep 17 00:00:00 2001 From: Yu Fang Date: Wed, 21 Jul 2021 17:11:46 +0800 Subject: [PATCH] push --- .github/workflows/manual.yml | 243 -------------------------------- .github/workflows/presubmit.yml | 4 +- 2 files changed, 1 insertion(+), 246 deletions(-) delete mode 100644 .github/workflows/manual.yml diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml deleted file mode 100644 index 43cf8c19a..000000000 --- a/.github/workflows/manual.yml +++ /dev/null @@ -1,243 +0,0 @@ -name: Presubmit Checks -on: - push: - types: [opened, synchronize, reopened] - -jobs: - 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 }} - - check_code_format: - name: Check Code Format - runs-on: ubuntu-latest - # This job will be required to pass before merging to master branch. - 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 config user.email "taichigardener@gmail.com" - git config user.name "Taichi Gardener" - git checkout -b _fake_squash - git remote add upstream https://github.com/taichi-dev/taichi.git - git fetch upstream master - sudo apt-get install clang-format - python3 -m pip install --user yapf gitpython colorama isort - python3 python/taichi/code_format.py - git checkout -b _enforced_format - git commit -am "enforce code format" || true - # exit with 1 if there were differences: - git diff _fake_squash _enforced_format --exit-code - build_and_test_cpu_required: - # This job will be required to pass before merging to master branch. - name: Required Build and Test (CPU) - needs: check_code_format - strategy: - matrix: - include: - - os: ubuntu-latest - python: 3.6 - 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: | - 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=ON -DTI_BUILD_TESTS:BOOL=ON - - - name: Test - run: | - TAICHI_REPO_DIR=`pwd` - export PATH=$TAICHI_REPO_DIR/taichi-llvm/bin/:$PATH - # Note we only need this since we cannot write into system python package. - export PATH=$PATH:$HOME/.local/bin - hash -r - python examples/algorithm/laplace.py - ti diagnose - # TODO: make cpp tests work in both release & dev mode. - # Currently cpp tests only works in dev mode since it depends on the path set there. - TAICHI_REPO_DIR=$TAICHI_REPO_DIR ./build/taichi_cpp_tests - ti test -vr2 -t2 - build_and_test_cpu: - name: Build and Test (CPU) - needs: build_and_test_cpu_required - strategy: - matrix: - include: - - os: macos-latest - python: 3.7 - with_cc: OFF - with_cpp_tests: ON - - os: ubuntu-latest - python: 3.9 - with_cc: OFF - with_cpp_tests: OFF - - os: ubuntu-latest - python: 3.8 - with_cc: ON - with_cpp_tests: OFF - 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: | - 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 }} -DTI_BUILD_TESTS:BOOL=${{ matrix.with_cpp_tests }} - - # [DEBUG] Copy this step around to enable debugging inside Github Action instances. - #- name: Setup tmate session - # uses: mxschmitt/action-tmate@v3 - # with: - # limit-access-to-actor: true - - - name: Test - run: | - TAICHI_REPO_DIR=`pwd` - export PATH=$TAICHI_REPO_DIR/taichi-llvm/bin/:$PATH - export PATH=$PATH:$HOME/.local/bin - hash -r - python examples/algorithm/laplace.py - ti diagnose - # TODO: make cpp tests work in both release & dev mode. - # Currently cpp tests only works in dev mode since it depends on the path set there. - [ "$RUN_CPP_TESTS" = "ON" ] && TAICHI_REPO_DIR=$TAICHI_REPO_DIR ./build/taichi_cpp_tests - ti test -vr2 -t2 - env: - RUN_CPP_TESTS: ${{ matrix.with_cpp_tests }} - - build_and_test_gpu_linux: - name: Build and Test (GPU) - needs: check_code_format - runs-on: [self-hosted, cuda, cn] - steps: - - uses: actions/checkout@v2 - - - name: Build - run: | - git --version - export PATH=/home/github/taichi-llvm/bin/:$PATH - export CXX=clang++-8 - export PYTHON=/usr/bin/python3 - $PYTHON misc/ci_setup.py ci - env: - CI_SETUP_CMAKE_ARGS: -DTI_WITH_OPENGL:BOOL=ON -DTI_WITH_CC:BOOL=OFF - - - name: Test - run: | - export PYTHON=/usr/bin/python3 - export PATH=/home/github/taichi-llvm/bin/:$PATH - export PATH=$PATH:$HOME/.local/bin - export DISPLAY=:1 - hash -r - glewinfo - $PYTHON examples/algorithm/laplace.py - ti diagnose - ti test -vr2 -t2 - build_and_test_windows: - name: Build and Test (Windows) - needs: check_code_format - runs-on: windows-latest - steps: - - name: Install 7Zip PowerShell - shell: powershell - run: Install-Module 7Zip4PowerShell -Force -Verbose - - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: 3.7 - - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.0.2 - - - name: Build - shell: powershell - run: | - $env:TAICHI_REPO_DIR = "D:\a\taichi\taichi" - $env:PYTHONPATH = "$env:TAICHI_REPO_DIR\python" - cd C:\ - Remove-item alias:curl - curl --retry 10 --retry-delay 5 https://github.com/taichi-dev/taichi_assets/releases/download/llvm10/taichi-llvm-10.0.0-msvc2019.zip -LO - 7z x taichi-llvm-10.0.0-msvc2019.zip -otaichi_llvm - curl --retry 10 --retry-delay 5 https://github.com/taichi-dev/taichi_assets/releases/download/llvm10/clang-10.0.0-win.zip -LO - 7z x clang-10.0.0-win.zip -otaichi_clang - $env:PATH += ";C:\taichi_llvm\bin" - $env:PATH += ";C:\taichi_clang\bin" - $env:PATH += ";$env:TAICHI_REPO_DIR\bin" - clang --version - cd D:\a\taichi\taichi - python -m pip install numpy - python -m pip install pybind11 - python misc/ci_setup.py ci - mkdir build - cd build - cmake .. -G"Visual Studio 16 2019" -A x64 -DPYTHON_EXECUTABLE="$env:PYTHON" -DLLVM_DIR="C:\taichi_llvm\lib\cmake\llvm" - msbuild /p:Configuration=RelWithDebInfo /p:Platform=x64 /m taichi.sln - cd .. - env: - PYTHON: C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe - - - name: Test - shell: powershell - run: | - $env:TAICHI_REPO_DIR = "D:\a\taichi\taichi" - $env:PYTHONPATH = "$env:TAICHI_REPO_DIR\python" - $env:PATH += ";C:\taichi_llvm\bin" - $env:PATH += ";C:\taichi_clang\bin" - $env:PATH += ";$env:TAICHI_REPO_DIR\bin" - python -c "import taichi" - python examples/algorithm/laplace.py - python bin/taichi diagnose - python bin/taichi test -Cvr2 -t2 - env: - PYTHON: C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index 9c78bb7c3..4bd0e5ff3 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -1,7 +1,5 @@ name: Presubmit Checks -on: - pull_request: - types: [opened, synchronize, reopened] +on: push jobs: title_format: