[workflow] added missing file change detection output (#2387)

pull/2395/head
Frank Lee 2023-01-09 09:18:44 +08:00 committed by GitHub
parent 4898ff8af4
commit 2add870138
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 5 deletions

View File

@ -14,18 +14,27 @@ jobs:
contains( github.event.pull_request.labels.*.name, 'Run Build and Test')
outputs:
changedFiles: ${{ steps.find-changed-files.outputs.changedFiles }}
anyChanged: ${{ steps.find-changed-files.outputs.any_changed }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Find the changed files
id: find-changed-files
uses: tj-actions/changed-files@v34
uses: tj-actions/changed-files@v35
with:
since_last_remote_commit: true
files: |
op_builder/**
colossalai/kernel/**
setup.py
- name: List changed files
run: |
for file in ${{ steps.find-changed-files.outputs.all_changed_files }}; do
echo "$file was changed"
done
build:
name: Build and Test Colossal-AI
@ -54,9 +63,10 @@ jobs:
ssh-key: ${{ secrets.SSH_KEY_FOR_CI }}
- name: Restore cache
if: needs.detect.outputs.anyChanged == 'true'
if: needs.detect.outputs.anyChanged != 'true'
run: |
[ ! -z "$(ls -A /github/home/cuda_ext_cache/)" ] && cp -r /github/home/cuda_ext_cache/* /__w/ColossalAI/ColossalAI/
# -p flag is required to preserve the file timestamp to avoid ninja rebuild
[ ! -z "$(ls -A /github/home/cuda_ext_cache/)" ] && cp -p -r /github/home/cuda_ext_cache/* /__w/ColossalAI/ColossalAI/
- name: Install Colossal-AI
run: |
@ -73,4 +83,5 @@ jobs:
- name: Store Cache
run: |
cp -r /__w/ColossalAI/ColossalAI/build /github/home/cuda_ext_cache/
# -p flag is required to preserve the file timestamp to avoid ninja rebuild
cp -p -r /__w/ColossalAI/ColossalAI/build /github/home/cuda_ext_cache/