From 4226bfad678d88e26524e977fbdb8875deee91a6 Mon Sep 17 00:00:00 2001 From: Yuanming Hu Date: Fri, 9 Apr 2021 13:41:47 +0800 Subject: [PATCH 1/7] update buildbots --- .github/workflows/persubmit.yml | 152 +------------------------------- .travis.yml | 69 --------------- appveyor.yml | 67 -------------- 3 files changed, 2 insertions(+), 286 deletions(-) delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/persubmit.yml b/.github/workflows/persubmit.yml index 73ded1780..54be67e2c 100644 --- a/.github/workflows/persubmit.yml +++ b/.github/workflows/persubmit.yml @@ -4,53 +4,8 @@ on: types: [opened, synchronize, reopened] jobs: - build_and_test_cpu_required: - # This job will be required to pass before merging to master branch. - name: Required Build and Test (CPU) - if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip ci') }} - 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: | - 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=ON -DTI_BUILD_TESTS:BOOL=ON - - - 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 - ./build/taichi_cpp_tests - ti test -vr2 -t2 - build_and_test_cpu: - name: Build and Test (CPU) + name: Build and Test (Mac) if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip ci') && github.event.sender.login != 'taichi-gardener' }} strategy: matrix: @@ -59,15 +14,7 @@ jobs: 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 }} + runs-on: [mac-mini-m1] steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 @@ -104,98 +51,3 @@ jobs: ti test -vr2 -t2 env: RUN_CPP_TESTS: ${{ matrix.with_cpp_tests }} - - build_and_test_gpu: - 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 - - - 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=ON -DTI_WITH_CC:BOOL=OFF - - - 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 - export DISPLAY=:1 - glewinfo - $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 - # 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 fetch https://github.com/taichi-dev/taichi.git refs/heads/master - git reset FETCH_HEAD - git add . - git config user.email "taichigardener@gmail.com" - 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 }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3deca5a9c..000000000 --- a/.travis.yml +++ /dev/null @@ -1,69 +0,0 @@ -sudo: required - -language: cpp - -matrix: - include: - - name: "OS X + Python 3.6" - os: osx - osx_image: xcode10.3 - env: - - MATRIX_EVAL="CC=clang && CXX=clang++ && PYTHON_VERSION=3.6.1 && PYTHON=python3" - - name: "OS X + Python 3.7" - if: commit_message =~ /^\[release\]/ - os: osx - osx_image: xcode10.3 - env: - - MATRIX_EVAL="CC=clang && CXX=clang++ && PYTHON_VERSION=3.7.1 && PYTHON=python3" - - name: "OS X + Python 3.8" - if: commit_message =~ /^\[release\]/ - os: osx - osx_image: xcode10.3 - env: - - MATRIX_EVAL="CC=clang && CXX=clang++ && PYTHON_VERSION=3.8.1 && PYTHON=python3" - -skip_commits: - files: - - '*.md' - - '*.rst' - - docs - - benchmarks - - examples - - misc - - '.*' - -cache: - - build -> CMakeLists.txt, cmake/* - -before_install: -- eval "${MATRIX_EVAL}" -- echo $CXX -- echo $PYTHON -- sysctl -n hw.ncpu -- pwd -- cd $TRAVIS_BUILD_DIR -- mkdir taichi-llvm -- cd taichi-llvm -- wget https://github.com/taichi-dev/taichi_assets/releases/download/llvm10/taichi-llvm-10.0.0-macos.zip --retry-on-http-error=403 --waitretry=3 --tries=5 -O llvm.zip -- unzip llvm.zip -- export PATH=$TRAVIS_BUILD_DIR/taichi-llvm/bin/:$PATH -- ls $TRAVIS_BUILD_DIR/taichi-llvm/bin/ -- echo $PATH -- cd .. -- llvm-config --version - -install: -- .travis/install.sh - -script: -- cd $TRAVIS_BUILD_DIR -- export PATH="$HOME/.pyenv/shims:$HOME/.pyenv/bin:$PATH" -- $PYTHON misc/ci_setup.py ci -- export TAICHI_REPO_DIR=$TRAVIS_BUILD_DIR -- export PYTHONPATH=$TAICHI_REPO_DIR/python -- export PATH=$TAICHI_REPO_DIR/bin:$PATH -- ti test -Cvr2 -t2 && cd python && $PYTHON build.py try_upload && bash <(curl -s https://codecov.io/bash) - -env: - global: - secure: ZfG1FCWsSFSkeHtwfdHy2wR+nAq/IIFyHyTsFIVjUQdui5k6P3szXCkVonabtmZVccZF+8BXjedzwUfGw6cDY8DzzbBPC+rx4XxxuCh3ueCNfhyz+BmsnOMk20U5yBpiwHDmGSiO9jt0Tw4gPNhk/GegNT21f8nJyYzOjH4IONAby0AXDf35R7pFE3LlPEC/TsCoWEEY5/U7r8N1UJChoK3m2rGsK3TVKLY1UQYT94Ytg2a3IgjneEybQB73823K9uIS2CXM77rWJWcjhM9lDBqOc+2MoWdhVgpFst90s+8sjpjGMbMBQYz089sP6FrvGm3kYlWQ9LQ/eVqSVIstNTf176mxA1vyqkLDcuYZ/VcR+P0hTLgEo4kURy+ghXOHcDGhZW5mSXsTI5rq2xQYs6zqnc+MCIJQTOqytMPVc04to/Y5q2dLqrByZvkqeGUafa3bS8bgBr7SjAjwW3xjnWFQc2QMWHLKFP/q7eUnr6jeY4R/YpKdjIf2v+Qs54toAOqQl5Enf7+lYE+iPjU9UmHu/LliyEfIKkVWjajpRFBaF7jQMhsGby+6MDxomZdzKlJpwsfisBLh1HOq65N0erLVXMtqsy0eMxX9zBoUqcANnb0kj8MY/GdkUdZnx09yyXiQU8N+7BSETOIRxriVVGRjhcefyyaeyn5yS7oZ/kY= diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index a4914a7e1..000000000 --- a/appveyor.yml +++ /dev/null @@ -1,67 +0,0 @@ -#---------------------------------# -# general configuration # -#---------------------------------# - -# version format -version: 0.0.{build}-{branch} - -#---------------------------------# -# environment configuration # -#---------------------------------# - -image: Visual Studio 2019 -clone_folder: C:\taichi - -#---------------------------------# -# build configuration # -#---------------------------------# - -platform: x64 -configuration: Release - -environment: - matrix: - - PYTHON: C:\Python36-x64\python.exe - - PYTHON: C:\Python37-x64\python.exe - - PYTHON: C:\Python38-x64\python.exe - -skip_commits: - files: - - '*.md' - - '*.rst' - - docs - - benchmarks - - examples - - misc - - '.*' - -cache: - - build -> CMakeLists.txt, cmake/* - -build_script: - - set TAICHI_REPO_DIR=C:\taichi - - "%PYTHON% %TAICHI_REPO_DIR%/misc/appveyor_filter.py || appveyor exit 0" - - cd C:\ - - 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 - - "echo \"%APPVEYOR_REPO_COMMIT_MESSAGE%\" | grep '^\\[format\\]' && curl http://kun.csail.mit.edu:31415/%APPVEYOR_PULL_REQUEST_NUMBER% -LO || true" - - 7z x clang-10.0.0-win.zip -otaichi_clang - - set PATH=C:\taichi_llvm\bin;%PATH%; - - set PATH=C:\taichi_clang\bin;%PATH% - - set PYTHONPATH=%TAICHI_REPO_DIR%/python - - set PATH=%TAICHI_REPO_DIR%\bin;%PATH% - - clang --version - - cd C:\taichi - - "%PYTHON% misc/ci_setup.py ci" - - mkdir build - - cd build - - cmake .. -G"Visual Studio 16 2019" -A x64 -DPYTHON_EXECUTABLE="%PYTHON%" -DLLVM_DIR="C:\taichi_llvm\lib\cmake\llvm" - - msbuild /p:Configuration=RelWithDebInfo /p:Platform=x64 /m taichi.sln - - cd .. - - '%PYTHON% -c "import taichi"' - - "%PYTHON% examples/laplace.py" - - "%PYTHON% bin/taichi diagnose" - - "%PYTHON% bin/taichi test -Cvr2 -t2" - - "cd python && %PYTHON% build.py try_upload" - - "cd %TAICHI_REPO_DIR% && bash <(curl -s https://codecov.io/bash)" From 21f66da0945837cdaba0bec9b52628bee9da1017 Mon Sep 17 00:00:00 2001 From: Yuanming Hu Date: Fri, 9 Apr 2021 14:16:11 +0800 Subject: [PATCH 2/7] . --- .github/workflows/persubmit.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/persubmit.yml b/.github/workflows/persubmit.yml index 54be67e2c..eab5c5aa6 100644 --- a/.github/workflows/persubmit.yml +++ b/.github/workflows/persubmit.yml @@ -5,7 +5,7 @@ on: jobs: build_and_test_cpu: - name: Build and Test (Mac) + name: Build and Test (Apple M1) if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip ci') && github.event.sender.login != 'taichi-gardener' }} strategy: matrix: @@ -14,7 +14,7 @@ jobs: python: 3.7 with_cc: OFF with_cpp_tests: ON - runs-on: [mac-mini-m1] + runs-on: m1 steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 From 435b0693cd027246abca0edcd276084d4d2e9d64 Mon Sep 17 00:00:00 2001 From: Yuanming Hu Date: Fri, 9 Apr 2021 14:32:58 +0800 Subject: [PATCH 3/7] . --- .github/workflows/persubmit.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/persubmit.yml b/.github/workflows/persubmit.yml index eab5c5aa6..db3dbc392 100644 --- a/.github/workflows/persubmit.yml +++ b/.github/workflows/persubmit.yml @@ -21,15 +21,6 @@ jobs: 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` From 9b022455e5d5d93fbe5330b51f5026eb12026b84 Mon Sep 17 00:00:00 2001 From: Yuanming Hu Date: Fri, 9 Apr 2021 14:36:17 +0800 Subject: [PATCH 4/7] . --- .github/workflows/persubmit.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/persubmit.yml b/.github/workflows/persubmit.yml index db3dbc392..d19939ff0 100644 --- a/.github/workflows/persubmit.yml +++ b/.github/workflows/persubmit.yml @@ -11,16 +11,12 @@ jobs: matrix: include: - os: macos-latest - python: 3.7 + python: 3.8 with_cc: OFF with_cpp_tests: ON runs-on: m1 steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - name: Build run: | export TAICHI_REPO_DIR=`pwd` From 82bf4bbb11def0fc9c4c5d2801f06b1a2365c47b Mon Sep 17 00:00:00 2001 From: Yuanming Hu Date: Fri, 9 Apr 2021 14:38:04 +0800 Subject: [PATCH 5/7] Python3 --- .github/workflows/persubmit.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/persubmit.yml b/.github/workflows/persubmit.yml index d19939ff0..6359629c2 100644 --- a/.github/workflows/persubmit.yml +++ b/.github/workflows/persubmit.yml @@ -22,7 +22,7 @@ jobs: export TAICHI_REPO_DIR=`pwd` export PATH=$TAICHI_REPO_DIR/taichi-llvm/bin/:$PATH export CXX=clang++ - python misc/ci_setup.py ci + python3 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 }} @@ -32,7 +32,7 @@ jobs: 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 + python3 examples/laplace.py ti diagnose [ "$RUN_CPP_TESTS" = "ON" ] && ./build/taichi_cpp_tests ti test -vr2 -t2 From 5a5e1c069373f83ddcec5514aedf087cfacb5167 Mon Sep 17 00:00:00 2001 From: Yuanming Hu Date: Fri, 9 Apr 2021 15:05:37 +0800 Subject: [PATCH 6/7] retyrty --- .github/workflows/persubmit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/persubmit.yml b/.github/workflows/persubmit.yml index 6359629c2..29e6c9436 100644 --- a/.github/workflows/persubmit.yml +++ b/.github/workflows/persubmit.yml @@ -3,6 +3,7 @@ on: pull_request: types: [opened, synchronize, reopened] + jobs: build_and_test_cpu: name: Build and Test (Apple M1) From 10d4e642bed25eea8b99f6a35751ad729135b8bc Mon Sep 17 00:00:00 2001 From: Yuanming Hu Date: Fri, 9 Apr 2021 16:30:09 +0800 Subject: [PATCH 7/7] . --- .github/workflows/persubmit.yml | 3 +++ misc/ci_setup.py | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/persubmit.yml b/.github/workflows/persubmit.yml index 29e6c9436..c53647d8c 100644 --- a/.github/workflows/persubmit.yml +++ b/.github/workflows/persubmit.yml @@ -16,6 +16,9 @@ jobs: with_cc: OFF with_cpp_tests: ON runs-on: m1 + defaults: + run: + shell: "/usr/bin/arch -arch arm64e /bin/bash {0}" steps: - uses: actions/checkout@v2 - name: Build diff --git a/misc/ci_setup.py b/misc/ci_setup.py index 510552d9b..03785c789 100644 --- a/misc/ci_setup.py +++ b/misc/ci_setup.py @@ -178,7 +178,6 @@ def run(self): "--user", "colorama", "numpy", - "Pillow", "scipy", "pybind11", "GitPython",