From fd7472e0cd1877b950f037984b590d763e7dc52b Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 8 Mar 2024 07:13:21 -0700 Subject: [PATCH] REVERT ME: move workflows to TMP directory --- .github/{workflows => TMP}/macos-ci-aarch64.yaml | 0 .github/{workflows => TMP}/macos-ci-x86_64.yaml | 0 .../{workflows => TMP}/ubuntu-ci-containers-x86_64.yaml | 0 .github/{workflows => TMP}/ubuntu-ci-x86_64.yaml | 0 .github/{workflows => TMP}/ubuntu-rnd-x86_64.yaml | 0 .github/workflows/util-tests.yaml | 3 ++- util/check_package_config.py | 8 ++++---- util/util_tests.sh | 5 ++++- 8 files changed, 10 insertions(+), 6 deletions(-) rename .github/{workflows => TMP}/macos-ci-aarch64.yaml (100%) rename .github/{workflows => TMP}/macos-ci-x86_64.yaml (100%) rename .github/{workflows => TMP}/ubuntu-ci-containers-x86_64.yaml (100%) rename .github/{workflows => TMP}/ubuntu-ci-x86_64.yaml (100%) rename .github/{workflows => TMP}/ubuntu-rnd-x86_64.yaml (100%) diff --git a/.github/workflows/macos-ci-aarch64.yaml b/.github/TMP/macos-ci-aarch64.yaml similarity index 100% rename from .github/workflows/macos-ci-aarch64.yaml rename to .github/TMP/macos-ci-aarch64.yaml diff --git a/.github/workflows/macos-ci-x86_64.yaml b/.github/TMP/macos-ci-x86_64.yaml similarity index 100% rename from .github/workflows/macos-ci-x86_64.yaml rename to .github/TMP/macos-ci-x86_64.yaml diff --git a/.github/workflows/ubuntu-ci-containers-x86_64.yaml b/.github/TMP/ubuntu-ci-containers-x86_64.yaml similarity index 100% rename from .github/workflows/ubuntu-ci-containers-x86_64.yaml rename to .github/TMP/ubuntu-ci-containers-x86_64.yaml diff --git a/.github/workflows/ubuntu-ci-x86_64.yaml b/.github/TMP/ubuntu-ci-x86_64.yaml similarity index 100% rename from .github/workflows/ubuntu-ci-x86_64.yaml rename to .github/TMP/ubuntu-ci-x86_64.yaml diff --git a/.github/workflows/ubuntu-rnd-x86_64.yaml b/.github/TMP/ubuntu-rnd-x86_64.yaml similarity index 100% rename from .github/workflows/ubuntu-rnd-x86_64.yaml rename to .github/TMP/ubuntu-rnd-x86_64.yaml diff --git a/.github/workflows/util-tests.yaml b/.github/workflows/util-tests.yaml index 41d494fc1..3bddf71eb 100644 --- a/.github/workflows/util-tests.yaml +++ b/.github/workflows/util-tests.yaml @@ -14,10 +14,11 @@ jobs: - name: checkout uses: actions/checkout@v2 with: - submodules: false + submodules: true - name: run-util-tests run: | export SPACK_STACK_DIR=$PWD + source ./setup.sh cd util/ ./util_tests.sh diff --git a/util/check_package_config.py b/util/check_package_config.py index b2d00b4da..b7ff97b1b 100755 --- a/util/check_package_config.py +++ b/util/check_package_config.py @@ -22,17 +22,17 @@ SPACK_ROOT = os.getenv("SPACK_ROOT") assert SPACK_ROOT, "$SPACK_ROOT must be set but is not!" +SPACK_ENV = os.getenv("SPACK_ENV") +assert SPACK_ENV, "$SPACK_ENV must be set but is not!" + print("SPACK_ENV", SPACK_ENV) print("SPACK_ROOT", SPACK_ROOT) print("os.listdir(SPACK_ROOT)", os.listdir(SPACK_ROOT)) -print("os.listdir(os.path.join(SPACK_ROOT, "lib/spack/external/_vendoring"))", os.listdir(os.path.join(SPACK_ROOT, "lib/spack/external/_vendoring"))) +print('os.listdir(os.path.join(SPACK_ROOT, "lib/spack/external/_vendoring"))', os.listdir(os.path.join(SPACK_ROOT, "lib/spack/external/_vendoring"))) sys.path.append(os.path.join(SPACK_ROOT, "lib/spack/external/_vendoring")) from ruamel import yaml -SPACK_ENV = os.getenv("SPACK_ENV") -assert SPACK_ENV, "$SPACK_ENV must be set but is not!" - # Load common/packages.yaml and site/packages.yaml for versions and externals, respectively packages_versions_path = os.path.join(SPACK_ENV, "common", "packages.yaml") with open(packages_versions_path, "r") as f: diff --git a/util/util_tests.sh b/util/util_tests.sh index e4f507052..1ba1fbd1a 100755 --- a/util/util_tests.sh +++ b/util/util_tests.sh @@ -80,7 +80,10 @@ fi ## Check check_package_config.py export SPACK_ENV=${SPACK_STACK_DIR}/util/test_env -export SPACK_ROOT=${SPACK_STACK_DIR}/spack +### NOT NEEDED I THINK export SPACK_ROOT=${SPACK_STACK_DIR}/spack +${SPACK_STACK_DIR}/util/check_package_config.py +${SPACK_STACK_DIR}/util/check_package_config.py | sort +${SPACK_STACK_DIR}/util/check_package_config.py | sort | md5sum output_checksum=$(${SPACK_STACK_DIR}/util/check_package_config.py | sort | md5sum) reference_checksum=$(cat ${SPACK_STACK_DIR}/util/test_env/package_check_baseline.txt | md5sum) if [[ "$output_checksum" != "$reference_checksum" ]]; then