Skip to content

Commit

Permalink
[CI] Simplified github CI procudure. (taichi-dev#2399)
Browse files Browse the repository at this point in the history
* [Misc] Fixed that mass_spring_3d.py do not exit on import error

* Auto Format

* [ci] Simplified github CI procudure

* fix bug

Co-authored-by: Taichi Gardener <[email protected]>
  • Loading branch information
Leonz5288 and taichi-gardener authored Jun 3, 2021
1 parent 954427e commit a35085f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 226 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/cancel.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: Cancel
on:
workflow_run:
workflows: ["Persubmit Checks"]
workflows: ["Presubmit Checks"]
types:
- requested

#now test
jobs:
cancel:
runs-on: ubuntu-latest
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/gardener.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Persubmit Checks
name: Presubmit Checks
on:
pull_request:
types: [opened, synchronize, reopened]
Expand Down Expand Up @@ -33,7 +33,6 @@ jobs:
# This job will be required to pass before merging to master branch.
name: Required Build and Test (CPU)
needs: check_code_format
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip ci') }}
strategy:
matrix:
include:
Expand Down Expand Up @@ -78,7 +77,6 @@ jobs:
build_and_test_cpu:
name: Build and Test (CPU)
needs: check_code_format
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip ci') && github.event.sender.login != 'taichi-gardener' }}
strategy:
matrix:
include:
Expand Down Expand Up @@ -135,7 +133,6 @@ jobs:
build_and_test_gpu_linux:
name: Build and Test (GPU)
needs: check_code_format
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip ci') && github.event.sender.login != 'taichi-gardener' }}
runs-on: [self-hosted, cuda, cn]
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -164,26 +161,6 @@ jobs:
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}"
title_format:
name: Check PR Title
runs-on: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion examples/mass_spring_3d.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import taichi as ti
import numpy as np

import taichi as ti

try:
import taichi_glsl as tl
import taichi_three as t3
Expand Down
187 changes: 0 additions & 187 deletions misc/ci_check_previous_run.py

This file was deleted.

0 comments on commit a35085f

Please sign in to comment.