ci: [refactor] Add .github/ci-windows.py prepare_tests step
This commit is contained in:
2 files changed
+28
-10
No files matched your search
+24
-1
@@ -69,10 +69,31 @@ def build():
|
|||||||
run(command + ["-j1", "--verbose"])
|
run(command + ["-j1", "--verbose"])
|
||||||
|
|
||||||
|
|
||||||
|
def prepare_tests(ci_type):
|
||||||
|
if ci_type == "standard":
|
||||||
|
run([sys.executable, "-m", "pip", "install", "pyzmq"])
|
||||||
|
elif ci_type == "fuzz":
|
||||||
|
repo_dir = os.path.join(os.environ["RUNNER_TEMP"], "qa-assets")
|
||||||
|
clone_cmd = [
|
||||||
|
"git",
|
||||||
|
"clone",
|
||||||
|
"--depth=1",
|
||||||
|
"https://github.com/bitcoin-core/qa-assets",
|
||||||
|
repo_dir,
|
||||||
|
]
|
||||||
|
run(clone_cmd)
|
||||||
|
print("Using qa-assets repo from commit ...")
|
||||||
|
run(["git", "-C", repo_dir, "log", "-1"])
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(description="Utility to run Windows CI steps.")
|
parser = argparse.ArgumentParser(description="Utility to run Windows CI steps.")
|
||||||
parser.add_argument("ci_type", choices=GENERATE_OPTIONS, help="CI type to run.")
|
parser.add_argument("ci_type", choices=GENERATE_OPTIONS, help="CI type to run.")
|
||||||
steps = ["generate", "build"]
|
steps = [
|
||||||
|
"generate",
|
||||||
|
"build",
|
||||||
|
"prepare_tests",
|
||||||
|
]
|
||||||
parser.add_argument("step", choices=steps, help="CI step to perform.")
|
parser.add_argument("step", choices=steps, help="CI step to perform.")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
@@ -80,6 +101,8 @@ def main():
|
|||||||
generate(args.ci_type)
|
generate(args.ci_type)
|
||||||
elif args.step == "build":
|
elif args.step == "build":
|
||||||
build()
|
build()
|
||||||
|
elif args.step == "prepare_tests":
|
||||||
|
prepare_tests(args.ci_type)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -310,6 +310,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
ctest --output-on-failure --stop-on-failure -j $NUMBER_OF_PROCESSORS -C Release
|
ctest --output-on-failure --stop-on-failure -j $NUMBER_OF_PROCESSORS -C Release
|
||||||
|
|
||||||
|
- name: Prepare tests
|
||||||
|
run: |
|
||||||
|
py -3 .github/ci-windows.py ${{ matrix.job-type }} prepare_tests
|
||||||
|
|
||||||
- name: Run functional tests
|
- name: Run functional tests
|
||||||
if: matrix.job-type == 'standard'
|
if: matrix.job-type == 'standard'
|
||||||
working-directory: build
|
working-directory: build
|
||||||
@@ -324,17 +328,8 @@ jobs:
|
|||||||
BITCOINCHAINSTATE: '${{ github.workspace }}\build\bin\Release\bitcoin-chainstate.exe'
|
BITCOINCHAINSTATE: '${{ github.workspace }}\build\bin\Release\bitcoin-chainstate.exe'
|
||||||
TEST_RUNNER_EXTRA: ${{ github.event_name != 'pull_request' && '--extended' || '' }}
|
TEST_RUNNER_EXTRA: ${{ github.event_name != 'pull_request' && '--extended' || '' }}
|
||||||
run: |
|
run: |
|
||||||
py -3 -m pip install pyzmq
|
|
||||||
py -3 test/functional/test_runner.py --jobs $NUMBER_OF_PROCESSORS --quiet --tmpdirprefix="${RUNNER_TEMP}" --combinedlogslen=99999999 --timeout-factor=${TEST_RUNNER_TIMEOUT_FACTOR} ${TEST_RUNNER_EXTRA}
|
py -3 test/functional/test_runner.py --jobs $NUMBER_OF_PROCESSORS --quiet --tmpdirprefix="${RUNNER_TEMP}" --combinedlogslen=99999999 --timeout-factor=${TEST_RUNNER_TIMEOUT_FACTOR} ${TEST_RUNNER_EXTRA}
|
||||||
|
|
||||||
- name: Clone corpora
|
|
||||||
if: matrix.job-type == 'fuzz'
|
|
||||||
run: |
|
|
||||||
git clone --depth=1 https://github.com/bitcoin-core/qa-assets "${RUNNER_TEMP}/qa-assets"
|
|
||||||
cd "${RUNNER_TEMP}/qa-assets"
|
|
||||||
echo "Using qa-assets repo from commit ..."
|
|
||||||
git log -1
|
|
||||||
|
|
||||||
- name: Run fuzz tests
|
- name: Run fuzz tests
|
||||||
if: matrix.job-type == 'fuzz'
|
if: matrix.job-type == 'fuzz'
|
||||||
working-directory: build
|
working-directory: build
|
||||||
|
|||||||
Reference in new issue
Block a user