From 505550b990a24b0648733ba9d1f6d853dcb9a6f9 Mon Sep 17 00:00:00 2001 From: yanchuandong <90600320+chuandongyan@users.noreply.github.com> Date: Thu, 28 Oct 2021 13:47:19 +0800 Subject: [PATCH 1/6] Update presubmit.yml --- .github/workflows/presubmit.yml | 221 +------------------------------- 1 file changed, 2 insertions(+), 219 deletions(-) diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index de74f1605..30992ce7b 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -4,193 +4,9 @@ on: types: [opened, synchronize, reopened] jobs: - title_format: - name: Check PR Title - if: ${{ github.event.pull_request }} - 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: Setup git & clang-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 install clang-format-10 - - - name: Cache PIP - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ hashFiles('setup.py') }}-${{ hashFiles('requirements_dev.txt') }} - - - name: Install requirements - run: | - python3 -m pip install --user -r requirements_dev.txt - - - name: Check code format - run: | - python3 misc/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 - - - name: Pylint - run: | - # Make sure pylint doesn't regress - pylint python/taichi/ --disable=all --enable=C0121,C0415 - if [ $? -eq 0 ] - then - echo "PASSED: pylint is happy" - exit 0 - else - echo "FAILED: please run the pylint command above and make sure it passes" - exit 1 - fi - - 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 - timeout-minutes: 60 - strategy: - matrix: - include: - - os: ubuntu-latest - python: 3.6 - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - with: - submodules: "recursive" - - - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - - name: Download Pre-Built LLVM 10.0.0 - run: python misc/ci_download.py - env: - CI_PLATFORM: ${{ matrix.os }} - - - name: Build & Install - run: .github/workflows/scripts/unix_build.sh - env: - CI_SETUP_CMAKE_ARGS: -DTI_WITH_OPENGL:BOOL=OFF -DTI_WITH_CC:BOOL=ON -DTI_WITH_VULKAN:BOOL=OFF -DTI_BUILD_TESTS:BOOL=ON - CXX: clang++ - - - name: Test - run: .github/workflows/scripts/unix_test.sh - env: - RUN_CPP_TESTS: ON - - build_and_test_cpu: - name: Build and Test (CPU) - needs: build_and_test_cpu_required - timeout-minutes: 60 - 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 - with: - submodules: "recursive" - - - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - - name: Download Pre-Built LLVM 10.0.0 - run: python misc/ci_download.py - env: - CI_PLATFORM: ${{ matrix.os }} - - - name: Build & Install - run: .github/workflows/scripts/unix_build.sh - env: - CI_SETUP_CMAKE_ARGS: -DTI_WITH_OPENGL:BOOL=OFF -DTI_WITH_CC:BOOL=${{ matrix.with_cc }} -DTI_WITH_VULKAN:BOOL=OFF -DTI_BUILD_TESTS:BOOL=${{ matrix.with_cpp_tests }} - CXX: clang++ - # [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: .github/workflows/scripts/unix_test.sh - 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, vulkan, cn] - timeout-minutes: 60 - steps: - - uses: actions/checkout@v2 - with: - submodules: "recursive" - - - name: Build - run: | - export PATH=$PATH:/usr/local/cuda/bin - .github/workflows/scripts/unix_build.sh - env: - LLVM_LIB_ROOT_DIR: /opt/taichi-llvm-10.0.0 - CI_SETUP_CMAKE_ARGS: -DTI_WITH_OPENGL:BOOL=ON -DTI_WITH_CC:BOOL=OFF -DTI_WITH_VULKAN:BOOL=ON -DTI_BUILD_TESTS:BOOL=ON - BUILD_NUM_THREADS: 8 - LLVM_PATH: /opt/taichi-llvm-10.0.0/bin - LLVM_DIR: /opt/taichi-llvm-10.0.0/lib/cmake/llvm - CXX: clang++-8 - - - name: Test - run: .github/workflows/scripts/unix_test.sh - env: - DISPLAY: :1 - GPU_TEST: ON - RUN_CPP_TESTS: ON - build_and_test_windows: name: Build and Test (Windows) - needs: check_code_format - runs-on: windows-latest + runs-on: buildbot7 timeout-minutes: 90 steps: - name: Install 7Zip PowerShell @@ -253,37 +69,4 @@ jobs: env: PYTHON: C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe - build_and_test_m1: - name: Build and Test (Apple M1) - needs: check_code_format - timeout-minutes: 60 - strategy: - matrix: - include: - - os: macos-latest - python: 3.8 - defaults: - run: - # https://github.com/actions/runner/issues/805#issuecomment-844426478 - shell: "/usr/bin/arch -arch arm64e /bin/bash --noprofile --norc -eo pipefail {0}" - runs-on: [self-hosted, m1] - steps: - - uses: actions/checkout@v2 - with: - submodules: "recursive" - - - name: Build - run: | - rm -rf $HOME/Library/Python/3.8/lib/python/site-packages/taichi - .github/workflows/scripts/unix_build.sh - env: - CI_SETUP_CMAKE_ARGS: -DTI_WITH_OPENGL:BOOL=OFF -DTI_WITH_CUDA:BOOL=OFF -DTI_WITH_CC:BOOL=OFF -DTI_WITH_VULKAN:BOOL=OFF -DTI_BUILD_TESTS:BOOL=ON - CXX: clang++ - - - name: Test - run: | - export PATH=$PATH:$HOME/Library/Python/3.8/bin - python3 examples/algorithm/laplace.py - TI_LIB_DIR=`python3 -c "import taichi;print(taichi.__path__[0])" | tail -1` - TI_LIB_DIR="$TI_LIB_DIR/lib" ./build/taichi_cpp_tests - ti test -vr2 -t4 -x + From 62bff51e29233297d019634b2ae34da471481f9c Mon Sep 17 00:00:00 2001 From: yanchuandong <90600320+chuandongyan@users.noreply.github.com> Date: Thu, 28 Oct 2021 13:52:07 +0800 Subject: [PATCH 2/6] Update presubmit.yml --- .github/workflows/presubmit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index 30992ce7b..9ab56d283 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -6,7 +6,7 @@ on: jobs: build_and_test_windows: name: Build and Test (Windows) - runs-on: buildbot7 + runs-on: windows-server2019 timeout-minutes: 90 steps: - name: Install 7Zip PowerShell From 8d1273c5f4bd0267fd3a798abe294c19f616c381 Mon Sep 17 00:00:00 2001 From: yanchuandong <90600320+chuandongyan@users.noreply.github.com> Date: Thu, 28 Oct 2021 14:18:48 +0800 Subject: [PATCH 3/6] Update presubmit.yml --- .github/workflows/presubmit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index 9ab56d283..16e02a773 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Install 7Zip PowerShell shell: powershell - run: Install-Module 7Zip4PowerShell -Force -Verbose + run: Install-Module -Scope CurrentUser 7Zip4PowerShell -Force -Verbose - uses: actions/checkout@v2 with: From be6ec2358411caa300d56293854e6cb3e4ab66df Mon Sep 17 00:00:00 2001 From: yanchuandong <90600320+chuandongyan@users.noreply.github.com> Date: Thu, 28 Oct 2021 14:19:47 +0800 Subject: [PATCH 4/6] Update presubmit.yml --- .github/workflows/presubmit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index 16e02a773..322dcd234 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Install 7Zip PowerShell shell: powershell - run: Install-Module -Scope CurrentUser 7Zip4PowerShell -Force -Verbose + run: Install-Module -Scope C urrentUser 7Zip4PowerShell -Force -Verbose - uses: actions/checkout@v2 with: From e66b50e96183efea7db40ed32186673957db5e62 Mon Sep 17 00:00:00 2001 From: yanchuandong <90600320+chuandongyan@users.noreply.github.com> Date: Thu, 28 Oct 2021 14:24:25 +0800 Subject: [PATCH 5/6] Update presubmit.yml --- .github/workflows/presubmit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index 322dcd234..16e02a773 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Install 7Zip PowerShell shell: powershell - run: Install-Module -Scope C urrentUser 7Zip4PowerShell -Force -Verbose + run: Install-Module -Scope CurrentUser 7Zip4PowerShell -Force -Verbose - uses: actions/checkout@v2 with: From 4d94132b01b7e73376e16d8234b495d4583d40a9 Mon Sep 17 00:00:00 2001 From: yanchuandong <90600320+chuandongyan@users.noreply.github.com> Date: Thu, 28 Oct 2021 14:35:31 +0800 Subject: [PATCH 6/6] Update presubmit.yml --- .github/workflows/presubmit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index 16e02a773..acd67b05a 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Install 7Zip PowerShell shell: powershell - run: Install-Module -Scope CurrentUser 7Zip4PowerShell -Force -Verbose + run: Install-Module 7Zip4PowerShell -Force -Verbose - uses: actions/checkout@v2 with: