mirror of https://github.com/hpcaitech/ColossalAI
[workflow] added missing file change detection output (#2387)
parent
4898ff8af4
commit
2add870138
|
@ -14,18 +14,27 @@ jobs:
|
||||||
contains( github.event.pull_request.labels.*.name, 'Run Build and Test')
|
contains( github.event.pull_request.labels.*.name, 'Run Build and Test')
|
||||||
outputs:
|
outputs:
|
||||||
changedFiles: ${{ steps.find-changed-files.outputs.changedFiles }}
|
changedFiles: ${{ steps.find-changed-files.outputs.changedFiles }}
|
||||||
|
anyChanged: ${{ steps.find-changed-files.outputs.any_changed }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
- name: Find the changed files
|
- name: Find the changed files
|
||||||
id: find-changed-files
|
id: find-changed-files
|
||||||
uses: tj-actions/changed-files@v34
|
uses: tj-actions/changed-files@v35
|
||||||
with:
|
with:
|
||||||
since_last_remote_commit: true
|
since_last_remote_commit: true
|
||||||
files: |
|
files: |
|
||||||
op_builder/**
|
op_builder/**
|
||||||
colossalai/kernel/**
|
colossalai/kernel/**
|
||||||
setup.py
|
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:
|
build:
|
||||||
name: Build and Test Colossal-AI
|
name: Build and Test Colossal-AI
|
||||||
|
@ -54,9 +63,10 @@ jobs:
|
||||||
ssh-key: ${{ secrets.SSH_KEY_FOR_CI }}
|
ssh-key: ${{ secrets.SSH_KEY_FOR_CI }}
|
||||||
|
|
||||||
- name: Restore cache
|
- name: Restore cache
|
||||||
if: needs.detect.outputs.anyChanged == 'true'
|
if: needs.detect.outputs.anyChanged != 'true'
|
||||||
run: |
|
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
|
- name: Install Colossal-AI
|
||||||
run: |
|
run: |
|
||||||
|
@ -73,4 +83,5 @@ jobs:
|
||||||
|
|
||||||
- name: Store Cache
|
- name: Store Cache
|
||||||
run: |
|
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/
|
||||||
|
|
Loading…
Reference in New Issue