mirror of
https://github.com/csukuangfj/kaldifeat.git
synced 2025-08-17 13:12:16 +00:00
Reduce number of test runs.
This commit is contained in:
parent
9e20cf029f
commit
da7fa223d9
17
.github/workflows/nightly-tests-macos-cpu.yml
vendored
17
.github/workflows/nightly-tests-macos-cpu.yml
vendored
@ -27,7 +27,24 @@ on:
|
||||
- cron: "50 23 * * *"
|
||||
|
||||
jobs:
|
||||
enable_nightly_build:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
enabled: ${{ steps.set-enabled.outputs.enabled }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set enabled
|
||||
id: set-enabled
|
||||
run: |
|
||||
enabled=$(python scripts/github_actions/run-nightly-build.py)
|
||||
echo "enabled: $enabled"
|
||||
echo "::set-output name=enabled::${enabled}"
|
||||
|
||||
generate_build_matrix:
|
||||
needs: enable_nightly_build
|
||||
if: needs.enable_nightly_build.outputs.enabled == 'true'
|
||||
# see https://github.com/pytorch/pytorch/pull/50633
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
|
@ -27,7 +27,24 @@ on:
|
||||
- cron: "50 23 * * *"
|
||||
|
||||
jobs:
|
||||
enable_nightly_build:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
enabled: ${{ steps.set-enabled.outputs.enabled }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set enabled
|
||||
id: set-enabled
|
||||
run: |
|
||||
enabled=$(python scripts/github_actions/run-nightly-build.py)
|
||||
echo "enabled: $enabled"
|
||||
echo "::set-output name=enabled::${enabled}"
|
||||
|
||||
generate_build_matrix:
|
||||
needs: enable_nightly_build
|
||||
if: needs.enable_nightly_build.outputs.enabled == 'true'
|
||||
# see https://github.com/pytorch/pytorch/pull/50633
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
|
@ -27,7 +27,24 @@ on:
|
||||
- cron: "50 23 * * *"
|
||||
|
||||
jobs:
|
||||
enable_nightly_build:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
enabled: ${{ steps.set-enabled.outputs.enabled }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set enabled
|
||||
id: set-enabled
|
||||
run: |
|
||||
enabled=$(python scripts/github_actions/run-nightly-build.py)
|
||||
echo "enabled: $enabled"
|
||||
echo "::set-output name=enabled::${enabled}"
|
||||
|
||||
generate_build_matrix:
|
||||
needs: enable_nightly_build
|
||||
if: needs.enable_nightly_build.outputs.enabled == 'true'
|
||||
# see https://github.com/pytorch/pytorch/pull/50633
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
|
@ -27,7 +27,24 @@ on:
|
||||
- cron: "50 23 * * *"
|
||||
|
||||
jobs:
|
||||
enable_nightly_build:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
enabled: ${{ steps.set-enabled.outputs.enabled }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set enabled
|
||||
id: set-enabled
|
||||
run: |
|
||||
enabled=$(python scripts/github_actions/run-nightly-build.py)
|
||||
echo "enabled: $enabled"
|
||||
echo "::set-output name=enabled::${enabled}"
|
||||
|
||||
generate_build_matrix:
|
||||
needs: enable_nightly_build
|
||||
if: needs.enable_nightly_build.outputs.enabled == 'true'
|
||||
# see https://github.com/pytorch/pytorch/pull/50633
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
|
@ -27,7 +27,24 @@ on:
|
||||
- cron: "50 23 * * *"
|
||||
|
||||
jobs:
|
||||
enable_nightly_build:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
enabled: ${{ steps.set-enabled.outputs.enabled }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set enabled
|
||||
id: set-enabled
|
||||
run: |
|
||||
enabled=$(python scripts/github_actions/run-nightly-build.py)
|
||||
echo "enabled: $enabled"
|
||||
echo "::set-output name=enabled::${enabled}"
|
||||
|
||||
generate_build_matrix:
|
||||
needs: enable_nightly_build
|
||||
if: needs.enable_nightly_build.outputs.enabled == 'true'
|
||||
# see https://github.com/pytorch/pytorch/pull/50633
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
|
@ -27,7 +27,24 @@ on:
|
||||
- cron: "50 23 * * *"
|
||||
|
||||
jobs:
|
||||
enable_nightly_build:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
enabled: ${{ steps.set-enabled.outputs.enabled }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set enabled
|
||||
id: set-enabled
|
||||
run: |
|
||||
enabled=$(python scripts/github_actions/run-nightly-build.py)
|
||||
echo "enabled: $enabled"
|
||||
echo "::set-output name=enabled::${enabled}"
|
||||
|
||||
generate_build_matrix:
|
||||
needs: enable_nightly_build
|
||||
if: needs.enable_nightly_build.outputs.enabled == 'true'
|
||||
# see https://github.com/pytorch/pytorch/pull/50633
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
|
@ -27,7 +27,24 @@ on:
|
||||
- cron: "50 23 * * *"
|
||||
|
||||
jobs:
|
||||
enable_nightly_build:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
enabled: ${{ steps.set-enabled.outputs.enabled }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set enabled
|
||||
id: set-enabled
|
||||
run: |
|
||||
enabled=$(python scripts/github_actions/run-nightly-build.py)
|
||||
echo "enabled: $enabled"
|
||||
echo "::set-output name=enabled::${enabled}"
|
||||
|
||||
generate_build_matrix:
|
||||
needs: enable_nightly_build
|
||||
if: needs.enable_nightly_build.outputs.enabled == 'true'
|
||||
# see https://github.com/pytorch/pytorch/pull/50633
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
|
4
.github/workflows/run-tests-macos-cpu.yml
vendored
4
.github/workflows/run-tests-macos-cpu.yml
vendored
@ -39,8 +39,8 @@ jobs:
|
||||
id: set-matrix
|
||||
run: |
|
||||
# outputting for debugging purposes
|
||||
python scripts/github_actions/generate_build_matrix.py
|
||||
MATRIX=$(python scripts/github_actions/generate_build_matrix.py)
|
||||
python scripts/github_actions/generate_build_matrix.py --test-only-latest-torch
|
||||
MATRIX=$(python scripts/github_actions/generate_build_matrix.py --test-only-latest-torch)
|
||||
echo "::set-output name=matrix::${MATRIX}"
|
||||
|
||||
run_tests_macos_cpu:
|
||||
|
4
.github/workflows/run-tests-ubuntu-cpu.yml
vendored
4
.github/workflows/run-tests-ubuntu-cpu.yml
vendored
@ -39,8 +39,8 @@ jobs:
|
||||
id: set-matrix
|
||||
run: |
|
||||
# outputting for debugging purposes
|
||||
python scripts/github_actions/generate_build_matrix.py
|
||||
MATRIX=$(python scripts/github_actions/generate_build_matrix.py)
|
||||
python scripts/github_actions/generate_build_matrix.py --test-only-latest-torch
|
||||
MATRIX=$(python scripts/github_actions/generate_build_matrix.py --test-only-latest-torch)
|
||||
echo "::set-output name=matrix::${MATRIX}"
|
||||
|
||||
run_tests_ubuntu_cpu:
|
||||
|
4
.github/workflows/run-tests-windows-cpu.yml
vendored
4
.github/workflows/run-tests-windows-cpu.yml
vendored
@ -39,8 +39,8 @@ jobs:
|
||||
id: set-matrix
|
||||
run: |
|
||||
# outputting for debugging purposes
|
||||
python scripts/github_actions/generate_build_matrix.py
|
||||
MATRIX=$(python scripts/github_actions/generate_build_matrix.py)
|
||||
python scripts/github_actions/generate_build_matrix.py --test-only-latest-torch
|
||||
MATRIX=$(python scripts/github_actions/generate_build_matrix.py --test-only-latest-torch)
|
||||
echo "::set-output name=matrix::${MATRIX}"
|
||||
|
||||
run_tests_windows_cpu:
|
||||
|
35
scripts/github_actions/run-nightly-build.py
Executable file
35
scripts/github_actions/run-nightly-build.py
Executable file
@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright 2022 Xiaomi Corp. (authors: Fangjun Kuang)
|
||||
|
||||
import subprocess
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
|
||||
def get_last_commit_date() -> datetime:
|
||||
date = (
|
||||
subprocess.check_output(
|
||||
[
|
||||
"git",
|
||||
"log",
|
||||
"-1",
|
||||
"--format=%ad",
|
||||
"--date=unix",
|
||||
]
|
||||
)
|
||||
.decode("ascii")
|
||||
.strip()
|
||||
)
|
||||
return datetime.utcfromtimestamp(int(date))
|
||||
|
||||
|
||||
def main():
|
||||
last_commit_date_utc = get_last_commit_date()
|
||||
now_utc = datetime.utcnow()
|
||||
if last_commit_date_utc + timedelta(days=1) > now_utc:
|
||||
print("true")
|
||||
else:
|
||||
print("false")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
x
Reference in New Issue
Block a user