macos.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. import os
  10. from pathlib import Path
  11. from ci.tarball_uploader import TarballUploader
  12. from materialize import spawn
  13. from materialize.xcompile import Arch
  14. from ..deploy.deploy_util import rust_version
  15. from . import deploy_util
  16. def main() -> None:
  17. target = f"{Arch.host()}-apple-darwin"
  18. print("--- Building mz-debug")
  19. spawn.runv(
  20. ["cargo", "build", "--bin", "mz-debug", "--release"],
  21. env=dict(os.environ, RUSTUP_TOOLCHAIN=rust_version()),
  22. )
  23. uploader = TarballUploader(
  24. package_name="mz-debug",
  25. version=deploy_util.MZ_DEBUG_VERSION,
  26. )
  27. uploader.deploy_tarball(target, Path("target") / "release" / "mz-debug")
  28. if __name__ == "__main__":
  29. main()