- 
                Notifications
    You must be signed in to change notification settings 
- Fork 291
[CI][Refactor] Refactor non-test CI workflow files #971
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
          
     Merged
      
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            9 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      e57f2c1
              
                chore: rename CI workflow files
              
              
                XuehaiPan f152f62
              
                chore: rename perbench bot file
              
              
                XuehaiPan ce15dac
              
                refactor: rewrite comment passing via step output and post with githu…
              
              
                XuehaiPan f28dd2d
              
                chore: rename pr-reminder bot file
              
              
                XuehaiPan 1396b76
              
                chore: use `pre-commit` instead of `format.sh`
              
              
                XuehaiPan 3c434f7
              
                chore: rename docs workflow file
              
              
                XuehaiPan 1d50ff2
              
                refactor: rewrite docs workflow file
              
              
                XuehaiPan 0eb2ae4
              
                chore: use `git clean -dxf -e <exclude>`
              
              
                XuehaiPan 58a2ce2
              
                fix: fix perfbench condition
              
              
                XuehaiPan File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
          Some comments aren't visible on the classic Files Changed page.
        
There are no files selected for viewing
This file was deleted.
      
      Oops, something went wrong.
      
    
  
            File renamed without changes.
          
    
            File renamed without changes.
          
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| name: Performance Benchmark Bot | ||
|  | ||
| on: | ||
| issue_comment: | ||
| types: | ||
| - created | ||
|  | ||
| permissions: | ||
| contents: read | ||
|  | ||
| concurrency: | ||
| group: "${{ github.workflow }}-${{ github.ref }}" | ||
| cancel-in-progress: true # always cancel in-progress | ||
|  | ||
| jobs: | ||
| perfbench: | ||
| name: Benchmark between PR and main | ||
| if: | | ||
| github.event_name == 'pull_request' && | ||
| (contains(github.event.comment.body, '/performance-report') || contains(github.event.comment.body, '/perf')) | ||
| runs-on: [self-hosted, nvidia] | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| ref: refs/pull/${{ github.event.issue.number }}/merge | ||
| fetch-depth: 0 | ||
| submodules: recursive | ||
|  | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: "3.9" | ||
|  | ||
| - name: Install merged version | ||
| run: | | ||
| python -m venv tll | ||
| source tll/bin/activate | ||
| pip install -r requirements-test.txt | ||
| pip install . | ||
|  | ||
| - name: Install original version | ||
| run: | | ||
| echo "Check files to be deleted!" | ||
| git clean -dxf -e tll/ | ||
| echo "Delete files completed!" | ||
| git checkout main | ||
| python -m venv tl | ||
| source tl/bin/activate | ||
| pip install -r requirements-test.txt | ||
| pip install . | ||
|         
                  XuehaiPan marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
|  | ||
| - name: Run performance test | ||
| id: perfbench | ||
| run: | | ||
| source tl/bin/activate | ||
| python maint/scripts/ci_performance.py | ||
|  | ||
| - name: Post test results as PR comment | ||
| uses: actions/github-script@v8 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| script: | | ||
| github.rest.issues.createComment({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.issue.number, | ||
| body: '📊 **Performance Test Results** (triggered by @' + context.payload.comment.user.login + '):\n\n' + | ||
| 'Run listed here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n\n' + | ||
| "${{ steps.perfbench.outputs.stdout }}" | ||
|         
                  XuehaiPan marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| }) | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| name: PR Reminder Bot | ||
|  | ||
| on: | ||
| pull_request_target: | ||
| types: | ||
| - opened | ||
|  | ||
| jobs: | ||
| remind: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Remind | ||
| uses: actions/github-script@v8 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| script: | | ||
| github.rest.issues.createComment({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.issue.number, | ||
| body: '👋 Hi! Thank you for contributing to the **TileLang** project.\n\n' + | ||
| 'Please remember to run `pre-commit run --all-files` in the root directory of the project ' + | ||
| 'to ensure your changes are properly linted and formatted. ' + | ||
| 'This will help ensure your contribution passes the format check.\n\n' + | ||
| 'We appreciate you taking this step! ' + | ||
| 'Our team will review your contribution, and we look forward to your awesome work! 🚀' | ||
| }) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| name: Documentation | ||
|  | ||
| on: | ||
| pull_request_target: | ||
| types: | ||
| - closed | ||
| workflow_dispatch: | ||
|  | ||
| permissions: | ||
| contents: write | ||
|  | ||
| jobs: | ||
| docs: | ||
| name: Build and Publish Docs | ||
| if: | | ||
| (github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main') || | ||
| github.event_name == 'workflow_dispatch' | ||
| runs-on: [self-hosted, nvidia] | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 0 | ||
| submodules: recursive | ||
|  | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: "3.10" | ||
|  | ||
| - name: Build docs | ||
| run: | | ||
| bash -ex maint/scripts/build_docs.sh | ||
|  | ||
| - name: Push built docs to another repo | ||
| run: | | ||
| # Hide sensitive info in logs | ||
| echo "::add-mask::${{ secrets.TARGET_TOKEN }}" | ||
| echo "::add-mask::${{ secrets.TARGET_REPO }}" | ||
| TARGET_REPO_URL="https://github.com/${{ secrets.TARGET_REPO }}.git" | ||
|  | ||
| git clone "${TARGET_REPO_URL}" -b main target_repo | ||
| cd target_repo | ||
| git config --local user.name "github-actions[bot]" | ||
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||
| find . -mindepth 1 -maxdepth 1 ! -name ".github" ! -name "." ! -name ".git" -exec rm -rf {} + | ||
| cp -r ../docs/_build/html/* ./ | ||
| git add . | ||
|         
                  XuehaiPan marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| if [[ -n "$(git status --porcelain)" ]]; then | ||
| # If there are changes, commit and push | ||
| git commit -m "Update docs" | ||
| git push "https://github-actions[bot]:${{ secrets.TARGET_TOKEN }}@${TARGET_REPO_URL##*://}" main | ||
| else | ||
| echo "No changes detected, skipping commit and push." | ||
| fi | ||
This file was deleted.
      
      Oops, something went wrong.
      
    
  This file was deleted.
      
      Oops, something went wrong.
      
    
  
            File renamed without changes.
          
    
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.