From e1000011ae4819152961564ecc6423d0bc1e0150 Mon Sep 17 00:00:00 2001 From: "Gareth J. Greenaway" Date: Mon, 16 Oct 2023 08:14:46 -0700 Subject: [PATCH 01/60] Additional test cases for slsutil. Reworking some of the slsutil to ensure test coverage is easier. --- salt/modules/slsutil.py | 5 +- tests/pytests/unit/modules/test_slsutil.py | 177 ++++++++++++++++++++- 2 files changed, 179 insertions(+), 3 deletions(-) diff --git a/salt/modules/slsutil.py b/salt/modules/slsutil.py index 4345bc02e146..fe7ba15f336c 100644 --- a/salt/modules/slsutil.py +++ b/salt/modules/slsutil.py @@ -163,13 +163,16 @@ def run(): if not path and not string: raise salt.exceptions.SaltInvocationError("Must pass either path or string") + if path and string: + raise salt.exceptions.SaltInvocationError("Must not pass both path and string") + renderers = salt.loader.render(__opts__, __salt__) if path: path_or_string = __salt__["cp.get_url"]( path, saltenv=kwargs.get("saltenv", "base") ) - elif string: + if string: path_or_string = ":string:" kwargs["input_data"] = string diff --git a/tests/pytests/unit/modules/test_slsutil.py b/tests/pytests/unit/modules/test_slsutil.py index 49651d55c27d..46eb221552a0 100644 --- a/tests/pytests/unit/modules/test_slsutil.py +++ b/tests/pytests/unit/modules/test_slsutil.py @@ -1,18 +1,20 @@ import logging +from io import StringIO import pytest import salt.exceptions import salt.modules.slsutil as slsutil -from tests.support.mock import MagicMock +from tests.support.mock import MagicMock, patch log = logging.getLogger(__name__) @pytest.fixture -def configure_loader_modules(master_dirs, master_files): +def configure_loader_modules(master_dirs, master_files, minion_opts): return { slsutil: { + "__opts__": minion_opts, "__salt__": { "cp.list_master": MagicMock(return_value=master_files), "cp.list_master_dirs": MagicMock(return_value=master_dirs), @@ -47,6 +49,21 @@ def test_banner(): check_banner(commentchar="//", borderchar="-") check_banner(title="title here", text="text here") check_banner(commentchar=" *") + check_banner(commentchar=" *", newline=False) + + # Test when width result in a raised exception + with pytest.raises(salt.exceptions.ArgumentValueError): + slsutil.banner(width=4) + + ret = slsutil.banner( + title="title here", text="text here", blockstart="/*", blockend="*/" + ) + lines = ret.splitlines() + # test blockstart + assert lines[0] == "/*" + + # test blockend + assert lines[-1] == "*/" def check_banner( @@ -125,3 +142,159 @@ def test_findup(): with pytest.raises(salt.exceptions.CommandExecutionError): slsutil.findup("red", "default.conf") + + with pytest.raises(salt.exceptions.SaltInvocationError): + with patch.object(slsutil, "path_exists", return_value=False): + slsutil.findup("red", "default.conf") + + with pytest.raises(salt.exceptions.SaltInvocationError): + slsutil.findup("red", {"file": "default.conf"}) + + +def test_update(): + """ + Test update function + """ + + ret = slsutil.update({"foo": "Foo"}, {"bar": "Bar"}) + assert ret == {"foo": "Foo", "bar": "Bar"} + + ret = slsutil.update({"foo": "Foo"}, {"foo": "Bar"}, merge_lists=False) + assert ret == {"foo": "Bar"} + + +def test_merge(): + """ + Test merge function + """ + + ret = slsutil.merge({"foo": "Foo"}, {"bar": "Bar"}, strategy="smart") + assert ret == {"foo": "Foo", "bar": "Bar"} + + ret = slsutil.merge({"foo": "Foo"}, {"foo": "Bar"}, strategy="aggregate") + assert ret == {"foo": "Bar"} + + ret = slsutil.merge({"foo": "Foo"}, {"foo": "Bar"}, strategy="list") + assert ret == {"foo": ["Foo", "Bar"]} + + ret = slsutil.merge({"foo": "Foo"}, {"foo": "Bar"}, strategy="overwrite") + assert ret == {"foo": "Bar"} + + ret = slsutil.merge( + {"foo": {"Foo": "Bar"}}, {"foo": {"Foo": "Baz"}}, strategy="recurse" + ) + assert ret == {"foo": {"Foo": "Baz"}} + + +def test_merge_all(): + """ + Test merge_all function + """ + + ret = slsutil.merge_all([{"foo": "Foo"}, {"bar": "Bar"}], strategy="smart") + assert ret == {"foo": "Foo", "bar": "Bar"} + + ret = slsutil.merge_all([{"foo": "Foo"}, {"foo": "Bar"}], strategy="aggregate") + assert ret == {"foo": "Bar"} + + ret = slsutil.merge_all([{"foo": "Foo"}, {"foo": "Bar"}], strategy="overwrite") + assert ret == {"foo": "Bar"} + + ret = slsutil.merge_all( + [{"foo": {"Foo": "Bar"}}, {"foo": {"Foo": "Baz"}}], strategy="recurse" + ) + assert ret == {"foo": {"Foo": "Baz"}} + + +def test_renderer(): + """ + Test renderer function + """ + with patch.dict( + slsutil.__utils__, {"stringio.is_readable": MagicMock(return_value=False)} + ): + ret = slsutil.renderer(string="Hello, {{ name }}.", name="world") + assert ret == "Hello, world." + + with pytest.raises(salt.exceptions.SaltInvocationError) as exc: + slsutil.renderer() + assert str(exc.value) == "Must pass path or string." + + with pytest.raises(salt.exceptions.SaltInvocationError) as exc: + slsutil.renderer(path="/path/to/file", string="Hello world") + assert str(exc.value) == "Must not pass both path and string." + + with patch.dict( + slsutil.__salt__, {"cp.get_url": MagicMock(return_value="/path/to/file")} + ): + with patch.dict( + slsutil.__utils__, {"stringio.is_readable": MagicMock(return_value=True)} + ): + rendered_file = "Hello, world." + with patch( + "salt.template.compile_template", + MagicMock(return_value=StringIO(rendered_file)), + ): + ret = slsutil.renderer(path="/path/to/file") + assert ret == "Hello, world." + + +def test_serialize(): + """ + Test serialize function + """ + ret = slsutil.serialize("json", obj={"foo": "Foo!"}) + assert ret == '{"foo": "Foo!"}' + + +def test_deserialize(): + """ + Test serialize function + """ + ret = slsutil.deserialize("json", '{"foo": "Foo!"}') + assert ret == {"foo": "Foo!"} + + +def dummy_function(args=None, kwargs=None): + return True + + +def test__set_context(): + """ + Test _set_context + """ + with patch.dict(slsutil.__context__, {}): + + slsutil._set_context( + ["level_one", "level_two", "level_three"], dummy_function, force=True + ) + assert slsutil.__context__ == { + "level_one": {"level_two": {"level_three": True}} + } + + with patch.dict(slsutil.__context__, {}): + + slsutil._set_context( + ["level_one", "level_two", "level_three"], + dummy_function, + fun_kwargs={"key_one": "arg_one"}, + force=True, + ) + assert slsutil.__context__ == { + "level_one": {"level_two": {"level_three": True}} + } + + +def test__get_serializer_fn(): + """ + Test _set_context + """ + # Invalid serializer + with pytest.raises(salt.exceptions.CommandExecutionError) as exc: + slsutil._get_serialize_fn("bad_yaml", "badfunc") + assert str(exc.value) == "Serializer 'bad_yaml' not found." + + # Invalid serializer function + with pytest.raises(salt.exceptions.CommandExecutionError) as exc: + slsutil._get_serialize_fn("yaml", "foobar") + assert str(exc.value) == "Serializer 'yaml' does not implement foobar." From fd4e3a225a444be5e063f3037f15872918140e90 Mon Sep 17 00:00:00 2001 From: Felippe Burk Date: Fri, 15 Dec 2023 11:13:20 -0700 Subject: [PATCH 02/60] update photon paths to use their $releasever string string which includes .0 --- tests/pytests/pkg/download/test_pkg_download.py | 3 +++ tools/pkg/repo/create.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tests/pytests/pkg/download/test_pkg_download.py b/tests/pytests/pkg/download/test_pkg_download.py index 0fa9089e77dd..dce3880ed8ba 100644 --- a/tests/pytests/pkg/download/test_pkg_download.py +++ b/tests/pytests/pkg/download/test_pkg_download.py @@ -256,6 +256,9 @@ def setup_redhat_family( ): arch = os.environ.get("SALT_REPO_ARCH") or "x86_64" + if os_name == "photon": + os_version = f"{os_version}.0" + if repo_subpath == "minor": repo_url_base = ( f"{root_url}/{os_name}/{os_version}/{arch}/{repo_subpath}/{salt_release}" diff --git a/tools/pkg/repo/create.py b/tools/pkg/repo/create.py index d9b8fb0a97d4..3e94575639e2 100644 --- a/tools/pkg/repo/create.py +++ b/tools/pkg/repo/create.py @@ -380,6 +380,9 @@ def rpm( assert incoming is not None assert repo_path is not None assert key_id is not None + + if distro == "photon": + distro_version = f"{distro_version}.0" display_name = f"{distro.capitalize()} {distro_version}" if distro_version not in _rpm_distro_info[distro]: ctx.error(f"Support for {display_name} is missing.") From 99c6260b8f54c1416f9775980f0d459708ae88e5 Mon Sep 17 00:00:00 2001 From: Felippe Burk Date: Fri, 15 Dec 2023 13:14:23 -0700 Subject: [PATCH 03/60] Revert "update photon paths to use their $releasever string string which includes .0" This reverts commit fd4e3a225a444be5e063f3037f15872918140e90. --- tests/pytests/pkg/download/test_pkg_download.py | 3 --- tools/pkg/repo/create.py | 3 --- 2 files changed, 6 deletions(-) diff --git a/tests/pytests/pkg/download/test_pkg_download.py b/tests/pytests/pkg/download/test_pkg_download.py index dce3880ed8ba..0fa9089e77dd 100644 --- a/tests/pytests/pkg/download/test_pkg_download.py +++ b/tests/pytests/pkg/download/test_pkg_download.py @@ -256,9 +256,6 @@ def setup_redhat_family( ): arch = os.environ.get("SALT_REPO_ARCH") or "x86_64" - if os_name == "photon": - os_version = f"{os_version}.0" - if repo_subpath == "minor": repo_url_base = ( f"{root_url}/{os_name}/{os_version}/{arch}/{repo_subpath}/{salt_release}" diff --git a/tools/pkg/repo/create.py b/tools/pkg/repo/create.py index 3e94575639e2..d9b8fb0a97d4 100644 --- a/tools/pkg/repo/create.py +++ b/tools/pkg/repo/create.py @@ -380,9 +380,6 @@ def rpm( assert incoming is not None assert repo_path is not None assert key_id is not None - - if distro == "photon": - distro_version = f"{distro_version}.0" display_name = f"{distro.capitalize()} {distro_version}" if distro_version not in _rpm_distro_info[distro]: ctx.error(f"Support for {display_name} is missing.") From 55042e396dd3a3cb2a91b01cb4d91ad17e3dce9d Mon Sep 17 00:00:00 2001 From: Felippe Burk Date: Fri, 15 Dec 2023 13:17:54 -0700 Subject: [PATCH 04/60] update photon paths to use their $releasever string --- tests/pytests/pkg/download/test_pkg_download.py | 3 +++ tools/pkg/repo/create.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tests/pytests/pkg/download/test_pkg_download.py b/tests/pytests/pkg/download/test_pkg_download.py index 0fa9089e77dd..dce3880ed8ba 100644 --- a/tests/pytests/pkg/download/test_pkg_download.py +++ b/tests/pytests/pkg/download/test_pkg_download.py @@ -256,6 +256,9 @@ def setup_redhat_family( ): arch = os.environ.get("SALT_REPO_ARCH") or "x86_64" + if os_name == "photon": + os_version = f"{os_version}.0" + if repo_subpath == "minor": repo_url_base = ( f"{root_url}/{os_name}/{os_version}/{arch}/{repo_subpath}/{salt_release}" diff --git a/tools/pkg/repo/create.py b/tools/pkg/repo/create.py index d9b8fb0a97d4..3e94575639e2 100644 --- a/tools/pkg/repo/create.py +++ b/tools/pkg/repo/create.py @@ -380,6 +380,9 @@ def rpm( assert incoming is not None assert repo_path is not None assert key_id is not None + + if distro == "photon": + distro_version = f"{distro_version}.0" display_name = f"{distro.capitalize()} {distro_version}" if distro_version not in _rpm_distro_info[distro]: ctx.error(f"Support for {display_name} is missing.") From ffa94783045da7ac04d79d9c9a12cc7e495ac369 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Thu, 14 Dec 2023 23:47:14 -0700 Subject: [PATCH 05/60] Make pillar timeout test less flaky --- tests/pytests/integration/minion/test_return_retries.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/pytests/integration/minion/test_return_retries.py b/tests/pytests/integration/minion/test_return_retries.py index 8a226d26cd46..24be4c396953 100644 --- a/tests/pytests/integration/minion/test_return_retries.py +++ b/tests/pytests/integration/minion/test_return_retries.py @@ -55,7 +55,7 @@ def test_publish_retry(salt_master, salt_minion_retry, salt_cli, salt_run_cli): @pytest.mark.slow_test def test_pillar_timeout(salt_master_factory): cmd = """ - python -c "import time; time.sleep(2.5); print('{\\"foo\\": \\"bar\\"}');\" + python -c "import time; time.sleep(3.0); print('{\\"foo\\": \\"bar\\"}');\" """.strip() master_overrides = { "ext_pillar": [ From 0e282e651eb3a5b46fcae471947bfcd0e3754cbb Mon Sep 17 00:00:00 2001 From: Frode Gundersen Date: Thu, 16 Feb 2023 20:15:07 +0000 Subject: [PATCH 06/60] migrate unit_states_test_grains to pytest --- tests/pytests/unit/states/test_grains.py | 876 ++++++++++++++++++++++ tests/unit/states/test_grains.py | 897 ----------------------- 2 files changed, 876 insertions(+), 897 deletions(-) create mode 100644 tests/pytests/unit/states/test_grains.py delete mode 100644 tests/unit/states/test_grains.py diff --git a/tests/pytests/unit/states/test_grains.py b/tests/pytests/unit/states/test_grains.py new file mode 100644 index 000000000000..43f2afd9df52 --- /dev/null +++ b/tests/pytests/unit/states/test_grains.py @@ -0,0 +1,876 @@ +""" +unit tests for the grains state +""" + + +import contextlib +import os + +import pytest + +import salt.modules.grains as grainsmod +import salt.states.grains as grains +import salt.utils.files +import salt.utils.stringutils +import salt.utils.yaml +from tests.support.mock import MagicMock, patch +from tests.support.paths import SALT_CODE_DIR + + +@pytest.fixture +def configure_loader_modules(): + grains_test_dir = "__salt_test_state_grains" + if not os.path.exists(os.path.join(SALT_CODE_DIR, grains_test_dir)): + os.makedirs(os.path.join(SALT_CODE_DIR, grains_test_dir)) + loader_globals = { + "__opts__": { + "test": False, + "conf_file": os.path.join(SALT_CODE_DIR, grains_test_dir, "minion"), + "cachedir": os.path.join(SALT_CODE_DIR, grains_test_dir), + "local": True, + }, + "__salt__": { + "cmd.run_all": MagicMock( + return_value={"pid": 5, "retcode": 0, "stderr": "", "stdout": ""} + ), + "grains.get": grainsmod.get, + "grains.set": grainsmod.set, + "grains.setval": grainsmod.setval, + "grains.delval": grainsmod.delval, + "grains.append": grainsmod.append, + "grains.remove": grainsmod.remove, + "saltutil.sync_grains": MagicMock(), + }, + } + return {grains: loader_globals, grainsmod: loader_globals} + + +def assertGrainFileContent(grains_string): + if os.path.isdir(grains.__opts__["conf_file"]): + grains_file = os.path.join(grains.__opts__["conf_file"], "grains") + else: + grains_file = os.path.join( + os.path.dirname(grains.__opts__["conf_file"]), "grains" + ) + with salt.utils.files.fopen(grains_file, "r") as grf: + grains_data = salt.utils.stringutils.to_unicode(grf.read()) + assert grains_string == grains_data + + +@contextlib.contextmanager +def setGrains(grains_data): + with patch.dict(grains.__grains__, grains_data): + with patch.dict(grainsmod.__grains__, grains_data): + if os.path.isdir(grains.__opts__["conf_file"]): + grains_file = os.path.join(grains.__opts__["conf_file"], "grains") + else: + grains_file = os.path.join( + os.path.dirname(grains.__opts__["conf_file"]), "grains" + ) + with salt.utils.files.fopen(grains_file, "w+") as grf: + salt.utils.yaml.safe_dump(grains_data, grf, default_flow_style=False) + yield + + +# 'exists' function tests: 2 + + +def test_exists_missing(): + with setGrains({"a": "aval"}): + ret = grains.exists(name="foo") + assert ret["result"] is False + assert ret["comment"] == "Grain does not exist" + assert ret["changes"] == {} + + +def test_exists_found(): + with setGrains({"a": "aval", "foo": "bar"}): + # Grain already set + ret = grains.exists(name="foo") + assert ret["result"] is True + assert ret["comment"] == "Grain exists" + assert ret["changes"] == {} + + # 'make_hashable' function tests: 1 + + +def test_make_hashable(): + with setGrains({"cmplx_lst_grain": [{"a": "aval"}, {"foo": "bar"}]}): + hashable_list = {"cmplx_lst_grain": [{"a": "aval"}, {"foo": "bar"}]} + assert ( + grains.make_hashable(grains.__grains__).issubset( + grains.make_hashable(hashable_list) + ) + is True + ) + + # 'present' function tests: 12 + + +def test_present_add(): + # Set a non existing grain + with setGrains({"a": "aval"}): + ret = grains.present(name="foo", value="bar") + assert ret["result"] is True + assert ret["changes"] == {"foo": "bar"} + assert grains.__grains__ == {"a": "aval", "foo": "bar"} + assertGrainFileContent("a: aval\nfoo: bar\n") + + # Set a non existing nested grain + with setGrains({"a": "aval"}): + ret = grains.present(name="foo:is:nested", value="bar") + assert ret["result"] is True + assert ret["changes"] == {"foo": {"is": {"nested": "bar"}}} + assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": "bar"}}} + assertGrainFileContent("a: aval\nfoo:\n is:\n nested: bar\n") + + # Set a non existing nested dict grain + with setGrains({"a": "aval"}): + ret = grains.present(name="foo:is:nested", value={"bar": "is a dict"}) + assert ret["result"] is True + assert ret["changes"] == {"foo": {"is": {"nested": {"bar": "is a dict"}}}} + assert grains.__grains__ == { + "a": "aval", + "foo": {"is": {"nested": {"bar": "is a dict"}}}, + } + assertGrainFileContent( + "a: aval\n" + + "foo:\n" + + " is:\n" + + " nested:\n" + + " bar: is a dict\n" + ) + + +def test_present_add_key_to_existing(): + with setGrains({"a": "aval", "foo": {"k1": "v1"}}): + # Fails setting a grain to a dict + ret = grains.present(name="foo:k2", value="v2") + assert ret["result"] is True + assert ret["comment"] == "Set grain foo:k2 to v2" + assert ret["changes"] == {"foo": {"k2": "v2", "k1": "v1"}} + assert grains.__grains__ == {"a": "aval", "foo": {"k1": "v1", "k2": "v2"}} + assertGrainFileContent("a: aval\n" + "foo:\n" + " k1: v1\n" + " k2: v2\n") + + +def test_present_already_set(): + with setGrains({"a": "aval", "foo": "bar"}): + # Grain already set + ret = grains.present(name="foo", value="bar") + assert ret["result"] is True + assert ret["comment"] == "Grain is already set" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": "bar"} + + with setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): + # Nested grain already set + ret = grains.present(name="foo:is:nested", value="bar") + assert ret["result"] is True + assert ret["comment"] == "Grain is already set" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": "bar"}}} + + with setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): + # Nested dict grain already set + ret = grains.present(name="foo:is", value={"nested": "bar"}) + assert ret["result"] is True + assert ret["comment"] == "Grain is already set" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": "bar"}}} + + +def test_present_overwrite(): + with setGrains({"a": "aval", "foo": "bar"}): + # Overwrite an existing grain + ret = grains.present(name="foo", value="newbar") + assert ret["result"] is True + assert ret["changes"] == {"foo": "newbar"} + assert grains.__grains__ == {"a": "aval", "foo": "newbar"} + assertGrainFileContent("a: aval\n" + "foo: newbar\n") + + with setGrains({"a": "aval", "foo": "bar"}): + # Clear a grain (set to None) + ret = grains.present(name="foo", value=None) + assert ret["result"] is True + assert ret["changes"] == {"foo": None} + assert grains.__grains__ == {"a": "aval", "foo": None} + assertGrainFileContent("a: aval\n" + "foo: null\n") + + with setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): + # Overwrite an existing nested grain + ret = grains.present(name="foo:is:nested", value="newbar") + assert ret["result"] is True + assert ret["changes"] == {"foo": {"is": {"nested": "newbar"}}} + assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": "newbar"}}} + assertGrainFileContent( + "a: aval\n" + "foo:\n" + " is:\n" + " nested: newbar\n" + ) + + with setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): + # Clear a nested grain (set to None) + ret = grains.present(name="foo:is:nested", value=None) + assert ret["result"] is True + assert ret["changes"] == {"foo": {"is": {"nested": None}}} + assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": None}}} + assertGrainFileContent( + "a: aval\n" + "foo:\n" + " is:\n" + " nested: null\n" + ) + + +def test_present_fail_overwrite(): + with setGrains({"a": "aval", "foo": {"is": {"nested": "val"}}}): + # Overwrite an existing grain + ret = grains.present(name="foo:is", value="newbar") + assert ret["result"] is False + assert ret["changes"] == {} + assert ( + ret["comment"] + == "The key 'foo:is' exists but is a dict or a list. Use 'force=True' to overwrite." + ) + assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": "val"}}} + + with setGrains({"a": "aval", "foo": {"is": {"nested": "val"}}}): + # Clear a grain (set to None) + ret = grains.present(name="foo:is", value=None) + assert ret["result"] is False + assert ret["changes"] == {} + assert ( + ret["comment"] + == "The key 'foo:is' exists but is a dict or a list. Use 'force=True' to overwrite." + ) + assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": "val"}}} + + +def test_present_fails_to_set_dict_or_list(): + with setGrains({"a": "aval", "foo": "bar"}): + # Fails to overwrite a grain to a list + ret = grains.present(name="foo", value=["l1", "l2"]) + assert ret["result"] is False + assert ( + ret["comment"] + == "The key 'foo' exists and the given value is a dict or a list. Use 'force=True' to overwrite." + ) + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": "bar"} + + with setGrains({"a": "aval", "foo": "bar"}): + # Fails setting a grain to a dict + ret = grains.present(name="foo", value={"k1": "v1"}) + assert ret["result"] is False + assert ( + ret["comment"] + == "The key 'foo' exists and the given value is a dict or a list. Use 'force=True' to overwrite." + ) + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": "bar"} + + with setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): + # Fails to overwrite a nested grain to a list + ret = grains.present(name="foo,is,nested", value=["l1", "l2"], delimiter=",") + assert ret["result"] is False + assert ret["changes"] == {} + assert ( + ret["comment"] + == "The key 'foo:is:nested' exists and the given value is a dict or a list. Use 'force=True' to overwrite." + ) + assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": "bar"}}} + + with setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): + # Fails setting a nested grain to a dict + ret = grains.present(name="foo:is:nested", value={"k1": "v1"}) + assert ret["result"] is False + assert ( + ret["comment"] + == "The key 'foo:is:nested' exists and the given value is a dict or a list. Use 'force=True' to overwrite." + ) + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": "bar"}}} + + +def test_present_fail_merge_dict(): + with setGrains({"a": "aval", "foo": {"k1": "v1"}}): + # Fails setting a grain to a dict + ret = grains.present(name="foo", value={"k2": "v2"}) + assert ret["result"] is False + assert ( + ret["comment"] + == "The key 'foo' exists but is a dict or a list. Use 'force=True' to overwrite." + ) + assert grains.__grains__ == {"a": "aval", "foo": {"k1": "v1"}} + assertGrainFileContent("a: aval\n" + "foo:\n" + " k1: v1\n") + + +def test_present_force_to_set_dict_or_list(): + with setGrains({"a": "aval", "foo": "bar"}): + # Force to overwrite a grain to a list + ret = grains.present(name="foo", value=["l1", "l2"], force=True) + assert ret["result"] is True + assert ret["comment"] == "Set grain foo to ['l1', 'l2']" + assert ret["changes"] == {"foo": ["l1", "l2"]} + assert grains.__grains__ == {"a": "aval", "foo": ["l1", "l2"]} + assertGrainFileContent("a: aval\n" + "foo:\n" + "- l1\n" + "- l2\n") + + with setGrains({"a": "aval", "foo": "bar"}): + # Force setting a grain to a dict + ret = grains.present(name="foo", value={"k1": "v1"}, force=True) + assert ret["result"] is True + assert ret["comment"] == "Set grain foo to {'k1': 'v1'}" + assert ret["changes"] == {"foo": {"k1": "v1"}} + assert grains.__grains__ == {"a": "aval", "foo": {"k1": "v1"}} + assertGrainFileContent("a: aval\n" + "foo:\n" + " k1: v1\n") + + with setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): + # Force to overwrite a nested grain to a list + ret = grains.present( + name="foo,is,nested", value=["l1", "l2"], delimiter=",", force=True + ) + assert ret["result"] is True + assert ret["changes"] == {"foo": {"is": {"nested": ["l1", "l2"]}}} + assert ret["comment"] == "Set grain foo:is:nested to ['l1', 'l2']" + assert grains.__grains__ == { + "a": "aval", + "foo": {"is": {"nested": ["l1", "l2"]}}, + } + assertGrainFileContent( + "a: aval\n" + + "foo:\n" + + " is:\n" + + " nested:\n" + + " - l1\n" + + " - l2\n" + ) + + with setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}, "and": "other"}}): + # Force setting a nested grain to a dict + ret = grains.present(name="foo:is:nested", value={"k1": "v1"}, force=True) + assert ret["result"] is True + assert ret["comment"] == "Set grain foo:is:nested to {'k1': 'v1'}" + assert ret["changes"] == { + "foo": {"is": {"nested": {"k1": "v1"}}, "and": "other"} + } + assert grains.__grains__ == { + "a": "aval", + "foo": {"is": {"nested": {"k1": "v1"}}, "and": "other"}, + } + assertGrainFileContent( + "a: aval\n" + + "foo:\n" + + " and: other\n" + + " is:\n" + + " nested:\n" + + " k1: v1\n" + ) + + +def test_present_fails_to_convert_value_to_key(): + with setGrains({"a": "aval", "foo": "bar"}): + # Fails converting a value to a nested grain key + ret = grains.present(name="foo:is:nested", value={"k1": "v1"}) + assert ret["result"] is False + assert ( + ret["comment"] + == "The key 'foo' value is 'bar', which is different from the provided key 'is'. Use 'force=True' to overwrite." + ) + assert ret["changes"] == {} + + +def test_present_overwrite_test(): + with patch.dict(grains.__opts__, {"test": True}): + with setGrains({"a": "aval", "foo": "bar"}): + # Overwrite an existing grain + ret = grains.present(name="foo", value="newbar") + assert ret["result"] is None + assert ret["changes"] == {"changed": {"foo": "newbar"}} + assert grains.__grains__ == {"a": "aval", "foo": "bar"} + assertGrainFileContent("a: aval\n" + "foo: bar\n") + + +def test_present_convert_value_to_key(): + with setGrains({"a": "aval", "foo": "is"}): + # Converts a value to a nested grain key + ret = grains.present(name="foo:is:nested", value={"k1": "v1"}) + assert ret["result"] is True + assert ret["comment"] == "Set grain foo:is:nested to {'k1': 'v1'}" + assert ret["changes"] == {"foo": {"is": {"nested": {"k1": "v1"}}}} + assert grains.__grains__ == { + "a": "aval", + "foo": {"is": {"nested": {"k1": "v1"}}}, + } + assertGrainFileContent( + "a: aval\n" + "foo:\n" + " is:\n" + " nested:\n" + " k1: v1\n" + ) + + with setGrains({"a": "aval", "foo": ["one", "is", "correct"]}): + # Converts a list element to a nested grain key + ret = grains.present(name="foo:is:nested", value={"k1": "v1"}) + assert ret["result"] is True + assert ret["comment"] == "Set grain foo:is:nested to {'k1': 'v1'}" + assert ret["changes"] == { + "foo": ["one", {"is": {"nested": {"k1": "v1"}}}, "correct"] + } + assert grains.__grains__ == { + "a": "aval", + "foo": ["one", {"is": {"nested": {"k1": "v1"}}}, "correct"], + } + assertGrainFileContent( + "a: aval\n" + + "foo:\n" + + "- one\n" + + "- is:\n" + + " nested:\n" + + " k1: v1\n" + + "- correct\n" + ) + + +def test_present_unknown_failure(): + with patch("salt.modules.grains.setval") as mocked_setval: + mocked_setval.return_value = "Failed to set grain foo" + with setGrains({"a": "aval", "foo": "bar"}): + # Unknown reason failure + ret = grains.present(name="foo", value="baz") + assert ret["result"] is False + assert ret["comment"] == "Failed to set grain foo" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": "bar"} + assertGrainFileContent("a: aval\n" + "foo: bar\n") + + +# 'absent' function tests: 6 + + +def test_absent_already(): + # Unset a non existent grain + with setGrains({"a": "aval"}): + ret = grains.absent(name="foo") + assert ret["result"] is True + assert ret["comment"] == "Grain foo does not exist" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval"} + assertGrainFileContent("a: aval\n") + + # Unset a non existent nested grain + with setGrains({"a": "aval"}): + ret = grains.absent(name="foo:is:nested") + assert ret["result"] is True + assert ret["comment"] == "Grain foo:is:nested does not exist" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval"} + assertGrainFileContent("a: aval\n") + + +def test_absent_unset(): + # Unset a grain + with setGrains({"a": "aval", "foo": "bar"}): + ret = grains.absent(name="foo") + assert ret["result"] is True + assert ret["comment"] == "Value for grain foo was set to None" + assert ret["changes"] == {"grain": "foo", "value": None} + assert grains.__grains__ == {"a": "aval", "foo": None} + assertGrainFileContent("a: aval\n" + "foo: null\n") + + # Unset grain when its value is False + with setGrains({"a": "aval", "foo": False}): + ret = grains.absent(name="foo") + assert ret["result"] is True + assert ret["comment"] == "Value for grain foo was set to None" + assert ret["changes"] == {"grain": "foo", "value": None} + assert grains.__grains__ == {"a": "aval", "foo": None} + assertGrainFileContent("a: aval\n" + "foo: null\n") + + # Unset a nested grain + with setGrains( + {"a": "aval", "foo": ["order", {"is": {"nested": "bar"}}, "correct"]} + ): + ret = grains.absent(name="foo,is,nested", delimiter=",") + assert ret["result"] is True + assert ret["comment"] == "Value for grain foo:is:nested was set to None" + assert ret["changes"] == {"grain": "foo:is:nested", "value": None} + assert grains.__grains__ == { + "a": "aval", + "foo": ["order", {"is": {"nested": None}}, "correct"], + } + assertGrainFileContent( + "a: aval\n" + + "foo:\n" + + "- order\n" + + "- is:\n" + + " nested: null\n" + + "- correct\n" + ) + + # Unset a nested value don't change anything + with setGrains({"a": "aval", "foo": ["order", {"is": "nested"}, "correct"]}): + ret = grains.absent(name="foo:is:nested") + assert ret["result"] is True + assert ret["comment"] == "Grain foo:is:nested does not exist" + assert ret["changes"] == {} + assert grains.__grains__ == { + "a": "aval", + "foo": ["order", {"is": "nested"}, "correct"], + } + assertGrainFileContent( + "a: aval\n" + "foo:\n" + "- order\n" + "- is: nested\n" + "- correct\n" + ) + + +def test_absent_unset_test(): + with patch.dict(grains.__opts__, {"test": True}): + with setGrains({"a": "aval", "foo": "bar"}): + # Overwrite an existing grain + ret = grains.absent(name="foo") + assert ret["result"] is None + assert ret["changes"] == {"grain": "foo", "value": None} + assert grains.__grains__ == {"a": "aval", "foo": "bar"} + assertGrainFileContent("a: aval\n" + "foo: bar\n") + + +def test_absent_fails_nested_complex_grain(): + # Unset a nested complex grain + with setGrains( + {"a": "aval", "foo": ["order", {"is": {"nested": "bar"}}, "correct"]} + ): + ret = grains.absent(name="foo:is") + assert ret["result"] is False + assert ( + ret["comment"] + == "The key 'foo:is' exists but is a dict or a list. Use 'force=True' to overwrite." + ) + assert ret["changes"] == {} + assert grains.__grains__ == { + "a": "aval", + "foo": ["order", {"is": {"nested": "bar"}}, "correct"], + } + assertGrainFileContent( + "a: aval\n" + + "foo:\n" + + "- order\n" + + "- is:\n" + + " nested: bar\n" + + "- correct\n" + ) + + +def test_absent_force_nested_complex_grain(): + # Unset a nested complex grain + with setGrains( + {"a": "aval", "foo": ["order", {"is": {"nested": "bar"}}, "correct"]} + ): + ret = grains.absent(name="foo:is", force=True) + assert ret["result"] is True + assert ret["comment"] == "Value for grain foo:is was set to None" + assert ret["changes"] == {"grain": "foo:is", "value": None} + assert grains.__grains__ == { + "a": "aval", + "foo": ["order", {"is": None}, "correct"], + } + assertGrainFileContent( + "a: aval\n" + "foo:\n" + "- order\n" + "- is: null\n" + "- correct\n" + ) + + +def test_absent_delete(): + # Delete a grain + with setGrains({"a": "aval", "foo": "bar"}): + ret = grains.absent(name="foo", destructive=True) + assert ret["result"] is True + assert ret["comment"] == "Grain foo was deleted" + assert ret["changes"] == {"deleted": "foo"} + assert grains.__grains__ == {"a": "aval"} + assertGrainFileContent("a: aval\n") + + # Delete a previously unset grain + with setGrains({"a": "aval", "foo": None}): + ret = grains.absent(name="foo", destructive=True) + assert ret["result"] is True + assert ret["comment"] == "Grain foo was deleted" + assert ret["changes"] == {"deleted": "foo"} + assert grains.__grains__ == {"a": "aval"} + assertGrainFileContent("a: aval\n") + + # Delete a nested grain + with setGrains( + { + "a": "aval", + "foo": [ + "order", + {"is": {"nested": "bar", "other": "value"}}, + "correct", + ], + } + ): + ret = grains.absent(name="foo:is:nested", destructive=True) + assert ret["result"] is True + assert ret["comment"] == "Grain foo:is:nested was deleted" + assert ret["changes"] == {"deleted": "foo:is:nested"} + assert grains.__grains__ == { + "a": "aval", + "foo": ["order", {"is": {"other": "value"}}, "correct"], + } + assertGrainFileContent( + "a: aval\n" + + "foo:\n" + + "- order\n" + + "- is:\n" + + " other: value\n" + + "- correct\n" + ) + + +# 'append' function tests: 6 + + +def test_append(): + # Append to an existing list + with setGrains({"a": "aval", "foo": ["bar"]}): + ret = grains.append(name="foo", value="baz") + assert ret["result"] is True + assert ret["comment"] == "Value baz was added to grain foo" + assert ret["changes"] == {"added": "baz"} + assert grains.__grains__ == {"a": "aval", "foo": ["bar", "baz"]} + assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n" + "- baz\n") + + +def test_append_nested(): + # Append to an existing nested list + with setGrains({"a": "aval", "foo": {"list": ["bar"]}}): + ret = grains.append(name="foo,list", value="baz", delimiter=",") + assert ret["result"] is True + assert ret["comment"] == "Value baz was added to grain foo:list" + assert ret["changes"] == {"added": "baz"} + assert grains.__grains__ == {"a": "aval", "foo": {"list": ["bar", "baz"]}} + assertGrainFileContent( + "a: aval\n" + "foo:\n" + " list:\n" + " - bar\n" + " - baz\n" + ) + + +def test_append_already(): + # Append to an existing list + with setGrains({"a": "aval", "foo": ["bar"]}): + ret = grains.append(name="foo", value="bar") + assert ret["result"] is True + assert ret["comment"] == "Value bar is already in the list " + "for grain foo" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": ["bar"]} + assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n") + + +def test_append_fails_not_a_list(): + # Fail to append to an existing grain, not a list + with setGrains({"a": "aval", "foo": {"bar": "val"}}): + ret = grains.append(name="foo", value="baz") + assert ret["result"] is False + assert ret["comment"] == "Grain foo is not a valid list" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": {"bar": "val"}} + + +def test_append_convert_to_list(): + # Append to an existing grain, converting to a list + with setGrains({"a": "aval", "foo": {"bar": "val"}}): + assertGrainFileContent("a: aval\n" + "foo:\n" + " bar: val\n") + ret = grains.append(name="foo", value="baz", convert=True) + assert ret["result"] is True + assert ret["comment"] == "Value baz was added to grain foo" + assert ret["changes"] == {"added": "baz"} + assert grains.__grains__ == {"a": "aval", "foo": [{"bar": "val"}, "baz"]} + assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar: val\n" + "- baz\n") + + # Append to an existing grain, converting to a list a multi-value dict + with setGrains({"a": "aval", "foo": {"bar": "val", "other": "value"}}): + assertGrainFileContent( + "a: aval\n" + "foo:\n" + " bar: val\n" + " other: value\n" + ) + ret = grains.append(name="foo", value="baz", convert=True) + assert ret["result"] is True + assert ret["comment"] == "Value baz was added to grain foo" + assert ret["changes"] == {"added": "baz"} + assert grains.__grains__ == { + "a": "aval", + "foo": [{"bar": "val", "other": "value"}, "baz"], + } + assertGrainFileContent( + "a: aval\n" + "foo:\n" + "- bar: val\n" + " other: value\n" + "- baz\n" + ) + + +def test_append_fails_inexistent(): + # Append to a non existing grain + with setGrains({"a": "aval"}): + ret = grains.append(name="foo", value="bar") + assert ret["result"] is False + assert ret["comment"] == "Grain foo does not exist" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval"} + + +def test_append_convert_to_list_empty(): + # Append to an existing list + with setGrains({"foo": None}): + ret = grains.append(name="foo", value="baz", convert=True) + assert ret["result"] is True + assert ret["comment"] == "Value baz was added to grain foo" + assert ret["changes"] == {"added": "baz"} + assert grains.__grains__ == {"foo": ["baz"]} + assertGrainFileContent("foo:\n" + "- baz\n") + + +# 'list_present' function tests: 7 + + +def test_list_present(): + with setGrains({"a": "aval", "foo": ["bar"]}): + ret = grains.list_present(name="foo", value="baz") + assert ret["result"] is True + assert ret["comment"] == "Append value baz to grain foo" + assert ret["changes"] == {"new": {"foo": ["bar", "baz"]}} + assert grains.__grains__ == {"a": "aval", "foo": ["bar", "baz"]} + assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n" + "- baz\n") + + +def test_list_present_nested(): + with setGrains({"a": "aval", "foo": {"is": {"nested": ["bar"]}}}): + ret = grains.list_present(name="foo,is,nested", value="baz", delimiter=",") + assert ret["result"] is True + assert ret["comment"] == "Append value baz to grain foo:is:nested" + assert ret["changes"] == {"new": {"foo": {"is": {"nested": ["bar", "baz"]}}}} + assert grains.__grains__ == { + "a": "aval", + "foo": {"is": {"nested": ["bar", "baz"]}}, + } + assertGrainFileContent( + "a: aval\n" + + "foo:\n" + + " is:\n" + + " nested:\n" + + " - bar\n" + + " - baz\n" + ) + + +def test_list_present_inexistent(): + with setGrains({"a": "aval"}): + ret = grains.list_present(name="foo", value="baz") + assert ret["result"] is True + assert ret["comment"] == "Append value baz to grain foo" + assert ret["changes"] == {"new": {"foo": ["baz"]}} + assert grains.__grains__ == {"a": "aval", "foo": ["baz"]} + assertGrainFileContent("a: aval\n" + "foo:\n" + "- baz\n") + + +def test_list_present_inexistent_nested(): + with setGrains({"a": "aval"}): + ret = grains.list_present(name="foo:is:nested", value="baz") + assert ret["result"] is True + assert ret["comment"] == "Append value baz to grain foo:is:nested" + assert ret["changes"] == {"new": {"foo": {"is": {"nested": ["baz"]}}}} + assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": ["baz"]}}} + assertGrainFileContent( + "a: aval\n" + "foo:\n" + " is:\n" + " nested:\n" + " - baz\n" + ) + + +def test_list_present_not_a_list(): + with setGrains({"a": "aval", "foo": "bar"}): + ret = grains.list_present(name="foo", value="baz") + assert ret["result"] is False + assert ret["comment"] == "Grain foo is not a valid list" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": "bar"} + assertGrainFileContent("a: aval\n" + "foo: bar\n") + + +def test_list_present_nested_already(): + with setGrains({"a": "aval", "b": {"foo": ["bar"]}}): + ret = grains.list_present(name="b:foo", value="bar") + assert ret["result"] is True + assert ret["comment"] == "Value bar is already in grain b:foo" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "b": {"foo": ["bar"]}} + assertGrainFileContent("a: aval\n" + "b:\n" + " foo:\n" + " - bar\n") + + +def test_list_present_already(): + with setGrains({"a": "aval", "foo": ["bar"]}): + ret = grains.list_present(name="foo", value="bar") + assert ret["result"] is True + assert ret["comment"] == "Value bar is already in grain foo" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": ["bar"]} + assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n") + + +def test_list_present_unknown_failure(): + with setGrains({"a": "aval", "foo": ["bar"]}): + # Unknown reason failure + + with patch.dict(grainsmod.__salt__, {"grains.append": MagicMock()}): + ret = grains.list_present(name="foo", value="baz") + assert ret["result"] is False + assert ret["comment"] == "Failed append value baz to grain foo" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": ["bar"]} + assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n") + + +# 'list_absent' function tests: 6 + + +def test_list_absent(): + with setGrains({"a": "aval", "foo": ["bar"]}): + ret = grains.list_absent(name="foo", value="bar") + assert ret["result"] is True + assert ret["comment"] == "Value bar was deleted from grain foo" + assert ret["changes"] == {"deleted": ["bar"]} + assert grains.__grains__ == {"a": "aval", "foo": []} + assertGrainFileContent("a: aval\n" + "foo: []\n") + + +def test_list_absent_nested(): + with setGrains({"a": "aval", "foo": {"list": ["bar"]}}): + ret = grains.list_absent(name="foo:list", value="bar") + assert ret["result"] is True + assert ret["comment"] == "Value bar was deleted from grain foo:list" + assert ret["changes"] == {"deleted": ["bar"]} + assert grains.__grains__ == {"a": "aval", "foo": {"list": []}} + assertGrainFileContent("a: aval\n" + "foo:\n" + " list: []\n") + + +def test_list_absent_inexistent(): + with setGrains({"a": "aval"}): + ret = grains.list_absent(name="foo", value="baz") + assert ret["result"] is True + assert ret["comment"] == "Grain foo does not exist" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval"} + assertGrainFileContent("a: aval\n") + + +def test_list_absent_inexistent_nested(): + with setGrains({"a": "aval"}): + ret = grains.list_absent(name="foo:list", value="baz") + assert ret["result"] is True + assert ret["comment"] == "Grain foo:list does not exist" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval"} + assertGrainFileContent("a: aval\n") + + +def test_list_absent_not_a_list(): + with setGrains({"a": "aval", "foo": "bar"}): + ret = grains.list_absent(name="foo", value="bar") + assert ret["result"] is False + assert ret["comment"] == "Grain foo is not a valid list" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": "bar"} + assertGrainFileContent("a: aval\n" + "foo: bar\n") + + +def test_list_absent_already(): + with setGrains({"a": "aval", "foo": ["bar"]}): + ret = grains.list_absent(name="foo", value="baz") + assert ret["result"] is True + assert ret["comment"] == "Value baz is absent from grain foo" + assert ret["changes"] == {} + assert grains.__grains__ == {"a": "aval", "foo": ["bar"]} + assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n") diff --git a/tests/unit/states/test_grains.py b/tests/unit/states/test_grains.py deleted file mode 100644 index 759ed27d545b..000000000000 --- a/tests/unit/states/test_grains.py +++ /dev/null @@ -1,897 +0,0 @@ -""" -unit tests for the grains state -""" - - -import contextlib -import os - -import salt.modules.grains as grainsmod -import salt.states.grains as grains -import salt.utils.files -import salt.utils.stringutils -import salt.utils.yaml -from tests.support.mixins import LoaderModuleMockMixin -from tests.support.mock import MagicMock, patch -from tests.support.runtests import RUNTIME_VARS -from tests.support.unit import TestCase - - -class GrainsTestCase(TestCase, LoaderModuleMockMixin): - def setup_loader_modules(self): - grains_test_dir = "__salt_test_state_grains" - if not os.path.exists(os.path.join(RUNTIME_VARS.TMP, grains_test_dir)): - os.makedirs(os.path.join(RUNTIME_VARS.TMP, grains_test_dir)) - loader_globals = { - "__opts__": { - "test": False, - "conf_file": os.path.join(RUNTIME_VARS.TMP, grains_test_dir, "minion"), - "cachedir": os.path.join(RUNTIME_VARS.TMP, grains_test_dir), - "local": True, - }, - "__salt__": { - "cmd.run_all": MagicMock( - return_value={"pid": 5, "retcode": 0, "stderr": "", "stdout": ""} - ), - "grains.get": grainsmod.get, - "grains.set": grainsmod.set, - "grains.setval": grainsmod.setval, - "grains.delval": grainsmod.delval, - "grains.append": grainsmod.append, - "grains.remove": grainsmod.remove, - "saltutil.sync_grains": MagicMock(), - }, - } - return {grains: loader_globals, grainsmod: loader_globals} - - def assertGrainFileContent(self, grains_string): - if os.path.isdir(grains.__opts__["conf_file"]): - grains_file = os.path.join(grains.__opts__["conf_file"], "grains") - else: - grains_file = os.path.join( - os.path.dirname(grains.__opts__["conf_file"]), "grains" - ) - with salt.utils.files.fopen(grains_file, "r") as grf: - grains_data = salt.utils.stringutils.to_unicode(grf.read()) - self.assertMultiLineEqual(grains_string, grains_data) - - @contextlib.contextmanager - def setGrains(self, grains_data): - with patch.dict(grains.__grains__, grains_data): - with patch.dict(grainsmod.__grains__, grains_data): - if os.path.isdir(grains.__opts__["conf_file"]): - grains_file = os.path.join(grains.__opts__["conf_file"], "grains") - else: - grains_file = os.path.join( - os.path.dirname(grains.__opts__["conf_file"]), "grains" - ) - with salt.utils.files.fopen(grains_file, "w+") as grf: - salt.utils.yaml.safe_dump( - grains_data, grf, default_flow_style=False - ) - yield - - # 'exists' function tests: 2 - - def test_exists_missing(self): - with self.setGrains({"a": "aval"}): - ret = grains.exists(name="foo") - self.assertEqual(ret["result"], False) - self.assertEqual(ret["comment"], "Grain does not exist") - self.assertEqual(ret["changes"], {}) - - def test_exists_found(self): - with self.setGrains({"a": "aval", "foo": "bar"}): - # Grain already set - ret = grains.exists(name="foo") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain exists") - self.assertEqual(ret["changes"], {}) - - # 'make_hashable' function tests: 1 - - def test_make_hashable(self): - with self.setGrains({"cmplx_lst_grain": [{"a": "aval"}, {"foo": "bar"}]}): - hashable_list = {"cmplx_lst_grain": [{"a": "aval"}, {"foo": "bar"}]} - self.assertEqual( - grains.make_hashable(grains.__grains__).issubset( - grains.make_hashable(hashable_list) - ), - True, - ) - - # 'present' function tests: 12 - - def test_present_add(self): - # Set a non existing grain - with self.setGrains({"a": "aval"}): - ret = grains.present(name="foo", value="bar") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["changes"], {"foo": "bar"}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": "bar"}) - self.assertGrainFileContent("a: aval\nfoo: bar\n") - - # Set a non existing nested grain - with self.setGrains({"a": "aval"}): - ret = grains.present(name="foo:is:nested", value="bar") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["changes"], {"foo": {"is": {"nested": "bar"}}}) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"is": {"nested": "bar"}}} - ) - self.assertGrainFileContent("a: aval\nfoo:\n is:\n nested: bar\n") - - # Set a non existing nested dict grain - with self.setGrains({"a": "aval"}): - ret = grains.present(name="foo:is:nested", value={"bar": "is a dict"}) - self.assertEqual(ret["result"], True) - self.assertEqual( - ret["changes"], {"foo": {"is": {"nested": {"bar": "is a dict"}}}} - ) - self.assertEqual( - grains.__grains__, - {"a": "aval", "foo": {"is": {"nested": {"bar": "is a dict"}}}}, - ) - self.assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + " is:\n" - + " nested:\n" - + " bar: is a dict\n" - ) - - def test_present_add_key_to_existing(self): - with self.setGrains({"a": "aval", "foo": {"k1": "v1"}}): - # Fails setting a grain to a dict - ret = grains.present(name="foo:k2", value="v2") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Set grain foo:k2 to v2") - self.assertEqual(ret["changes"], {"foo": {"k2": "v2", "k1": "v1"}}) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"k1": "v1", "k2": "v2"}} - ) - self.assertGrainFileContent( - "a: aval\n" + "foo:\n" + " k1: v1\n" + " k2: v2\n" - ) - - def test_present_already_set(self): - with self.setGrains({"a": "aval", "foo": "bar"}): - # Grain already set - ret = grains.present(name="foo", value="bar") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain is already set") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": "bar"}) - - with self.setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): - # Nested grain already set - ret = grains.present(name="foo:is:nested", value="bar") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain is already set") - self.assertEqual(ret["changes"], {}) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"is": {"nested": "bar"}}} - ) - - with self.setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): - # Nested dict grain already set - ret = grains.present(name="foo:is", value={"nested": "bar"}) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain is already set") - self.assertEqual(ret["changes"], {}) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"is": {"nested": "bar"}}} - ) - - def test_present_overwrite(self): - with self.setGrains({"a": "aval", "foo": "bar"}): - # Overwrite an existing grain - ret = grains.present(name="foo", value="newbar") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["changes"], {"foo": "newbar"}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": "newbar"}) - self.assertGrainFileContent("a: aval\n" + "foo: newbar\n") - - with self.setGrains({"a": "aval", "foo": "bar"}): - # Clear a grain (set to None) - ret = grains.present(name="foo", value=None) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["changes"], {"foo": None}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": None}) - self.assertGrainFileContent("a: aval\n" + "foo: null\n") - - with self.setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): - # Overwrite an existing nested grain - ret = grains.present(name="foo:is:nested", value="newbar") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["changes"], {"foo": {"is": {"nested": "newbar"}}}) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"is": {"nested": "newbar"}}} - ) - self.assertGrainFileContent( - "a: aval\n" + "foo:\n" + " is:\n" + " nested: newbar\n" - ) - - with self.setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): - # Clear a nested grain (set to None) - ret = grains.present(name="foo:is:nested", value=None) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["changes"], {"foo": {"is": {"nested": None}}}) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"is": {"nested": None}}} - ) - self.assertGrainFileContent( - "a: aval\n" + "foo:\n" + " is:\n" + " nested: null\n" - ) - - def test_present_fail_overwrite(self): - with self.setGrains({"a": "aval", "foo": {"is": {"nested": "val"}}}): - # Overwrite an existing grain - ret = grains.present(name="foo:is", value="newbar") - self.assertEqual(ret["result"], False) - self.assertEqual(ret["changes"], {}) - self.assertEqual( - ret["comment"], - "The key 'foo:is' exists but is a dict or a list. Use 'force=True' to" - " overwrite.", - ) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"is": {"nested": "val"}}} - ) - - with self.setGrains({"a": "aval", "foo": {"is": {"nested": "val"}}}): - # Clear a grain (set to None) - ret = grains.present(name="foo:is", value=None) - self.assertEqual(ret["result"], False) - self.assertEqual(ret["changes"], {}) - self.assertEqual( - ret["comment"], - "The key 'foo:is' exists but is a dict or a list. Use 'force=True' to" - " overwrite.", - ) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"is": {"nested": "val"}}} - ) - - def test_present_fails_to_set_dict_or_list(self): - with self.setGrains({"a": "aval", "foo": "bar"}): - # Fails to overwrite a grain to a list - ret = grains.present(name="foo", value=["l1", "l2"]) - self.assertEqual(ret["result"], False) - self.assertEqual( - ret["comment"], - "The key 'foo' exists and the " - + "given value is a dict or a list. " - + "Use 'force=True' to overwrite.", - ) - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": "bar"}) - - with self.setGrains({"a": "aval", "foo": "bar"}): - # Fails setting a grain to a dict - ret = grains.present(name="foo", value={"k1": "v1"}) - self.assertEqual(ret["result"], False) - self.assertEqual( - ret["comment"], - "The key 'foo' exists and the given " - + "value is a dict or a list. Use " - + "'force=True' to overwrite.", - ) - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": "bar"}) - - with self.setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): - # Fails to overwrite a nested grain to a list - ret = grains.present( - name="foo,is,nested", value=["l1", "l2"], delimiter="," - ) - self.assertEqual(ret["result"], False) - self.assertEqual(ret["changes"], {}) - self.assertEqual( - ret["comment"], - "The key 'foo:is:nested' exists and the " - + "given value is a dict or a list. " - + "Use 'force=True' to overwrite.", - ) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"is": {"nested": "bar"}}} - ) - - with self.setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): - # Fails setting a nested grain to a dict - ret = grains.present(name="foo:is:nested", value={"k1": "v1"}) - self.assertEqual(ret["result"], False) - self.assertEqual( - ret["comment"], - "The key 'foo:is:nested' exists and the " - + "given value is a dict or a list. " - + "Use 'force=True' to overwrite.", - ) - self.assertEqual(ret["changes"], {}) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"is": {"nested": "bar"}}} - ) - - def test_present_fail_merge_dict(self): - with self.setGrains({"a": "aval", "foo": {"k1": "v1"}}): - # Fails setting a grain to a dict - ret = grains.present(name="foo", value={"k2": "v2"}) - self.assertEqual(ret["result"], False) - self.assertEqual( - ret["comment"], - "The key 'foo' exists but " - + "is a dict or a list. " - + "Use 'force=True' to overwrite.", - ) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": {"k1": "v1"}}) - self.assertGrainFileContent("a: aval\n" + "foo:\n" + " k1: v1\n") - - def test_present_force_to_set_dict_or_list(self): - with self.setGrains({"a": "aval", "foo": "bar"}): - # Force to overwrite a grain to a list - ret = grains.present(name="foo", value=["l1", "l2"], force=True) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Set grain foo to ['l1', 'l2']") - self.assertEqual(ret["changes"], {"foo": ["l1", "l2"]}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": ["l1", "l2"]}) - self.assertGrainFileContent("a: aval\n" + "foo:\n" + "- l1\n" + "- l2\n") - - with self.setGrains({"a": "aval", "foo": "bar"}): - # Force setting a grain to a dict - ret = grains.present(name="foo", value={"k1": "v1"}, force=True) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Set grain foo to {'k1': 'v1'}") - self.assertEqual(ret["changes"], {"foo": {"k1": "v1"}}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": {"k1": "v1"}}) - self.assertGrainFileContent("a: aval\n" + "foo:\n" + " k1: v1\n") - - with self.setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): - # Force to overwrite a nested grain to a list - ret = grains.present( - name="foo,is,nested", value=["l1", "l2"], delimiter=",", force=True - ) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["changes"], {"foo": {"is": {"nested": ["l1", "l2"]}}}) - self.assertEqual(ret["comment"], "Set grain foo:is:nested to ['l1', 'l2']") - self.assertEqual( - grains.__grains__, - {"a": "aval", "foo": {"is": {"nested": ["l1", "l2"]}}}, - ) - self.assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + " is:\n" - + " nested:\n" - + " - l1\n" - + " - l2\n" - ) - - with self.setGrains( - {"a": "aval", "foo": {"is": {"nested": "bar"}, "and": "other"}} - ): - # Force setting a nested grain to a dict - ret = grains.present(name="foo:is:nested", value={"k1": "v1"}, force=True) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Set grain foo:is:nested to {'k1': 'v1'}") - self.assertEqual( - ret["changes"], - {"foo": {"is": {"nested": {"k1": "v1"}}, "and": "other"}}, - ) - self.assertEqual( - grains.__grains__, - {"a": "aval", "foo": {"is": {"nested": {"k1": "v1"}}, "and": "other"}}, - ) - self.assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + " and: other\n" - + " is:\n" - + " nested:\n" - + " k1: v1\n" - ) - - def test_present_fails_to_convert_value_to_key(self): - with self.setGrains({"a": "aval", "foo": "bar"}): - # Fails converting a value to a nested grain key - ret = grains.present(name="foo:is:nested", value={"k1": "v1"}) - self.assertEqual(ret["result"], False) - self.assertEqual( - ret["comment"], - "The key 'foo' value is 'bar', " - + "which is different from the provided " - + "key 'is'. Use 'force=True' to overwrite.", - ) - self.assertEqual(ret["changes"], {}) - - def test_present_overwrite_test(self): - with patch.dict(grains.__opts__, {"test": True}): - with self.setGrains({"a": "aval", "foo": "bar"}): - # Overwrite an existing grain - ret = grains.present(name="foo", value="newbar") - self.assertEqual(ret["result"], None) - self.assertEqual(ret["changes"], {"changed": {"foo": "newbar"}}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": "bar"}) - self.assertGrainFileContent("a: aval\n" + "foo: bar\n") - - def test_present_convert_value_to_key(self): - with self.setGrains({"a": "aval", "foo": "is"}): - # Converts a value to a nested grain key - ret = grains.present(name="foo:is:nested", value={"k1": "v1"}) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Set grain foo:is:nested to {'k1': 'v1'}") - self.assertEqual(ret["changes"], {"foo": {"is": {"nested": {"k1": "v1"}}}}) - self.assertEqual( - grains.__grains__, - {"a": "aval", "foo": {"is": {"nested": {"k1": "v1"}}}}, - ) - self.assertGrainFileContent( - "a: aval\n" + "foo:\n" + " is:\n" + " nested:\n" + " k1: v1\n" - ) - - with self.setGrains({"a": "aval", "foo": ["one", "is", "correct"]}): - # Converts a list element to a nested grain key - ret = grains.present(name="foo:is:nested", value={"k1": "v1"}) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Set grain foo:is:nested to {'k1': 'v1'}") - self.assertEqual( - ret["changes"], - {"foo": ["one", {"is": {"nested": {"k1": "v1"}}}, "correct"]}, - ) - self.assertEqual( - grains.__grains__, - { - "a": "aval", - "foo": ["one", {"is": {"nested": {"k1": "v1"}}}, "correct"], - }, - ) - self.assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + "- one\n" - + "- is:\n" - + " nested:\n" - + " k1: v1\n" - + "- correct\n" - ) - - def test_present_unknown_failure(self): - with patch("salt.modules.grains.setval") as mocked_setval: - mocked_setval.return_value = "Failed to set grain foo" - with self.setGrains({"a": "aval", "foo": "bar"}): - # Unknown reason failure - ret = grains.present(name="foo", value="baz") - self.assertEqual(ret["result"], False) - self.assertEqual(ret["comment"], "Failed to set grain foo") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": "bar"}) - self.assertGrainFileContent("a: aval\n" + "foo: bar\n") - - # 'absent' function tests: 6 - - def test_absent_already(self): - # Unset a non existent grain - with self.setGrains({"a": "aval"}): - ret = grains.absent(name="foo") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain foo does not exist") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval"}) - self.assertGrainFileContent("a: aval\n") - - # Unset a non existent nested grain - with self.setGrains({"a": "aval"}): - ret = grains.absent(name="foo:is:nested") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain foo:is:nested does not exist") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval"}) - self.assertGrainFileContent("a: aval\n") - - def test_absent_unset(self): - # Unset a grain - with self.setGrains({"a": "aval", "foo": "bar"}): - ret = grains.absent(name="foo") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value for grain foo was set to None") - self.assertEqual(ret["changes"], {"grain": "foo", "value": None}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": None}) - self.assertGrainFileContent("a: aval\n" + "foo: null\n") - - # Unset grain when its value is False - with self.setGrains({"a": "aval", "foo": False}): - ret = grains.absent(name="foo") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value for grain foo was set to None") - self.assertEqual(ret["changes"], {"grain": "foo", "value": None}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": None}) - self.assertGrainFileContent("a: aval\n" + "foo: null\n") - - # Unset a nested grain - with self.setGrains( - {"a": "aval", "foo": ["order", {"is": {"nested": "bar"}}, "correct"]} - ): - ret = grains.absent(name="foo,is,nested", delimiter=",") - self.assertEqual(ret["result"], True) - self.assertEqual( - ret["comment"], "Value for grain foo:is:nested was set to None" - ) - self.assertEqual(ret["changes"], {"grain": "foo:is:nested", "value": None}) - self.assertEqual( - grains.__grains__, - {"a": "aval", "foo": ["order", {"is": {"nested": None}}, "correct"]}, - ) - self.assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + "- order\n" - + "- is:\n" - + " nested: null\n" - + "- correct\n" - ) - - # Unset a nested value don't change anything - with self.setGrains( - {"a": "aval", "foo": ["order", {"is": "nested"}, "correct"]} - ): - ret = grains.absent(name="foo:is:nested") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain foo:is:nested does not exist") - self.assertEqual(ret["changes"], {}) - self.assertEqual( - grains.__grains__, - {"a": "aval", "foo": ["order", {"is": "nested"}, "correct"]}, - ) - self.assertGrainFileContent( - "a: aval\n" + "foo:\n" + "- order\n" + "- is: nested\n" + "- correct\n" - ) - - def test_absent_unset_test(self): - with patch.dict(grains.__opts__, {"test": True}): - with self.setGrains({"a": "aval", "foo": "bar"}): - # Overwrite an existing grain - ret = grains.absent(name="foo") - self.assertEqual(ret["result"], None) - self.assertEqual(ret["changes"], {"grain": "foo", "value": None}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": "bar"}) - self.assertGrainFileContent("a: aval\n" + "foo: bar\n") - - def test_absent_fails_nested_complex_grain(self): - # Unset a nested complex grain - with self.setGrains( - {"a": "aval", "foo": ["order", {"is": {"nested": "bar"}}, "correct"]} - ): - ret = grains.absent(name="foo:is") - self.assertEqual(ret["result"], False) - self.assertEqual( - ret["comment"], - "The key 'foo:is' exists but is a dict or a list. Use 'force=True' to" - " overwrite.", - ) - self.assertEqual(ret["changes"], {}) - self.assertEqual( - grains.__grains__, - {"a": "aval", "foo": ["order", {"is": {"nested": "bar"}}, "correct"]}, - ) - self.assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + "- order\n" - + "- is:\n" - + " nested: bar\n" - + "- correct\n" - ) - - def test_absent_force_nested_complex_grain(self): - # Unset a nested complex grain - with self.setGrains( - {"a": "aval", "foo": ["order", {"is": {"nested": "bar"}}, "correct"]} - ): - ret = grains.absent(name="foo:is", force=True) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value for grain foo:is was set to None") - self.assertEqual(ret["changes"], {"grain": "foo:is", "value": None}) - self.assertEqual( - grains.__grains__, - {"a": "aval", "foo": ["order", {"is": None}, "correct"]}, - ) - self.assertGrainFileContent( - "a: aval\n" + "foo:\n" + "- order\n" + "- is: null\n" + "- correct\n" - ) - - def test_absent_delete(self): - # Delete a grain - with self.setGrains({"a": "aval", "foo": "bar"}): - ret = grains.absent(name="foo", destructive=True) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain foo was deleted") - self.assertEqual(ret["changes"], {"deleted": "foo"}) - self.assertEqual(grains.__grains__, {"a": "aval"}) - self.assertGrainFileContent("a: aval\n") - - # Delete a previously unset grain - with self.setGrains({"a": "aval", "foo": None}): - ret = grains.absent(name="foo", destructive=True) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain foo was deleted") - self.assertEqual(ret["changes"], {"deleted": "foo"}) - self.assertEqual(grains.__grains__, {"a": "aval"}) - self.assertGrainFileContent("a: aval\n") - - # Delete a nested grain - with self.setGrains( - { - "a": "aval", - "foo": [ - "order", - {"is": {"nested": "bar", "other": "value"}}, - "correct", - ], - } - ): - ret = grains.absent(name="foo:is:nested", destructive=True) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain foo:is:nested was deleted") - self.assertEqual(ret["changes"], {"deleted": "foo:is:nested"}) - self.assertEqual( - grains.__grains__, - {"a": "aval", "foo": ["order", {"is": {"other": "value"}}, "correct"]}, - ) - self.assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + "- order\n" - + "- is:\n" - + " other: value\n" - + "- correct\n" - ) - - # 'append' function tests: 6 - - def test_append(self): - # Append to an existing list - with self.setGrains({"a": "aval", "foo": ["bar"]}): - ret = grains.append(name="foo", value="baz") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value baz was added to grain foo") - self.assertEqual(ret["changes"], {"added": "baz"}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": ["bar", "baz"]}) - self.assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n" + "- baz\n") - - def test_append_nested(self): - # Append to an existing nested list - with self.setGrains({"a": "aval", "foo": {"list": ["bar"]}}): - ret = grains.append(name="foo,list", value="baz", delimiter=",") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value baz was added to grain foo:list") - self.assertEqual(ret["changes"], {"added": "baz"}) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"list": ["bar", "baz"]}} - ) - self.assertGrainFileContent( - "a: aval\n" + "foo:\n" + " list:\n" + " - bar\n" + " - baz\n" - ) - - def test_append_already(self): - # Append to an existing list - with self.setGrains({"a": "aval", "foo": ["bar"]}): - ret = grains.append(name="foo", value="bar") - self.assertEqual(ret["result"], True) - self.assertEqual( - ret["comment"], "Value bar is already in the list " + "for grain foo" - ) - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": ["bar"]}) - self.assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n") - - def test_append_fails_not_a_list(self): - # Fail to append to an existing grain, not a list - with self.setGrains({"a": "aval", "foo": {"bar": "val"}}): - ret = grains.append(name="foo", value="baz") - self.assertEqual(ret["result"], False) - self.assertEqual(ret["comment"], "Grain foo is not a valid list") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": {"bar": "val"}}) - - def test_append_convert_to_list(self): - # Append to an existing grain, converting to a list - with self.setGrains({"a": "aval", "foo": {"bar": "val"}}): - self.assertGrainFileContent("a: aval\n" + "foo:\n" + " bar: val\n") - ret = grains.append(name="foo", value="baz", convert=True) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value baz was added to grain foo") - self.assertEqual(ret["changes"], {"added": "baz"}) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": [{"bar": "val"}, "baz"]} - ) - self.assertGrainFileContent( - "a: aval\n" + "foo:\n" + "- bar: val\n" + "- baz\n" - ) - - # Append to an existing grain, converting to a list a multi-value dict - with self.setGrains({"a": "aval", "foo": {"bar": "val", "other": "value"}}): - self.assertGrainFileContent( - "a: aval\n" + "foo:\n" + " bar: val\n" + " other: value\n" - ) - ret = grains.append(name="foo", value="baz", convert=True) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value baz was added to grain foo") - self.assertEqual(ret["changes"], {"added": "baz"}) - self.assertEqual( - grains.__grains__, - {"a": "aval", "foo": [{"bar": "val", "other": "value"}, "baz"]}, - ) - self.assertGrainFileContent( - "a: aval\n" + "foo:\n" + "- bar: val\n" + " other: value\n" + "- baz\n" - ) - - def test_append_fails_inexistent(self): - # Append to a non existing grain - with self.setGrains({"a": "aval"}): - ret = grains.append(name="foo", value="bar") - self.assertEqual(ret["result"], False) - self.assertEqual(ret["comment"], "Grain foo does not exist") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval"}) - - def test_append_convert_to_list_empty(self): - # Append to an existing list - with self.setGrains({"foo": None}): - ret = grains.append(name="foo", value="baz", convert=True) - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value baz was added to grain foo") - self.assertEqual(ret["changes"], {"added": "baz"}) - self.assertEqual(grains.__grains__, {"foo": ["baz"]}) - self.assertGrainFileContent("foo:\n" + "- baz\n") - - # 'list_present' function tests: 7 - - def test_list_present(self): - with self.setGrains({"a": "aval", "foo": ["bar"]}): - ret = grains.list_present(name="foo", value="baz") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Append value baz to grain foo") - self.assertEqual(ret["changes"], {"new": {"foo": ["bar", "baz"]}}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": ["bar", "baz"]}) - self.assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n" + "- baz\n") - - def test_list_present_nested(self): - with self.setGrains({"a": "aval", "foo": {"is": {"nested": ["bar"]}}}): - ret = grains.list_present(name="foo,is,nested", value="baz", delimiter=",") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Append value baz to grain foo:is:nested") - self.assertEqual( - ret["changes"], {"new": {"foo": {"is": {"nested": ["bar", "baz"]}}}} - ) - self.assertEqual( - grains.__grains__, - {"a": "aval", "foo": {"is": {"nested": ["bar", "baz"]}}}, - ) - self.assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + " is:\n" - + " nested:\n" - + " - bar\n" - + " - baz\n" - ) - - def test_list_present_inexistent(self): - with self.setGrains({"a": "aval"}): - ret = grains.list_present(name="foo", value="baz") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Append value baz to grain foo") - self.assertEqual(ret["changes"], {"new": {"foo": ["baz"]}}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": ["baz"]}) - self.assertGrainFileContent("a: aval\n" + "foo:\n" + "- baz\n") - - def test_list_present_inexistent_nested(self): - with self.setGrains({"a": "aval"}): - ret = grains.list_present(name="foo:is:nested", value="baz") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Append value baz to grain foo:is:nested") - self.assertEqual( - ret["changes"], {"new": {"foo": {"is": {"nested": ["baz"]}}}} - ) - self.assertEqual( - grains.__grains__, {"a": "aval", "foo": {"is": {"nested": ["baz"]}}} - ) - self.assertGrainFileContent( - "a: aval\n" + "foo:\n" + " is:\n" + " nested:\n" + " - baz\n" - ) - - def test_list_present_not_a_list(self): - with self.setGrains({"a": "aval", "foo": "bar"}): - ret = grains.list_present(name="foo", value="baz") - self.assertEqual(ret["result"], False) - self.assertEqual(ret["comment"], "Grain foo is not a valid list") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": "bar"}) - self.assertGrainFileContent("a: aval\n" + "foo: bar\n") - - def test_list_present_nested_already(self): - with self.setGrains({"a": "aval", "b": {"foo": ["bar"]}}): - ret = grains.list_present(name="b:foo", value="bar") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value bar is already in grain b:foo") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "b": {"foo": ["bar"]}}) - self.assertGrainFileContent("a: aval\n" + "b:\n" + " foo:\n" + " - bar\n") - - def test_list_present_already(self): - with self.setGrains({"a": "aval", "foo": ["bar"]}): - ret = grains.list_present(name="foo", value="bar") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value bar is already in grain foo") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": ["bar"]}) - self.assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n") - - def test_list_present_unknown_failure(self): - with self.setGrains({"a": "aval", "foo": ["bar"]}): - # Unknown reason failure - - with patch.dict(grainsmod.__salt__, {"grains.append": MagicMock()}): - ret = grains.list_present(name="foo", value="baz") - self.assertEqual(ret["result"], False) - self.assertEqual(ret["comment"], "Failed append value baz to grain foo") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": ["bar"]}) - self.assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n") - - # 'list_absent' function tests: 6 - - def test_list_absent(self): - with self.setGrains({"a": "aval", "foo": ["bar"]}): - ret = grains.list_absent(name="foo", value="bar") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value bar was deleted from grain foo") - self.assertEqual(ret["changes"], {"deleted": ["bar"]}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": []}) - self.assertGrainFileContent("a: aval\n" + "foo: []\n") - - def test_list_absent_nested(self): - with self.setGrains({"a": "aval", "foo": {"list": ["bar"]}}): - ret = grains.list_absent(name="foo:list", value="bar") - self.assertEqual(ret["result"], True) - self.assertEqual( - ret["comment"], "Value bar was deleted from grain foo:list" - ) - self.assertEqual(ret["changes"], {"deleted": ["bar"]}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": {"list": []}}) - self.assertGrainFileContent("a: aval\n" + "foo:\n" + " list: []\n") - - def test_list_absent_inexistent(self): - with self.setGrains({"a": "aval"}): - ret = grains.list_absent(name="foo", value="baz") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain foo does not exist") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval"}) - self.assertGrainFileContent("a: aval\n") - - def test_list_absent_inexistent_nested(self): - with self.setGrains({"a": "aval"}): - ret = grains.list_absent(name="foo:list", value="baz") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Grain foo:list does not exist") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval"}) - self.assertGrainFileContent("a: aval\n") - - def test_list_absent_not_a_list(self): - with self.setGrains({"a": "aval", "foo": "bar"}): - ret = grains.list_absent(name="foo", value="bar") - self.assertEqual(ret["result"], False) - self.assertEqual(ret["comment"], "Grain foo is not a valid list") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": "bar"}) - self.assertGrainFileContent("a: aval\n" + "foo: bar\n") - - def test_list_absent_already(self): - with self.setGrains({"a": "aval", "foo": ["bar"]}): - ret = grains.list_absent(name="foo", value="baz") - self.assertEqual(ret["result"], True) - self.assertEqual(ret["comment"], "Value baz is absent from grain foo") - self.assertEqual(ret["changes"], {}) - self.assertEqual(grains.__grains__, {"a": "aval", "foo": ["bar"]}) - self.assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n") From ba208bbae2080ad5486a47733f9246331cf5b327 Mon Sep 17 00:00:00 2001 From: Frode Gundersen Date: Wed, 12 Apr 2023 10:38:58 -0600 Subject: [PATCH 07/60] Update test_grains.py --- tests/pytests/unit/states/test_grains.py | 151 +++++++---------------- 1 file changed, 45 insertions(+), 106 deletions(-) diff --git a/tests/pytests/unit/states/test_grains.py b/tests/pytests/unit/states/test_grains.py index 43f2afd9df52..99a76a4357f0 100644 --- a/tests/pytests/unit/states/test_grains.py +++ b/tests/pytests/unit/states/test_grains.py @@ -97,11 +97,8 @@ def test_exists_found(): def test_make_hashable(): with setGrains({"cmplx_lst_grain": [{"a": "aval"}, {"foo": "bar"}]}): hashable_list = {"cmplx_lst_grain": [{"a": "aval"}, {"foo": "bar"}]} - assert ( - grains.make_hashable(grains.__grains__).issubset( - grains.make_hashable(hashable_list) - ) - is True + assert grains.make_hashable(grains.__grains__).issubset( + grains.make_hashable(hashable_list) ) # 'present' function tests: 12 @@ -134,11 +131,7 @@ def test_present_add(): "foo": {"is": {"nested": {"bar": "is a dict"}}}, } assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + " is:\n" - + " nested:\n" - + " bar: is a dict\n" + "a: aval\nfoo:\n is:\n nested:\n bar: is a dict\n" ) @@ -150,7 +143,7 @@ def test_present_add_key_to_existing(): assert ret["comment"] == "Set grain foo:k2 to v2" assert ret["changes"] == {"foo": {"k2": "v2", "k1": "v1"}} assert grains.__grains__ == {"a": "aval", "foo": {"k1": "v1", "k2": "v2"}} - assertGrainFileContent("a: aval\n" + "foo:\n" + " k1: v1\n" + " k2: v2\n") + assertGrainFileContent("a: aval\nfoo:\n k1: v1\n k2: v2\n") def test_present_already_set(): @@ -186,7 +179,7 @@ def test_present_overwrite(): assert ret["result"] is True assert ret["changes"] == {"foo": "newbar"} assert grains.__grains__ == {"a": "aval", "foo": "newbar"} - assertGrainFileContent("a: aval\n" + "foo: newbar\n") + assertGrainFileContent("a: aval\nfoo: newbar\n") with setGrains({"a": "aval", "foo": "bar"}): # Clear a grain (set to None) @@ -194,7 +187,7 @@ def test_present_overwrite(): assert ret["result"] is True assert ret["changes"] == {"foo": None} assert grains.__grains__ == {"a": "aval", "foo": None} - assertGrainFileContent("a: aval\n" + "foo: null\n") + assertGrainFileContent("a: aval\nfoo: null\n") with setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): # Overwrite an existing nested grain @@ -202,9 +195,7 @@ def test_present_overwrite(): assert ret["result"] is True assert ret["changes"] == {"foo": {"is": {"nested": "newbar"}}} assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": "newbar"}}} - assertGrainFileContent( - "a: aval\n" + "foo:\n" + " is:\n" + " nested: newbar\n" - ) + assertGrainFileContent("a: aval\nfoo:\n is:\n nested: newbar\n") with setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): # Clear a nested grain (set to None) @@ -212,9 +203,7 @@ def test_present_overwrite(): assert ret["result"] is True assert ret["changes"] == {"foo": {"is": {"nested": None}}} assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": None}}} - assertGrainFileContent( - "a: aval\n" + "foo:\n" + " is:\n" + " nested: null\n" - ) + assertGrainFileContent("a: aval\nfoo:\n is:\n nested: null\n") def test_present_fail_overwrite(): @@ -297,7 +286,7 @@ def test_present_fail_merge_dict(): == "The key 'foo' exists but is a dict or a list. Use 'force=True' to overwrite." ) assert grains.__grains__ == {"a": "aval", "foo": {"k1": "v1"}} - assertGrainFileContent("a: aval\n" + "foo:\n" + " k1: v1\n") + assertGrainFileContent("a: aval\nfoo:\n k1: v1\n") def test_present_force_to_set_dict_or_list(): @@ -308,7 +297,7 @@ def test_present_force_to_set_dict_or_list(): assert ret["comment"] == "Set grain foo to ['l1', 'l2']" assert ret["changes"] == {"foo": ["l1", "l2"]} assert grains.__grains__ == {"a": "aval", "foo": ["l1", "l2"]} - assertGrainFileContent("a: aval\n" + "foo:\n" + "- l1\n" + "- l2\n") + assertGrainFileContent("a: aval\nfoo:\n- l1\n- l2\n") with setGrains({"a": "aval", "foo": "bar"}): # Force setting a grain to a dict @@ -317,7 +306,7 @@ def test_present_force_to_set_dict_or_list(): assert ret["comment"] == "Set grain foo to {'k1': 'v1'}" assert ret["changes"] == {"foo": {"k1": "v1"}} assert grains.__grains__ == {"a": "aval", "foo": {"k1": "v1"}} - assertGrainFileContent("a: aval\n" + "foo:\n" + " k1: v1\n") + assertGrainFileContent("a: aval\nfoo:\n k1: v1\n") with setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): # Force to overwrite a nested grain to a list @@ -332,12 +321,7 @@ def test_present_force_to_set_dict_or_list(): "foo": {"is": {"nested": ["l1", "l2"]}}, } assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + " is:\n" - + " nested:\n" - + " - l1\n" - + " - l2\n" + "a: aval\nfoo:\n is:\n nested:\n - l1\n - l2\n" ) with setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}, "and": "other"}}): @@ -353,12 +337,7 @@ def test_present_force_to_set_dict_or_list(): "foo": {"is": {"nested": {"k1": "v1"}}, "and": "other"}, } assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + " and: other\n" - + " is:\n" - + " nested:\n" - + " k1: v1\n" + "a: aval\nfoo:\n and: other\n is:\n nested:\n k1: v1\n" ) @@ -382,7 +361,7 @@ def test_present_overwrite_test(): assert ret["result"] is None assert ret["changes"] == {"changed": {"foo": "newbar"}} assert grains.__grains__ == {"a": "aval", "foo": "bar"} - assertGrainFileContent("a: aval\n" + "foo: bar\n") + assertGrainFileContent("a: aval\nfoo: bar\n") def test_present_convert_value_to_key(): @@ -396,9 +375,7 @@ def test_present_convert_value_to_key(): "a": "aval", "foo": {"is": {"nested": {"k1": "v1"}}}, } - assertGrainFileContent( - "a: aval\n" + "foo:\n" + " is:\n" + " nested:\n" + " k1: v1\n" - ) + assertGrainFileContent("a: aval\nfoo:\n is:\n nested:\n k1: v1\n") with setGrains({"a": "aval", "foo": ["one", "is", "correct"]}): # Converts a list element to a nested grain key @@ -413,13 +390,7 @@ def test_present_convert_value_to_key(): "foo": ["one", {"is": {"nested": {"k1": "v1"}}}, "correct"], } assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + "- one\n" - + "- is:\n" - + " nested:\n" - + " k1: v1\n" - + "- correct\n" + "a: aval\nfoo:\n- one\n- is:\n nested:\n k1: v1\n- correct\n" ) @@ -433,7 +404,7 @@ def test_present_unknown_failure(): assert ret["comment"] == "Failed to set grain foo" assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval", "foo": "bar"} - assertGrainFileContent("a: aval\n" + "foo: bar\n") + assertGrainFileContent("a: aval\nfoo: bar\n") # 'absent' function tests: 6 @@ -467,7 +438,7 @@ def test_absent_unset(): assert ret["comment"] == "Value for grain foo was set to None" assert ret["changes"] == {"grain": "foo", "value": None} assert grains.__grains__ == {"a": "aval", "foo": None} - assertGrainFileContent("a: aval\n" + "foo: null\n") + assertGrainFileContent("a: aval\nfoo: null\n") # Unset grain when its value is False with setGrains({"a": "aval", "foo": False}): @@ -476,7 +447,7 @@ def test_absent_unset(): assert ret["comment"] == "Value for grain foo was set to None" assert ret["changes"] == {"grain": "foo", "value": None} assert grains.__grains__ == {"a": "aval", "foo": None} - assertGrainFileContent("a: aval\n" + "foo: null\n") + assertGrainFileContent("a: aval\nfoo: null\n") # Unset a nested grain with setGrains( @@ -491,12 +462,7 @@ def test_absent_unset(): "foo": ["order", {"is": {"nested": None}}, "correct"], } assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + "- order\n" - + "- is:\n" - + " nested: null\n" - + "- correct\n" + "a: aval\nfoo:\n- order\n- is:\n nested: null\n- correct\n" ) # Unset a nested value don't change anything @@ -509,9 +475,7 @@ def test_absent_unset(): "a": "aval", "foo": ["order", {"is": "nested"}, "correct"], } - assertGrainFileContent( - "a: aval\n" + "foo:\n" + "- order\n" + "- is: nested\n" + "- correct\n" - ) + assertGrainFileContent("a: aval\nfoo:\n- order\n- is: nested\n- correct\n") def test_absent_unset_test(): @@ -522,7 +486,7 @@ def test_absent_unset_test(): assert ret["result"] is None assert ret["changes"] == {"grain": "foo", "value": None} assert grains.__grains__ == {"a": "aval", "foo": "bar"} - assertGrainFileContent("a: aval\n" + "foo: bar\n") + assertGrainFileContent("a: aval\nfoo: bar\n") def test_absent_fails_nested_complex_grain(): @@ -542,12 +506,7 @@ def test_absent_fails_nested_complex_grain(): "foo": ["order", {"is": {"nested": "bar"}}, "correct"], } assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + "- order\n" - + "- is:\n" - + " nested: bar\n" - + "- correct\n" + "a: aval\nfoo:\n- order\n- is:\n nested: bar\n- correct\n" ) @@ -564,9 +523,7 @@ def test_absent_force_nested_complex_grain(): "a": "aval", "foo": ["order", {"is": None}, "correct"], } - assertGrainFileContent( - "a: aval\n" + "foo:\n" + "- order\n" + "- is: null\n" + "- correct\n" - ) + assertGrainFileContent("a: aval\nfoo:\n- order\n- is: null\n- correct\n") def test_absent_delete(): @@ -608,12 +565,7 @@ def test_absent_delete(): "foo": ["order", {"is": {"other": "value"}}, "correct"], } assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + "- order\n" - + "- is:\n" - + " other: value\n" - + "- correct\n" + "a: aval\nfoo:\n- order\n- is:\n other: value\n- correct\n" ) @@ -628,7 +580,7 @@ def test_append(): assert ret["comment"] == "Value baz was added to grain foo" assert ret["changes"] == {"added": "baz"} assert grains.__grains__ == {"a": "aval", "foo": ["bar", "baz"]} - assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n" + "- baz\n") + assertGrainFileContent("a: aval\nfoo:\n- bar\n- baz\n") def test_append_nested(): @@ -639,9 +591,7 @@ def test_append_nested(): assert ret["comment"] == "Value baz was added to grain foo:list" assert ret["changes"] == {"added": "baz"} assert grains.__grains__ == {"a": "aval", "foo": {"list": ["bar", "baz"]}} - assertGrainFileContent( - "a: aval\n" + "foo:\n" + " list:\n" + " - bar\n" + " - baz\n" - ) + assertGrainFileContent("a: aval\nfoo:\n list:\n - bar\n - baz\n") def test_append_already(): @@ -652,7 +602,7 @@ def test_append_already(): assert ret["comment"] == "Value bar is already in the list " + "for grain foo" assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval", "foo": ["bar"]} - assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n") + assertGrainFileContent("a: aval\nfoo:\n- bar\n") def test_append_fails_not_a_list(): @@ -668,19 +618,17 @@ def test_append_fails_not_a_list(): def test_append_convert_to_list(): # Append to an existing grain, converting to a list with setGrains({"a": "aval", "foo": {"bar": "val"}}): - assertGrainFileContent("a: aval\n" + "foo:\n" + " bar: val\n") + assertGrainFileContent("a: aval\nfoo:\n bar: val\n") ret = grains.append(name="foo", value="baz", convert=True) assert ret["result"] is True assert ret["comment"] == "Value baz was added to grain foo" assert ret["changes"] == {"added": "baz"} assert grains.__grains__ == {"a": "aval", "foo": [{"bar": "val"}, "baz"]} - assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar: val\n" + "- baz\n") + assertGrainFileContent("a: aval\nfoo:\n- bar: val\n- baz\n") # Append to an existing grain, converting to a list a multi-value dict with setGrains({"a": "aval", "foo": {"bar": "val", "other": "value"}}): - assertGrainFileContent( - "a: aval\n" + "foo:\n" + " bar: val\n" + " other: value\n" - ) + assertGrainFileContent("a: aval\nfoo:\n bar: val\n other: value\n") ret = grains.append(name="foo", value="baz", convert=True) assert ret["result"] is True assert ret["comment"] == "Value baz was added to grain foo" @@ -689,9 +637,7 @@ def test_append_convert_to_list(): "a": "aval", "foo": [{"bar": "val", "other": "value"}, "baz"], } - assertGrainFileContent( - "a: aval\n" + "foo:\n" + "- bar: val\n" + " other: value\n" + "- baz\n" - ) + assertGrainFileContent("a: aval\nfoo:\n- bar: val\n other: value\n- baz\n") def test_append_fails_inexistent(): @@ -712,7 +658,7 @@ def test_append_convert_to_list_empty(): assert ret["comment"] == "Value baz was added to grain foo" assert ret["changes"] == {"added": "baz"} assert grains.__grains__ == {"foo": ["baz"]} - assertGrainFileContent("foo:\n" + "- baz\n") + assertGrainFileContent("foo:\n- baz\n") # 'list_present' function tests: 7 @@ -725,7 +671,7 @@ def test_list_present(): assert ret["comment"] == "Append value baz to grain foo" assert ret["changes"] == {"new": {"foo": ["bar", "baz"]}} assert grains.__grains__ == {"a": "aval", "foo": ["bar", "baz"]} - assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n" + "- baz\n") + assertGrainFileContent("a: aval\nfoo:\n- bar\n- baz\n") def test_list_present_nested(): @@ -739,12 +685,7 @@ def test_list_present_nested(): "foo": {"is": {"nested": ["bar", "baz"]}}, } assertGrainFileContent( - "a: aval\n" - + "foo:\n" - + " is:\n" - + " nested:\n" - + " - bar\n" - + " - baz\n" + "a: aval\nfoo:\n is:\n nested:\n - bar\n - baz\n" ) @@ -755,7 +696,7 @@ def test_list_present_inexistent(): assert ret["comment"] == "Append value baz to grain foo" assert ret["changes"] == {"new": {"foo": ["baz"]}} assert grains.__grains__ == {"a": "aval", "foo": ["baz"]} - assertGrainFileContent("a: aval\n" + "foo:\n" + "- baz\n") + assertGrainFileContent("a: aval\nfoo:\n- baz\n") def test_list_present_inexistent_nested(): @@ -765,9 +706,7 @@ def test_list_present_inexistent_nested(): assert ret["comment"] == "Append value baz to grain foo:is:nested" assert ret["changes"] == {"new": {"foo": {"is": {"nested": ["baz"]}}}} assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": ["baz"]}}} - assertGrainFileContent( - "a: aval\n" + "foo:\n" + " is:\n" + " nested:\n" + " - baz\n" - ) + assertGrainFileContent("a: aval\nfoo:\n is:\n nested:\n - baz\n") def test_list_present_not_a_list(): @@ -777,7 +716,7 @@ def test_list_present_not_a_list(): assert ret["comment"] == "Grain foo is not a valid list" assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval", "foo": "bar"} - assertGrainFileContent("a: aval\n" + "foo: bar\n") + assertGrainFileContent("a: aval\nfoo: bar\n") def test_list_present_nested_already(): @@ -787,7 +726,7 @@ def test_list_present_nested_already(): assert ret["comment"] == "Value bar is already in grain b:foo" assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval", "b": {"foo": ["bar"]}} - assertGrainFileContent("a: aval\n" + "b:\n" + " foo:\n" + " - bar\n") + assertGrainFileContent("a: aval\nb:\n foo:\n - bar\n") def test_list_present_already(): @@ -797,7 +736,7 @@ def test_list_present_already(): assert ret["comment"] == "Value bar is already in grain foo" assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval", "foo": ["bar"]} - assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n") + assertGrainFileContent("a: aval\nfoo:\n- bar\n") def test_list_present_unknown_failure(): @@ -810,7 +749,7 @@ def test_list_present_unknown_failure(): assert ret["comment"] == "Failed append value baz to grain foo" assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval", "foo": ["bar"]} - assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n") + assertGrainFileContent("a: aval\nfoo:\n- bar\n") # 'list_absent' function tests: 6 @@ -823,7 +762,7 @@ def test_list_absent(): assert ret["comment"] == "Value bar was deleted from grain foo" assert ret["changes"] == {"deleted": ["bar"]} assert grains.__grains__ == {"a": "aval", "foo": []} - assertGrainFileContent("a: aval\n" + "foo: []\n") + assertGrainFileContent("a: aval\nfoo: []\n") def test_list_absent_nested(): @@ -833,7 +772,7 @@ def test_list_absent_nested(): assert ret["comment"] == "Value bar was deleted from grain foo:list" assert ret["changes"] == {"deleted": ["bar"]} assert grains.__grains__ == {"a": "aval", "foo": {"list": []}} - assertGrainFileContent("a: aval\n" + "foo:\n" + " list: []\n") + assertGrainFileContent("a: aval\nfoo:\n list: []\n") def test_list_absent_inexistent(): @@ -863,7 +802,7 @@ def test_list_absent_not_a_list(): assert ret["comment"] == "Grain foo is not a valid list" assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval", "foo": "bar"} - assertGrainFileContent("a: aval\n" + "foo: bar\n") + assertGrainFileContent("a: aval\nfoo: bar\n") def test_list_absent_already(): @@ -873,4 +812,4 @@ def test_list_absent_already(): assert ret["comment"] == "Value baz is absent from grain foo" assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval", "foo": ["bar"]} - assertGrainFileContent("a: aval\n" + "foo:\n" + "- bar\n") + assertGrainFileContent("a: aval\nfoo:\n- bar\n") From 89e2bba635c4fe2dac06642292cc6d9959961b91 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 13 Dec 2023 05:28:12 +0000 Subject: [PATCH 08/60] Set the right path for the config file Signed-off-by: Pedro Algarvio --- tests/pytests/unit/conftest.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/pytests/unit/conftest.py b/tests/pytests/unit/conftest.py index 587fc43babc1..c7152f3d2d14 100644 --- a/tests/pytests/unit/conftest.py +++ b/tests/pytests/unit/conftest.py @@ -1,3 +1,5 @@ +import os + import pytest import salt.config @@ -20,6 +22,7 @@ def minion_opts(tmp_path): dirpath.mkdir(parents=True) opts[name] = str(dirpath) opts["log_file"] = "logs/minion.log" + opts["conf_file"] = os.path.join(opts["conf_dir"], "minion") return opts @@ -37,6 +40,7 @@ def master_opts(tmp_path): dirpath.mkdir(parents=True) opts[name] = str(dirpath) opts["log_file"] = "logs/master.log" + opts["conf_file"] = os.path.join(opts["conf_dir"], "master") return opts @@ -55,4 +59,5 @@ def syndic_opts(tmp_path): dirpath.mkdir(parents=True) opts[name] = str(dirpath) opts["log_file"] = "logs/syndic.log" + opts["conf_file"] = os.path.join(opts["conf_dir"], "syndic") return opts From 6d3a4710cb353a9d1477bc09eb58530cb57d1fbe Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 13 Dec 2023 05:32:18 +0000 Subject: [PATCH 09/60] Fix the ``configure_loader_modules`` fixture Signed-off-by: Pedro Algarvio --- tests/pytests/unit/states/test_grains.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/tests/pytests/unit/states/test_grains.py b/tests/pytests/unit/states/test_grains.py index 99a76a4357f0..eacdacb82f62 100644 --- a/tests/pytests/unit/states/test_grains.py +++ b/tests/pytests/unit/states/test_grains.py @@ -1,8 +1,6 @@ """ unit tests for the grains state """ - - import contextlib import os @@ -14,21 +12,14 @@ import salt.utils.stringutils import salt.utils.yaml from tests.support.mock import MagicMock, patch -from tests.support.paths import SALT_CODE_DIR @pytest.fixture -def configure_loader_modules(): - grains_test_dir = "__salt_test_state_grains" - if not os.path.exists(os.path.join(SALT_CODE_DIR, grains_test_dir)): - os.makedirs(os.path.join(SALT_CODE_DIR, grains_test_dir)) +def configure_loader_modules(minion_opts): + minion_opts["local"] = True + minion_opts["test"] = False loader_globals = { - "__opts__": { - "test": False, - "conf_file": os.path.join(SALT_CODE_DIR, grains_test_dir, "minion"), - "cachedir": os.path.join(SALT_CODE_DIR, grains_test_dir), - "local": True, - }, + "__opts__": minion_opts, "__salt__": { "cmd.run_all": MagicMock( return_value={"pid": 5, "retcode": 0, "stderr": "", "stdout": ""} From e8d5f8394ec83ec3c4ceae9edf11c874071b6cbc Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 13 Dec 2023 05:33:06 +0000 Subject: [PATCH 10/60] No `CamelCase` please. Signed-off-by: Pedro Algarvio --- tests/pytests/unit/states/test_grains.py | 248 +++++++++++------------ 1 file changed, 119 insertions(+), 129 deletions(-) diff --git a/tests/pytests/unit/states/test_grains.py b/tests/pytests/unit/states/test_grains.py index eacdacb82f62..8015eaf9340a 100644 --- a/tests/pytests/unit/states/test_grains.py +++ b/tests/pytests/unit/states/test_grains.py @@ -36,28 +36,18 @@ def configure_loader_modules(minion_opts): return {grains: loader_globals, grainsmod: loader_globals} -def assertGrainFileContent(grains_string): - if os.path.isdir(grains.__opts__["conf_file"]): - grains_file = os.path.join(grains.__opts__["conf_file"], "grains") - else: - grains_file = os.path.join( - os.path.dirname(grains.__opts__["conf_file"]), "grains" - ) +def assert_grain_file_content(grains_string): + grains_file = os.path.join(grains.__opts__["conf_dir"], "grains") with salt.utils.files.fopen(grains_file, "r") as grf: grains_data = salt.utils.stringutils.to_unicode(grf.read()) assert grains_string == grains_data @contextlib.contextmanager -def setGrains(grains_data): +def set_grains(grains_data): with patch.dict(grains.__grains__, grains_data): with patch.dict(grainsmod.__grains__, grains_data): - if os.path.isdir(grains.__opts__["conf_file"]): - grains_file = os.path.join(grains.__opts__["conf_file"], "grains") - else: - grains_file = os.path.join( - os.path.dirname(grains.__opts__["conf_file"]), "grains" - ) + grains_file = os.path.join(grains.__opts__["conf_dir"], "grains") with salt.utils.files.fopen(grains_file, "w+") as grf: salt.utils.yaml.safe_dump(grains_data, grf, default_flow_style=False) yield @@ -67,7 +57,7 @@ def setGrains(grains_data): def test_exists_missing(): - with setGrains({"a": "aval"}): + with set_grains({"a": "aval"}): ret = grains.exists(name="foo") assert ret["result"] is False assert ret["comment"] == "Grain does not exist" @@ -75,7 +65,7 @@ def test_exists_missing(): def test_exists_found(): - with setGrains({"a": "aval", "foo": "bar"}): + with set_grains({"a": "aval", "foo": "bar"}): # Grain already set ret = grains.exists(name="foo") assert ret["result"] is True @@ -86,7 +76,7 @@ def test_exists_found(): def test_make_hashable(): - with setGrains({"cmplx_lst_grain": [{"a": "aval"}, {"foo": "bar"}]}): + with set_grains({"cmplx_lst_grain": [{"a": "aval"}, {"foo": "bar"}]}): hashable_list = {"cmplx_lst_grain": [{"a": "aval"}, {"foo": "bar"}]} assert grains.make_hashable(grains.__grains__).issubset( grains.make_hashable(hashable_list) @@ -97,23 +87,23 @@ def test_make_hashable(): def test_present_add(): # Set a non existing grain - with setGrains({"a": "aval"}): + with set_grains({"a": "aval"}): ret = grains.present(name="foo", value="bar") assert ret["result"] is True assert ret["changes"] == {"foo": "bar"} assert grains.__grains__ == {"a": "aval", "foo": "bar"} - assertGrainFileContent("a: aval\nfoo: bar\n") + assert_grain_file_content("a: aval\nfoo: bar\n") # Set a non existing nested grain - with setGrains({"a": "aval"}): + with set_grains({"a": "aval"}): ret = grains.present(name="foo:is:nested", value="bar") assert ret["result"] is True assert ret["changes"] == {"foo": {"is": {"nested": "bar"}}} assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": "bar"}}} - assertGrainFileContent("a: aval\nfoo:\n is:\n nested: bar\n") + assert_grain_file_content("a: aval\nfoo:\n is:\n nested: bar\n") # Set a non existing nested dict grain - with setGrains({"a": "aval"}): + with set_grains({"a": "aval"}): ret = grains.present(name="foo:is:nested", value={"bar": "is a dict"}) assert ret["result"] is True assert ret["changes"] == {"foo": {"is": {"nested": {"bar": "is a dict"}}}} @@ -121,24 +111,24 @@ def test_present_add(): "a": "aval", "foo": {"is": {"nested": {"bar": "is a dict"}}}, } - assertGrainFileContent( + assert_grain_file_content( "a: aval\nfoo:\n is:\n nested:\n bar: is a dict\n" ) def test_present_add_key_to_existing(): - with setGrains({"a": "aval", "foo": {"k1": "v1"}}): + with set_grains({"a": "aval", "foo": {"k1": "v1"}}): # Fails setting a grain to a dict ret = grains.present(name="foo:k2", value="v2") assert ret["result"] is True assert ret["comment"] == "Set grain foo:k2 to v2" assert ret["changes"] == {"foo": {"k2": "v2", "k1": "v1"}} assert grains.__grains__ == {"a": "aval", "foo": {"k1": "v1", "k2": "v2"}} - assertGrainFileContent("a: aval\nfoo:\n k1: v1\n k2: v2\n") + assert_grain_file_content("a: aval\nfoo:\n k1: v1\n k2: v2\n") def test_present_already_set(): - with setGrains({"a": "aval", "foo": "bar"}): + with set_grains({"a": "aval", "foo": "bar"}): # Grain already set ret = grains.present(name="foo", value="bar") assert ret["result"] is True @@ -146,7 +136,7 @@ def test_present_already_set(): assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval", "foo": "bar"} - with setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): + with set_grains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): # Nested grain already set ret = grains.present(name="foo:is:nested", value="bar") assert ret["result"] is True @@ -154,7 +144,7 @@ def test_present_already_set(): assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": "bar"}}} - with setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): + with set_grains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): # Nested dict grain already set ret = grains.present(name="foo:is", value={"nested": "bar"}) assert ret["result"] is True @@ -164,41 +154,41 @@ def test_present_already_set(): def test_present_overwrite(): - with setGrains({"a": "aval", "foo": "bar"}): + with set_grains({"a": "aval", "foo": "bar"}): # Overwrite an existing grain ret = grains.present(name="foo", value="newbar") assert ret["result"] is True assert ret["changes"] == {"foo": "newbar"} assert grains.__grains__ == {"a": "aval", "foo": "newbar"} - assertGrainFileContent("a: aval\nfoo: newbar\n") + assert_grain_file_content("a: aval\nfoo: newbar\n") - with setGrains({"a": "aval", "foo": "bar"}): + with set_grains({"a": "aval", "foo": "bar"}): # Clear a grain (set to None) ret = grains.present(name="foo", value=None) assert ret["result"] is True assert ret["changes"] == {"foo": None} assert grains.__grains__ == {"a": "aval", "foo": None} - assertGrainFileContent("a: aval\nfoo: null\n") + assert_grain_file_content("a: aval\nfoo: null\n") - with setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): + with set_grains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): # Overwrite an existing nested grain ret = grains.present(name="foo:is:nested", value="newbar") assert ret["result"] is True assert ret["changes"] == {"foo": {"is": {"nested": "newbar"}}} assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": "newbar"}}} - assertGrainFileContent("a: aval\nfoo:\n is:\n nested: newbar\n") + assert_grain_file_content("a: aval\nfoo:\n is:\n nested: newbar\n") - with setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): + with set_grains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): # Clear a nested grain (set to None) ret = grains.present(name="foo:is:nested", value=None) assert ret["result"] is True assert ret["changes"] == {"foo": {"is": {"nested": None}}} assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": None}}} - assertGrainFileContent("a: aval\nfoo:\n is:\n nested: null\n") + assert_grain_file_content("a: aval\nfoo:\n is:\n nested: null\n") def test_present_fail_overwrite(): - with setGrains({"a": "aval", "foo": {"is": {"nested": "val"}}}): + with set_grains({"a": "aval", "foo": {"is": {"nested": "val"}}}): # Overwrite an existing grain ret = grains.present(name="foo:is", value="newbar") assert ret["result"] is False @@ -209,7 +199,7 @@ def test_present_fail_overwrite(): ) assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": "val"}}} - with setGrains({"a": "aval", "foo": {"is": {"nested": "val"}}}): + with set_grains({"a": "aval", "foo": {"is": {"nested": "val"}}}): # Clear a grain (set to None) ret = grains.present(name="foo:is", value=None) assert ret["result"] is False @@ -222,7 +212,7 @@ def test_present_fail_overwrite(): def test_present_fails_to_set_dict_or_list(): - with setGrains({"a": "aval", "foo": "bar"}): + with set_grains({"a": "aval", "foo": "bar"}): # Fails to overwrite a grain to a list ret = grains.present(name="foo", value=["l1", "l2"]) assert ret["result"] is False @@ -233,7 +223,7 @@ def test_present_fails_to_set_dict_or_list(): assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval", "foo": "bar"} - with setGrains({"a": "aval", "foo": "bar"}): + with set_grains({"a": "aval", "foo": "bar"}): # Fails setting a grain to a dict ret = grains.present(name="foo", value={"k1": "v1"}) assert ret["result"] is False @@ -244,7 +234,7 @@ def test_present_fails_to_set_dict_or_list(): assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval", "foo": "bar"} - with setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): + with set_grains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): # Fails to overwrite a nested grain to a list ret = grains.present(name="foo,is,nested", value=["l1", "l2"], delimiter=",") assert ret["result"] is False @@ -255,7 +245,7 @@ def test_present_fails_to_set_dict_or_list(): ) assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": "bar"}}} - with setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): + with set_grains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): # Fails setting a nested grain to a dict ret = grains.present(name="foo:is:nested", value={"k1": "v1"}) assert ret["result"] is False @@ -268,7 +258,7 @@ def test_present_fails_to_set_dict_or_list(): def test_present_fail_merge_dict(): - with setGrains({"a": "aval", "foo": {"k1": "v1"}}): + with set_grains({"a": "aval", "foo": {"k1": "v1"}}): # Fails setting a grain to a dict ret = grains.present(name="foo", value={"k2": "v2"}) assert ret["result"] is False @@ -277,29 +267,29 @@ def test_present_fail_merge_dict(): == "The key 'foo' exists but is a dict or a list. Use 'force=True' to overwrite." ) assert grains.__grains__ == {"a": "aval", "foo": {"k1": "v1"}} - assertGrainFileContent("a: aval\nfoo:\n k1: v1\n") + assert_grain_file_content("a: aval\nfoo:\n k1: v1\n") def test_present_force_to_set_dict_or_list(): - with setGrains({"a": "aval", "foo": "bar"}): + with set_grains({"a": "aval", "foo": "bar"}): # Force to overwrite a grain to a list ret = grains.present(name="foo", value=["l1", "l2"], force=True) assert ret["result"] is True assert ret["comment"] == "Set grain foo to ['l1', 'l2']" assert ret["changes"] == {"foo": ["l1", "l2"]} assert grains.__grains__ == {"a": "aval", "foo": ["l1", "l2"]} - assertGrainFileContent("a: aval\nfoo:\n- l1\n- l2\n") + assert_grain_file_content("a: aval\nfoo:\n- l1\n- l2\n") - with setGrains({"a": "aval", "foo": "bar"}): + with set_grains({"a": "aval", "foo": "bar"}): # Force setting a grain to a dict ret = grains.present(name="foo", value={"k1": "v1"}, force=True) assert ret["result"] is True assert ret["comment"] == "Set grain foo to {'k1': 'v1'}" assert ret["changes"] == {"foo": {"k1": "v1"}} assert grains.__grains__ == {"a": "aval", "foo": {"k1": "v1"}} - assertGrainFileContent("a: aval\nfoo:\n k1: v1\n") + assert_grain_file_content("a: aval\nfoo:\n k1: v1\n") - with setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): + with set_grains({"a": "aval", "foo": {"is": {"nested": "bar"}}}): # Force to overwrite a nested grain to a list ret = grains.present( name="foo,is,nested", value=["l1", "l2"], delimiter=",", force=True @@ -311,11 +301,11 @@ def test_present_force_to_set_dict_or_list(): "a": "aval", "foo": {"is": {"nested": ["l1", "l2"]}}, } - assertGrainFileContent( + assert_grain_file_content( "a: aval\nfoo:\n is:\n nested:\n - l1\n - l2\n" ) - with setGrains({"a": "aval", "foo": {"is": {"nested": "bar"}, "and": "other"}}): + with set_grains({"a": "aval", "foo": {"is": {"nested": "bar"}, "and": "other"}}): # Force setting a nested grain to a dict ret = grains.present(name="foo:is:nested", value={"k1": "v1"}, force=True) assert ret["result"] is True @@ -327,13 +317,13 @@ def test_present_force_to_set_dict_or_list(): "a": "aval", "foo": {"is": {"nested": {"k1": "v1"}}, "and": "other"}, } - assertGrainFileContent( + assert_grain_file_content( "a: aval\nfoo:\n and: other\n is:\n nested:\n k1: v1\n" ) def test_present_fails_to_convert_value_to_key(): - with setGrains({"a": "aval", "foo": "bar"}): + with set_grains({"a": "aval", "foo": "bar"}): # Fails converting a value to a nested grain key ret = grains.present(name="foo:is:nested", value={"k1": "v1"}) assert ret["result"] is False @@ -346,17 +336,17 @@ def test_present_fails_to_convert_value_to_key(): def test_present_overwrite_test(): with patch.dict(grains.__opts__, {"test": True}): - with setGrains({"a": "aval", "foo": "bar"}): + with set_grains({"a": "aval", "foo": "bar"}): # Overwrite an existing grain ret = grains.present(name="foo", value="newbar") assert ret["result"] is None assert ret["changes"] == {"changed": {"foo": "newbar"}} assert grains.__grains__ == {"a": "aval", "foo": "bar"} - assertGrainFileContent("a: aval\nfoo: bar\n") + assert_grain_file_content("a: aval\nfoo: bar\n") def test_present_convert_value_to_key(): - with setGrains({"a": "aval", "foo": "is"}): + with set_grains({"a": "aval", "foo": "is"}): # Converts a value to a nested grain key ret = grains.present(name="foo:is:nested", value={"k1": "v1"}) assert ret["result"] is True @@ -366,9 +356,9 @@ def test_present_convert_value_to_key(): "a": "aval", "foo": {"is": {"nested": {"k1": "v1"}}}, } - assertGrainFileContent("a: aval\nfoo:\n is:\n nested:\n k1: v1\n") + assert_grain_file_content("a: aval\nfoo:\n is:\n nested:\n k1: v1\n") - with setGrains({"a": "aval", "foo": ["one", "is", "correct"]}): + with set_grains({"a": "aval", "foo": ["one", "is", "correct"]}): # Converts a list element to a nested grain key ret = grains.present(name="foo:is:nested", value={"k1": "v1"}) assert ret["result"] is True @@ -380,7 +370,7 @@ def test_present_convert_value_to_key(): "a": "aval", "foo": ["one", {"is": {"nested": {"k1": "v1"}}}, "correct"], } - assertGrainFileContent( + assert_grain_file_content( "a: aval\nfoo:\n- one\n- is:\n nested:\n k1: v1\n- correct\n" ) @@ -388,14 +378,14 @@ def test_present_convert_value_to_key(): def test_present_unknown_failure(): with patch("salt.modules.grains.setval") as mocked_setval: mocked_setval.return_value = "Failed to set grain foo" - with setGrains({"a": "aval", "foo": "bar"}): + with set_grains({"a": "aval", "foo": "bar"}): # Unknown reason failure ret = grains.present(name="foo", value="baz") assert ret["result"] is False assert ret["comment"] == "Failed to set grain foo" assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval", "foo": "bar"} - assertGrainFileContent("a: aval\nfoo: bar\n") + assert_grain_file_content("a: aval\nfoo: bar\n") # 'absent' function tests: 6 @@ -403,45 +393,45 @@ def test_present_unknown_failure(): def test_absent_already(): # Unset a non existent grain - with setGrains({"a": "aval"}): + with set_grains({"a": "aval"}): ret = grains.absent(name="foo") assert ret["result"] is True assert ret["comment"] == "Grain foo does not exist" assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval"} - assertGrainFileContent("a: aval\n") + assert_grain_file_content("a: aval\n") # Unset a non existent nested grain - with setGrains({"a": "aval"}): + with set_grains({"a": "aval"}): ret = grains.absent(name="foo:is:nested") assert ret["result"] is True assert ret["comment"] == "Grain foo:is:nested does not exist" assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval"} - assertGrainFileContent("a: aval\n") + assert_grain_file_content("a: aval\n") def test_absent_unset(): # Unset a grain - with setGrains({"a": "aval", "foo": "bar"}): + with set_grains({"a": "aval", "foo": "bar"}): ret = grains.absent(name="foo") assert ret["result"] is True assert ret["comment"] == "Value for grain foo was set to None" assert ret["changes"] == {"grain": "foo", "value": None} assert grains.__grains__ == {"a": "aval", "foo": None} - assertGrainFileContent("a: aval\nfoo: null\n") + assert_grain_file_content("a: aval\nfoo: null\n") # Unset grain when its value is False - with setGrains({"a": "aval", "foo": False}): + with set_grains({"a": "aval", "foo": False}): ret = grains.absent(name="foo") assert ret["result"] is True assert ret["comment"] == "Value for grain foo was set to None" assert ret["changes"] == {"grain": "foo", "value": None} assert grains.__grains__ == {"a": "aval", "foo": None} - assertGrainFileContent("a: aval\nfoo: null\n") + assert_grain_file_content("a: aval\nfoo: null\n") # Unset a nested grain - with setGrains( + with set_grains( {"a": "aval", "foo": ["order", {"is": {"nested": "bar"}}, "correct"]} ): ret = grains.absent(name="foo,is,nested", delimiter=",") @@ -452,12 +442,12 @@ def test_absent_unset(): "a": "aval", "foo": ["order", {"is": {"nested": None}}, "correct"], } - assertGrainFileContent( + assert_grain_file_content( "a: aval\nfoo:\n- order\n- is:\n nested: null\n- correct\n" ) # Unset a nested value don't change anything - with setGrains({"a": "aval", "foo": ["order", {"is": "nested"}, "correct"]}): + with set_grains({"a": "aval", "foo": ["order", {"is": "nested"}, "correct"]}): ret = grains.absent(name="foo:is:nested") assert ret["result"] is True assert ret["comment"] == "Grain foo:is:nested does not exist" @@ -466,23 +456,23 @@ def test_absent_unset(): "a": "aval", "foo": ["order", {"is": "nested"}, "correct"], } - assertGrainFileContent("a: aval\nfoo:\n- order\n- is: nested\n- correct\n") + assert_grain_file_content("a: aval\nfoo:\n- order\n- is: nested\n- correct\n") def test_absent_unset_test(): with patch.dict(grains.__opts__, {"test": True}): - with setGrains({"a": "aval", "foo": "bar"}): + with set_grains({"a": "aval", "foo": "bar"}): # Overwrite an existing grain ret = grains.absent(name="foo") assert ret["result"] is None assert ret["changes"] == {"grain": "foo", "value": None} assert grains.__grains__ == {"a": "aval", "foo": "bar"} - assertGrainFileContent("a: aval\nfoo: bar\n") + assert_grain_file_content("a: aval\nfoo: bar\n") def test_absent_fails_nested_complex_grain(): # Unset a nested complex grain - with setGrains( + with set_grains( {"a": "aval", "foo": ["order", {"is": {"nested": "bar"}}, "correct"]} ): ret = grains.absent(name="foo:is") @@ -496,14 +486,14 @@ def test_absent_fails_nested_complex_grain(): "a": "aval", "foo": ["order", {"is": {"nested": "bar"}}, "correct"], } - assertGrainFileContent( + assert_grain_file_content( "a: aval\nfoo:\n- order\n- is:\n nested: bar\n- correct\n" ) def test_absent_force_nested_complex_grain(): # Unset a nested complex grain - with setGrains( + with set_grains( {"a": "aval", "foo": ["order", {"is": {"nested": "bar"}}, "correct"]} ): ret = grains.absent(name="foo:is", force=True) @@ -514,30 +504,30 @@ def test_absent_force_nested_complex_grain(): "a": "aval", "foo": ["order", {"is": None}, "correct"], } - assertGrainFileContent("a: aval\nfoo:\n- order\n- is: null\n- correct\n") + assert_grain_file_content("a: aval\nfoo:\n- order\n- is: null\n- correct\n") def test_absent_delete(): # Delete a grain - with setGrains({"a": "aval", "foo": "bar"}): + with set_grains({"a": "aval", "foo": "bar"}): ret = grains.absent(name="foo", destructive=True) assert ret["result"] is True assert ret["comment"] == "Grain foo was deleted" assert ret["changes"] == {"deleted": "foo"} assert grains.__grains__ == {"a": "aval"} - assertGrainFileContent("a: aval\n") + assert_grain_file_content("a: aval\n") # Delete a previously unset grain - with setGrains({"a": "aval", "foo": None}): + with set_grains({"a": "aval", "foo": None}): ret = grains.absent(name="foo", destructive=True) assert ret["result"] is True assert ret["comment"] == "Grain foo was deleted" assert ret["changes"] == {"deleted": "foo"} assert grains.__grains__ == {"a": "aval"} - assertGrainFileContent("a: aval\n") + assert_grain_file_content("a: aval\n") # Delete a nested grain - with setGrains( + with set_grains( { "a": "aval", "foo": [ @@ -555,7 +545,7 @@ def test_absent_delete(): "a": "aval", "foo": ["order", {"is": {"other": "value"}}, "correct"], } - assertGrainFileContent( + assert_grain_file_content( "a: aval\nfoo:\n- order\n- is:\n other: value\n- correct\n" ) @@ -565,40 +555,40 @@ def test_absent_delete(): def test_append(): # Append to an existing list - with setGrains({"a": "aval", "foo": ["bar"]}): + with set_grains({"a": "aval", "foo": ["bar"]}): ret = grains.append(name="foo", value="baz") assert ret["result"] is True assert ret["comment"] == "Value baz was added to grain foo" assert ret["changes"] == {"added": "baz"} assert grains.__grains__ == {"a": "aval", "foo": ["bar", "baz"]} - assertGrainFileContent("a: aval\nfoo:\n- bar\n- baz\n") + assert_grain_file_content("a: aval\nfoo:\n- bar\n- baz\n") def test_append_nested(): # Append to an existing nested list - with setGrains({"a": "aval", "foo": {"list": ["bar"]}}): + with set_grains({"a": "aval", "foo": {"list": ["bar"]}}): ret = grains.append(name="foo,list", value="baz", delimiter=",") assert ret["result"] is True assert ret["comment"] == "Value baz was added to grain foo:list" assert ret["changes"] == {"added": "baz"} assert grains.__grains__ == {"a": "aval", "foo": {"list": ["bar", "baz"]}} - assertGrainFileContent("a: aval\nfoo:\n list:\n - bar\n - baz\n") + assert_grain_file_content("a: aval\nfoo:\n list:\n - bar\n - baz\n") def test_append_already(): # Append to an existing list - with setGrains({"a": "aval", "foo": ["bar"]}): + with set_grains({"a": "aval", "foo": ["bar"]}): ret = grains.append(name="foo", value="bar") assert ret["result"] is True assert ret["comment"] == "Value bar is already in the list " + "for grain foo" assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval", "foo": ["bar"]} - assertGrainFileContent("a: aval\nfoo:\n- bar\n") + assert_grain_file_content("a: aval\nfoo:\n- bar\n") def test_append_fails_not_a_list(): # Fail to append to an existing grain, not a list - with setGrains({"a": "aval", "foo": {"bar": "val"}}): + with set_grains({"a": "aval", "foo": {"bar": "val"}}): ret = grains.append(name="foo", value="baz") assert ret["result"] is False assert ret["comment"] == "Grain foo is not a valid list" @@ -608,18 +598,18 @@ def test_append_fails_not_a_list(): def test_append_convert_to_list(): # Append to an existing grain, converting to a list - with setGrains({"a": "aval", "foo": {"bar": "val"}}): - assertGrainFileContent("a: aval\nfoo:\n bar: val\n") + with set_grains({"a": "aval", "foo": {"bar": "val"}}): + assert_grain_file_content("a: aval\nfoo:\n bar: val\n") ret = grains.append(name="foo", value="baz", convert=True) assert ret["result"] is True assert ret["comment"] == "Value baz was added to grain foo" assert ret["changes"] == {"added": "baz"} assert grains.__grains__ == {"a": "aval", "foo": [{"bar": "val"}, "baz"]} - assertGrainFileContent("a: aval\nfoo:\n- bar: val\n- baz\n") + assert_grain_file_content("a: aval\nfoo:\n- bar: val\n- baz\n") # Append to an existing grain, converting to a list a multi-value dict - with setGrains({"a": "aval", "foo": {"bar": "val", "other": "value"}}): - assertGrainFileContent("a: aval\nfoo:\n bar: val\n other: value\n") + with set_grains({"a": "aval", "foo": {"bar": "val", "other": "value"}}): + assert_grain_file_content("a: aval\nfoo:\n bar: val\n other: value\n") ret = grains.append(name="foo", value="baz", convert=True) assert ret["result"] is True assert ret["comment"] == "Value baz was added to grain foo" @@ -628,12 +618,12 @@ def test_append_convert_to_list(): "a": "aval", "foo": [{"bar": "val", "other": "value"}, "baz"], } - assertGrainFileContent("a: aval\nfoo:\n- bar: val\n other: value\n- baz\n") + assert_grain_file_content("a: aval\nfoo:\n- bar: val\n other: value\n- baz\n") def test_append_fails_inexistent(): # Append to a non existing grain - with setGrains({"a": "aval"}): + with set_grains({"a": "aval"}): ret = grains.append(name="foo", value="bar") assert ret["result"] is False assert ret["comment"] == "Grain foo does not exist" @@ -643,30 +633,30 @@ def test_append_fails_inexistent(): def test_append_convert_to_list_empty(): # Append to an existing list - with setGrains({"foo": None}): + with set_grains({"foo": None}): ret = grains.append(name="foo", value="baz", convert=True) assert ret["result"] is True assert ret["comment"] == "Value baz was added to grain foo" assert ret["changes"] == {"added": "baz"} assert grains.__grains__ == {"foo": ["baz"]} - assertGrainFileContent("foo:\n- baz\n") + assert_grain_file_content("foo:\n- baz\n") # 'list_present' function tests: 7 def test_list_present(): - with setGrains({"a": "aval", "foo": ["bar"]}): + with set_grains({"a": "aval", "foo": ["bar"]}): ret = grains.list_present(name="foo", value="baz") assert ret["result"] is True assert ret["comment"] == "Append value baz to grain foo" assert ret["changes"] == {"new": {"foo": ["bar", "baz"]}} assert grains.__grains__ == {"a": "aval", "foo": ["bar", "baz"]} - assertGrainFileContent("a: aval\nfoo:\n- bar\n- baz\n") + assert_grain_file_content("a: aval\nfoo:\n- bar\n- baz\n") def test_list_present_nested(): - with setGrains({"a": "aval", "foo": {"is": {"nested": ["bar"]}}}): + with set_grains({"a": "aval", "foo": {"is": {"nested": ["bar"]}}}): ret = grains.list_present(name="foo,is,nested", value="baz", delimiter=",") assert ret["result"] is True assert ret["comment"] == "Append value baz to grain foo:is:nested" @@ -675,63 +665,63 @@ def test_list_present_nested(): "a": "aval", "foo": {"is": {"nested": ["bar", "baz"]}}, } - assertGrainFileContent( + assert_grain_file_content( "a: aval\nfoo:\n is:\n nested:\n - bar\n - baz\n" ) def test_list_present_inexistent(): - with setGrains({"a": "aval"}): + with set_grains({"a": "aval"}): ret = grains.list_present(name="foo", value="baz") assert ret["result"] is True assert ret["comment"] == "Append value baz to grain foo" assert ret["changes"] == {"new": {"foo": ["baz"]}} assert grains.__grains__ == {"a": "aval", "foo": ["baz"]} - assertGrainFileContent("a: aval\nfoo:\n- baz\n") + assert_grain_file_content("a: aval\nfoo:\n- baz\n") def test_list_present_inexistent_nested(): - with setGrains({"a": "aval"}): + with set_grains({"a": "aval"}): ret = grains.list_present(name="foo:is:nested", value="baz") assert ret["result"] is True assert ret["comment"] == "Append value baz to grain foo:is:nested" assert ret["changes"] == {"new": {"foo": {"is": {"nested": ["baz"]}}}} assert grains.__grains__ == {"a": "aval", "foo": {"is": {"nested": ["baz"]}}} - assertGrainFileContent("a: aval\nfoo:\n is:\n nested:\n - baz\n") + assert_grain_file_content("a: aval\nfoo:\n is:\n nested:\n - baz\n") def test_list_present_not_a_list(): - with setGrains({"a": "aval", "foo": "bar"}): + with set_grains({"a": "aval", "foo": "bar"}): ret = grains.list_present(name="foo", value="baz") assert ret["result"] is False assert ret["comment"] == "Grain foo is not a valid list" assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval", "foo": "bar"} - assertGrainFileContent("a: aval\nfoo: bar\n") + assert_grain_file_content("a: aval\nfoo: bar\n") def test_list_present_nested_already(): - with setGrains({"a": "aval", "b": {"foo": ["bar"]}}): + with set_grains({"a": "aval", "b": {"foo": ["bar"]}}): ret = grains.list_present(name="b:foo", value="bar") assert ret["result"] is True assert ret["comment"] == "Value bar is already in grain b:foo" assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval", "b": {"foo": ["bar"]}} - assertGrainFileContent("a: aval\nb:\n foo:\n - bar\n") + assert_grain_file_content("a: aval\nb:\n foo:\n - bar\n") def test_list_present_already(): - with setGrains({"a": "aval", "foo": ["bar"]}): + with set_grains({"a": "aval", "foo": ["bar"]}): ret = grains.list_present(name="foo", value="bar") assert ret["result"] is True assert ret["comment"] == "Value bar is already in grain foo" assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval", "foo": ["bar"]} - assertGrainFileContent("a: aval\nfoo:\n- bar\n") + assert_grain_file_content("a: aval\nfoo:\n- bar\n") def test_list_present_unknown_failure(): - with setGrains({"a": "aval", "foo": ["bar"]}): + with set_grains({"a": "aval", "foo": ["bar"]}): # Unknown reason failure with patch.dict(grainsmod.__salt__, {"grains.append": MagicMock()}): @@ -740,67 +730,67 @@ def test_list_present_unknown_failure(): assert ret["comment"] == "Failed append value baz to grain foo" assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval", "foo": ["bar"]} - assertGrainFileContent("a: aval\nfoo:\n- bar\n") + assert_grain_file_content("a: aval\nfoo:\n- bar\n") # 'list_absent' function tests: 6 def test_list_absent(): - with setGrains({"a": "aval", "foo": ["bar"]}): + with set_grains({"a": "aval", "foo": ["bar"]}): ret = grains.list_absent(name="foo", value="bar") assert ret["result"] is True assert ret["comment"] == "Value bar was deleted from grain foo" assert ret["changes"] == {"deleted": ["bar"]} assert grains.__grains__ == {"a": "aval", "foo": []} - assertGrainFileContent("a: aval\nfoo: []\n") + assert_grain_file_content("a: aval\nfoo: []\n") def test_list_absent_nested(): - with setGrains({"a": "aval", "foo": {"list": ["bar"]}}): + with set_grains({"a": "aval", "foo": {"list": ["bar"]}}): ret = grains.list_absent(name="foo:list", value="bar") assert ret["result"] is True assert ret["comment"] == "Value bar was deleted from grain foo:list" assert ret["changes"] == {"deleted": ["bar"]} assert grains.__grains__ == {"a": "aval", "foo": {"list": []}} - assertGrainFileContent("a: aval\nfoo:\n list: []\n") + assert_grain_file_content("a: aval\nfoo:\n list: []\n") def test_list_absent_inexistent(): - with setGrains({"a": "aval"}): + with set_grains({"a": "aval"}): ret = grains.list_absent(name="foo", value="baz") assert ret["result"] is True assert ret["comment"] == "Grain foo does not exist" assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval"} - assertGrainFileContent("a: aval\n") + assert_grain_file_content("a: aval\n") def test_list_absent_inexistent_nested(): - with setGrains({"a": "aval"}): + with set_grains({"a": "aval"}): ret = grains.list_absent(name="foo:list", value="baz") assert ret["result"] is True assert ret["comment"] == "Grain foo:list does not exist" assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval"} - assertGrainFileContent("a: aval\n") + assert_grain_file_content("a: aval\n") def test_list_absent_not_a_list(): - with setGrains({"a": "aval", "foo": "bar"}): + with set_grains({"a": "aval", "foo": "bar"}): ret = grains.list_absent(name="foo", value="bar") assert ret["result"] is False assert ret["comment"] == "Grain foo is not a valid list" assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval", "foo": "bar"} - assertGrainFileContent("a: aval\nfoo: bar\n") + assert_grain_file_content("a: aval\nfoo: bar\n") def test_list_absent_already(): - with setGrains({"a": "aval", "foo": ["bar"]}): + with set_grains({"a": "aval", "foo": ["bar"]}): ret = grains.list_absent(name="foo", value="baz") assert ret["result"] is True assert ret["comment"] == "Value baz is absent from grain foo" assert ret["changes"] == {} assert grains.__grains__ == {"a": "aval", "foo": ["bar"]} - assertGrainFileContent("a: aval\nfoo:\n- bar\n") + assert_grain_file_content("a: aval\nfoo:\n- bar\n") From 4522bb2aba38254c73001b4c0e7a6bb166da53c1 Mon Sep 17 00:00:00 2001 From: Frode Gundersen Date: Fri, 13 Jan 2023 20:24:51 +0000 Subject: [PATCH 11/60] migrate test_tomcat to pytest --- tests/pytests/unit/modules/test_tomcat.py | 58 +++++++++++++++++++++++ tests/unit/modules/test_tomcat.py | 58 ----------------------- 2 files changed, 58 insertions(+), 58 deletions(-) create mode 100644 tests/pytests/unit/modules/test_tomcat.py delete mode 100644 tests/unit/modules/test_tomcat.py diff --git a/tests/pytests/unit/modules/test_tomcat.py b/tests/pytests/unit/modules/test_tomcat.py new file mode 100644 index 000000000000..869c3f96c851 --- /dev/null +++ b/tests/pytests/unit/modules/test_tomcat.py @@ -0,0 +1,58 @@ +""" + Tests cases for salt.modules.tomcat +""" + + +import io +import urllib.request + +import pytest + +import salt.modules.tomcat as tomcat +from tests.support.mock import MagicMock, patch + + +@pytest.fixture +def configure_loader_modules(): + return {tomcat: {}} + + +def test_tomcat_wget_no_bytestring(): + responses = { + "string": io.StringIO("Best response ever\r\nAnd you know it!"), + "bytes": io.BytesIO(b"Best response ever\r\nAnd you know it!"), + } + + string_mock = MagicMock(return_value=responses["string"]) + bytes_mock = MagicMock(return_value=responses["bytes"]) + with patch( + "salt.modules.tomcat._auth", + MagicMock( + return_value=urllib.request.build_opener( + urllib.request.HTTPBasicAuthHandler(), + urllib.request.HTTPDigestAuthHandler(), + ) + ), + ): + with patch("urllib.request.urlopen", string_mock): + response = tomcat._wget("tomcat.wait", url="http://localhost:8080/nofail") + for line in response["msg"]: + assert isinstance(line, str) + + with patch("urllib.request.urlopen", bytes_mock): + try: + response = tomcat._wget( + "tomcat.wait", url="http://localhost:8080/nofail" + ) + except TypeError as type_error: + if ( + type_error.args[0] + == "startswith first arg must be bytes or a tuple of bytes," + " not str" + ): + print("Got back a byte string, should've been a string") + else: + raise type_error + + for line in response["msg"]: + assert isinstance(line, str) diff --git a/tests/unit/modules/test_tomcat.py b/tests/unit/modules/test_tomcat.py deleted file mode 100644 index 4de0500b29f6..000000000000 --- a/tests/unit/modules/test_tomcat.py +++ /dev/null @@ -1,58 +0,0 @@ -import io -import urllib.request - -import salt.modules.tomcat as tomcat -from tests.support.mixins import LoaderModuleMockMixin -from tests.support.mock import MagicMock, patch -from tests.support.unit import TestCase - - -class TomcatTestCasse(TestCase, LoaderModuleMockMixin): - """ - Tests cases for salt.modules.tomcat - """ - - def setup_loader_modules(self): - return {tomcat: {}} - - def test_tomcat_wget_no_bytestring(self): - responses = { - "string": io.StringIO("Best response ever\r\nAnd you know it!"), - "bytes": io.BytesIO(b"Best response ever\r\nAnd you know it!"), - } - - string_mock = MagicMock(return_value=responses["string"]) - bytes_mock = MagicMock(return_value=responses["bytes"]) - with patch( - "salt.modules.tomcat._auth", - MagicMock( - return_value=urllib.request.build_opener( - urllib.request.HTTPBasicAuthHandler(), - urllib.request.HTTPDigestAuthHandler(), - ) - ), - ): - with patch("urllib.request.urlopen", string_mock): - response = tomcat._wget( - "tomcat.wait", url="http://localhost:8080/nofail" - ) - for line in response["msg"]: - self.assertIsInstance(line, str) - - with patch("urllib.request.urlopen", bytes_mock): - try: - response = tomcat._wget( - "tomcat.wait", url="http://localhost:8080/nofail" - ) - except TypeError as type_error: - if ( - type_error.args[0] - == "startswith first arg must be bytes or a tuple of bytes," - " not str" - ): - self.fail("Got back a byte string, should've been a string") - else: - raise type_error - - for line in response["msg"]: - self.assertIsInstance(line, str) From c392a77fe22262183cef40ff25452c0b87efdcfb Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Sat, 16 Dec 2023 16:30:59 -0700 Subject: [PATCH 12/60] make mac assistive tests more stable --- salt/modules/mac_assistive.py | 119 +++++++++++++++++----------------- 1 file changed, 58 insertions(+), 61 deletions(-) diff --git a/salt/modules/mac_assistive.py b/salt/modules/mac_assistive.py index 8583c40efba7..b43b8022c8d4 100644 --- a/salt/modules/mac_assistive.py +++ b/salt/modules/mac_assistive.py @@ -175,22 +175,21 @@ def __init__(self, path=None): def _check_table_digest(self): # This logic comes from https://github.com/jacobsalmela/tccutil which is # Licensed under GPL-2.0 - with self.connection as conn: - cursor = conn.execute( - "SELECT sql FROM sqlite_master WHERE name='access' and type='table'" - ) - for row in cursor.fetchall(): - digest = hashlib.sha1(row["sql"].encode()).hexdigest()[:10] - if digest in ("ecc443615f", "80a4bb6912"): - # Mojave and Catalina - self.ge_mojave_and_catalina = True - elif digest in ("3d1c2a0e97", "cef70648de"): - # BigSur and later - self.ge_bigsur_and_later = True - else: - raise CommandExecutionError( - "TCC Database structure unknown for digest '{}'".format(digest) - ) + cursor = self.connection.execute( + "SELECT sql FROM sqlite_master WHERE name='access' and type='table'" + ) + for row in cursor.fetchall(): + digest = hashlib.sha1(row["sql"].encode()).hexdigest()[:10] + if digest in ("ecc443615f", "80a4bb6912"): + # Mojave and Catalina + self.ge_mojave_and_catalina = True + elif digest in ("3d1c2a0e97", "cef70648de"): + # BigSur and later + self.ge_bigsur_and_later = True + else: + raise CommandExecutionError( + "TCC Database structure unknown for digest '{}'".format(digest) + ) def _get_client_type(self, app_id): if app_id[0] == "/": @@ -200,14 +199,13 @@ def _get_client_type(self, app_id): return 0 def installed(self, app_id): - with self.connection as conn: - cursor = conn.execute( - "SELECT * from access WHERE client=? and service='kTCCServiceAccessibility'", - (app_id,), - ) - for row in cursor.fetchall(): - if row: - return True + cursor = self.connection.execute( + "SELECT * from access WHERE client=? and service='kTCCServiceAccessibility'", + (app_id,), + ) + for row in cursor.fetchall(): + if row: + return True return False def install(self, app_id, enable=True): @@ -234,9 +232,8 @@ def install(self, app_id, enable=True): # indirect_object_identifier # ), # FOREIGN KEY (policy_id) REFERENCES policies(id) ON DELETE CASCADE ON UPDATE CASCADE); - with self.connection as conn: - conn.execute( - """ + self.connection.execute( + """ INSERT or REPLACE INTO access VALUES ( 'kTCCServiceAccessibility', ?, @@ -253,8 +250,9 @@ def install(self, app_id, enable=True): 0 ) """, - (app_id, client_type, auth_value), - ) + (app_id, client_type, auth_value), + ) + self.connection.commit() elif self.ge_mojave_and_catalina: # CREATE TABLE IF NOT EXISTS "access" ( # service TEXT NOT NULL, @@ -276,9 +274,8 @@ def install(self, app_id, enable=True): # indirect_object_identifier # ), # FOREIGN KEY (policy_id) REFERENCES policies(id) ON DELETE CASCADE ON UPDATE CASCADE); - with self.connection as conn: - conn.execute( - """ + self.connection.execute( + """ INSERT or REPLACE INTO access VALUES( 'kTCCServiceAccessibility', ?, @@ -294,8 +291,9 @@ def install(self, app_id, enable=True): 0 ) """, - (app_id, client_type, auth_value), - ) + (app_id, client_type, auth_value), + ) + self.connection.commit() return True def enabled(self, app_id): @@ -303,14 +301,13 @@ def enabled(self, app_id): column = "auth_value" elif self.ge_mojave_and_catalina: column = "allowed" - with self.connection as conn: - cursor = conn.execute( - "SELECT * from access WHERE client=? and service='kTCCServiceAccessibility'", - (app_id,), - ) - for row in cursor.fetchall(): - if row[column]: - return True + cursor = self.connection.execute( + "SELECT * from access WHERE client=? and service='kTCCServiceAccessibility'", + (app_id,), + ) + for row in cursor.fetchall(): + if row[column]: + return True return False def enable(self, app_id): @@ -320,13 +317,13 @@ def enable(self, app_id): column = "auth_value" elif self.ge_mojave_and_catalina: column = "allowed" - with self.connection as conn: - conn.execute( - "UPDATE access SET {} = ? WHERE client=? AND service IS 'kTCCServiceAccessibility'".format( - column - ), - (1, app_id), - ) + self.connection.execute( + "UPDATE access SET {} = ? WHERE client=? AND service IS 'kTCCServiceAccessibility'".format( + column + ), + (1, app_id), + ) + self.connection.commit() return True def disable(self, app_id): @@ -336,23 +333,23 @@ def disable(self, app_id): column = "auth_value" elif self.ge_mojave_and_catalina: column = "allowed" - with self.connection as conn: - conn.execute( - "UPDATE access SET {} = ? WHERE client=? AND service IS 'kTCCServiceAccessibility'".format( - column - ), - (0, app_id), - ) + self.connection.execute( + "UPDATE access SET {} = ? WHERE client=? AND service IS 'kTCCServiceAccessibility'".format( + column + ), + (0, app_id), + ) + self.connection.commit() return True def remove(self, app_id): if not self.installed(app_id): return False - with self.connection as conn: - conn.execute( - "DELETE from access where client IS ? AND service IS 'kTCCServiceAccessibility'", - (app_id,), - ) + self.connection.execute( + "DELETE from access where client IS ? AND service IS 'kTCCServiceAccessibility'", + (app_id,), + ) + self.connection.commit() return True def __enter__(self): From 01c194f53f6512275a0d068aa0af99ed49b1f80d Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Sat, 16 Dec 2023 18:04:31 -0700 Subject: [PATCH 13/60] Even more reliable pillar timeout test --- tests/pytests/integration/minion/test_return_retries.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/pytests/integration/minion/test_return_retries.py b/tests/pytests/integration/minion/test_return_retries.py index 24be4c396953..5e44d17317c8 100644 --- a/tests/pytests/integration/minion/test_return_retries.py +++ b/tests/pytests/integration/minion/test_return_retries.py @@ -64,6 +64,7 @@ def test_pillar_timeout(salt_master_factory): "auto_accept": True, "worker_threads": 2, "peer": True, + "minion_data_cache": False, } minion_overrides = { "auth_timeout": 20, @@ -77,7 +78,7 @@ def test_pillar_timeout(salt_master_factory): - name: example - changes: True - result: True - - comment: "Nothing has actually been changed" + - comment: "Nothing has actually been changed {{ pillar['foo'] }}" """ master = salt_master_factory.salt_master_daemon( "pillar-timeout-master", @@ -105,6 +106,7 @@ def test_pillar_timeout(salt_master_factory): ) with master.started(), minion1.started(), minion2.started(), minion3.started(), minion4.started(), sls_tempfile: proc = cli.run("state.sls", sls_name, minion_tgt="*") + print(proc) # At least one minion should have a Pillar timeout assert proc.returncode == 1 minion_timed_out = False From ac90b8455ec5e1317eb2852757ab4a3fd203bda2 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Sun, 17 Dec 2023 09:54:45 -0700 Subject: [PATCH 14/60] Try install multiple times --- salt/modules/mac_assistive.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/salt/modules/mac_assistive.py b/salt/modules/mac_assistive.py index b43b8022c8d4..789990529947 100644 --- a/salt/modules/mac_assistive.py +++ b/salt/modules/mac_assistive.py @@ -54,13 +54,18 @@ def install(app_id, enable=True): salt '*' assistive.install /usr/bin/osascript salt '*' assistive.install com.smileonmymac.textexpander """ - with TccDB() as db: - try: - return db.install(app_id, enable=enable) - except sqlite3.Error as exc: - raise CommandExecutionError( - "Error installing app({}): {}".format(app_id, exc) - ) + tires = 1 + while True: + with TccDB() as db: + try: + return db.install(app_id, enable=enable) + except sqlite3.Error as exc: + if tries <= 2: + time.sleep(10) + else: + raise CommandExecutionError( + "Error installing app({}): {}".format(app_id, exc) + ) def installed(app_id): From 62350b1dcfaf2ea204dc9d7405b761a124765171 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Sun, 17 Dec 2023 10:09:52 -0700 Subject: [PATCH 15/60] Fix lint --- salt/modules/mac_assistive.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/salt/modules/mac_assistive.py b/salt/modules/mac_assistive.py index 789990529947..132cfe70ea45 100644 --- a/salt/modules/mac_assistive.py +++ b/salt/modules/mac_assistive.py @@ -11,6 +11,7 @@ import hashlib import logging import sqlite3 +import time import salt.utils.platform import salt.utils.stringutils @@ -54,7 +55,7 @@ def install(app_id, enable=True): salt '*' assistive.install /usr/bin/osascript salt '*' assistive.install com.smileonmymac.textexpander """ - tires = 1 + tries = 1 while True: with TccDB() as db: try: @@ -62,6 +63,7 @@ def install(app_id, enable=True): except sqlite3.Error as exc: if tries <= 2: time.sleep(10) + tries += 1 else: raise CommandExecutionError( "Error installing app({}): {}".format(app_id, exc) From cca011e0b02e4a63e2bd0b43fe10696feba9643f Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Sun, 17 Dec 2023 14:44:30 -0700 Subject: [PATCH 16/60] Make re-tries configurable --- salt/modules/mac_assistive.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/salt/modules/mac_assistive.py b/salt/modules/mac_assistive.py index 132cfe70ea45..90ab8814146f 100644 --- a/salt/modules/mac_assistive.py +++ b/salt/modules/mac_assistive.py @@ -37,7 +37,7 @@ def __virtual__(): return __virtualname__ -def install(app_id, enable=True): +def install(app_id, enable=True, tries=3, wait=10): """ Install a bundle ID or command as being allowed to use assistive access. @@ -48,6 +48,12 @@ def install(app_id, enable=True): enabled Sets enabled or disabled status. Default is ``True``. + tries + How many times to try and write to a read-only tcc. Default is ``True``. + + wait + Number of seconds to wait between tries. Default is ``10``. + CLI Example: .. code-block:: bash @@ -55,15 +61,19 @@ def install(app_id, enable=True): salt '*' assistive.install /usr/bin/osascript salt '*' assistive.install com.smileonmymac.textexpander """ - tries = 1 + num_tries = 1 while True: with TccDB() as db: try: return db.install(app_id, enable=enable) except sqlite3.Error as exc: - if tries <= 2: - time.sleep(10) - tries += 1 + if "attempt to write a readonly database" not in str(exc): + raise CommandExecutionError( + "Error installing app({}): {}".format(app_id, exc) + ) + elif num_tries < tries: + time.sleep(wait) + num_tries += 1 else: raise CommandExecutionError( "Error installing app({}): {}".format(app_id, exc) From 77ffe2b13ddfb2c9f312560b2ef91c3fe7519738 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Sun, 17 Dec 2023 23:01:11 -0700 Subject: [PATCH 17/60] Even more reliable pillar_timeout test --- tests/pytests/integration/minion/test_return_retries.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/pytests/integration/minion/test_return_retries.py b/tests/pytests/integration/minion/test_return_retries.py index 5e44d17317c8..d6456e4a47e9 100644 --- a/tests/pytests/integration/minion/test_return_retries.py +++ b/tests/pytests/integration/minion/test_return_retries.py @@ -55,7 +55,7 @@ def test_publish_retry(salt_master, salt_minion_retry, salt_cli, salt_run_cli): @pytest.mark.slow_test def test_pillar_timeout(salt_master_factory): cmd = """ - python -c "import time; time.sleep(3.0); print('{\\"foo\\": \\"bar\\"}');\" + python -c "import time; time.sleep(5); print('{\\"foo\\": \\"bar\\"}');\" """.strip() master_overrides = { "ext_pillar": [ From 5b58900c6a0f36754b67e9ce43e25d794f9dcaa0 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Wed, 13 Dec 2023 17:13:57 -0700 Subject: [PATCH 18/60] Fix usage of __salt__ in __utils__ Fix cases where loaded execution modules call a __utils__ method which in-turn calls a execution module via __salt__ method. --- salt/loader/__init__.py | 4 +++ salt/loader/context.py | 9 ++++- tests/pytests/unit/loader/test_loader.py | 24 +++++++++++++ .../unit/loader/test_loading_modules.py | 35 +++++++++++++++++++ 4 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 tests/pytests/unit/loader/test_loading_modules.py diff --git a/salt/loader/__init__.py b/salt/loader/__init__.py index 8f2a69dc6b6c..38382a32a513 100644 --- a/salt/loader/__init__.py +++ b/salt/loader/__init__.py @@ -324,6 +324,10 @@ def minion_mods( pack_self="__salt__", ) + # Allow the usage of salt dunder in utils modules. + if utils and isinstance(utils, LazyLoader): + utils.pack["__salt__"] = ret + # Load any provider overrides from the configuration file providers option # Note: Providers can be pkg, service, user or group - not to be confused # with cloud providers. diff --git a/salt/loader/context.py b/salt/loader/context.py index 6bbfe4dbd815..560b05a8d2b3 100644 --- a/salt/loader/context.py +++ b/salt/loader/context.py @@ -12,6 +12,8 @@ # Py<3.7 import contextvars +import salt.exceptions + DEFAULT_CTX_VAR = "loader_ctxvar" loader_ctxvar = contextvars.ContextVar(DEFAULT_CTX_VAR) @@ -69,7 +71,12 @@ def value(self): return loader.pack[self.name] if self.name == loader.pack_self: return loader - return loader.pack[self.name] + try: + return loader.pack[self.name] + except KeyError: + raise salt.exceptions.LoaderError( + f"LazyLoader does not have a packed value for: {self.name}" + ) def get(self, key, default=None): return self.value().get(key, default) diff --git a/tests/pytests/unit/loader/test_loader.py b/tests/pytests/unit/loader/test_loader.py index f4a4b51a58fa..cb1a082b2a05 100644 --- a/tests/pytests/unit/loader/test_loader.py +++ b/tests/pytests/unit/loader/test_loader.py @@ -10,8 +10,10 @@ import pytest +import salt.exceptions import salt.loader import salt.loader.lazy +import tests.support.helpers @pytest.fixture @@ -62,3 +64,25 @@ def test_raw_mod_functions(): ret = salt.loader.raw_mod(opts, "grains", "get") for k, v in ret.items(): assert isinstance(v, salt.loader.lazy.LoadedFunc) + + +def test_named_loader_context_name_not_packed(tmp_path): + opts = { + "optimization_order": [0], + } + (tmp_path / "mymod.py").write_text( + tests.support.helpers.dedent( + """ + from salt.loader.dunder import loader_context + __not_packed__ = loader_context.named_context("__not_packed__") + def foobar(): + return __not_packed__["not.packed"]() + """ + ) + ) + loader = salt.loader.LazyLoader([tmp_path], opts) + with pytest.raises( + salt.exceptions.LoaderError, + match="LazyLoader does not have a packed value for: __not_packed__", + ): + loader["mymod.foobar"]() diff --git a/tests/pytests/unit/loader/test_loading_modules.py b/tests/pytests/unit/loader/test_loading_modules.py new file mode 100644 index 000000000000..36ba7a4a06ca --- /dev/null +++ b/tests/pytests/unit/loader/test_loading_modules.py @@ -0,0 +1,35 @@ +import pytest + +import salt.loader +import salt.loader.lazy + +import salt.modules.boto_vpc +import salt.modules.virt + + +@pytest.fixture +def minion_mods(minion_opts): + utils = salt.loader.utils(minion_opts) + return salt.loader.minion_mods(minion_opts, utils=utils) + + +@pytest.mark.skipIf(not salt.modules.boto_vpc.HAS_BOTO, "boto must be installed.") +def test_load_boto_vpc(minion_mods): + func = None + try: + func = minion_mods["boto_vpc.check_vpc"] + except KeyError: + pytest.fail("loader should not raise KeyError") + assert func is not None + assert isinstance(func, salt.loader.lazy.LoadedFunc) + + +@pytest.mark.skipIf(not salt.modules.virt.HAS_LIBVIRT, "libvirt-python must be installed.") +def test_load_virt(minion_mods): + func = None + try: + func = minion_mods["virt.ctrl_alt_del"] + except KeyError: + pytest.fail("loader should not raise KeyError") + assert func is not None + assert isinstance(func, salt.loader.lazy.LoadedFunc) From 57d046a7db3395f0c9cd4a93eb643c1f291f2833 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Wed, 13 Dec 2023 17:18:19 -0700 Subject: [PATCH 19/60] Add changelog for #65691 --- changelog/65691.fixed.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/65691.fixed.md diff --git a/changelog/65691.fixed.md b/changelog/65691.fixed.md new file mode 100644 index 000000000000..3b5192f80c07 --- /dev/null +++ b/changelog/65691.fixed.md @@ -0,0 +1 @@ +Fix boto execution module loading From 76343092f8f424f628e03995e7d439cbacf3c004 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Thu, 14 Dec 2023 14:49:30 -0700 Subject: [PATCH 20/60] Proper test skip --- tests/pytests/unit/loader/test_loader.py | 20 ++++++++----------- .../unit/loader/test_loading_modules.py | 9 ++++++--- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/tests/pytests/unit/loader/test_loader.py b/tests/pytests/unit/loader/test_loader.py index cb1a082b2a05..3c26b435c8c0 100644 --- a/tests/pytests/unit/loader/test_loader.py +++ b/tests/pytests/unit/loader/test_loader.py @@ -13,7 +13,6 @@ import salt.exceptions import salt.loader import salt.loader.lazy -import tests.support.helpers @pytest.fixture @@ -70,19 +69,16 @@ def test_named_loader_context_name_not_packed(tmp_path): opts = { "optimization_order": [0], } - (tmp_path / "mymod.py").write_text( - tests.support.helpers.dedent( - """ + contents = """ from salt.loader.dunder import loader_context __not_packed__ = loader_context.named_context("__not_packed__") def foobar(): return __not_packed__["not.packed"]() """ - ) - ) - loader = salt.loader.LazyLoader([tmp_path], opts) - with pytest.raises( - salt.exceptions.LoaderError, - match="LazyLoader does not have a packed value for: __not_packed__", - ): - loader["mymod.foobar"]() + with pytest.helpers.temp_file("mymod.py", contents, directory=tmp_path): + loader = salt.loader.LazyLoader([tmp_path], opts) + with pytest.raises( + salt.exceptions.LoaderError, + match="LazyLoader does not have a packed value for: __not_packed__", + ): + loader["mymod.foobar"]() diff --git a/tests/pytests/unit/loader/test_loading_modules.py b/tests/pytests/unit/loader/test_loading_modules.py index 36ba7a4a06ca..861e9197ecf0 100644 --- a/tests/pytests/unit/loader/test_loading_modules.py +++ b/tests/pytests/unit/loader/test_loading_modules.py @@ -2,7 +2,6 @@ import salt.loader import salt.loader.lazy - import salt.modules.boto_vpc import salt.modules.virt @@ -13,7 +12,9 @@ def minion_mods(minion_opts): return salt.loader.minion_mods(minion_opts, utils=utils) -@pytest.mark.skipIf(not salt.modules.boto_vpc.HAS_BOTO, "boto must be installed.") +@pytest.mark.skipif( + not salt.modules.boto_vpc.HAS_BOTO, reason="boto must be installed." +) def test_load_boto_vpc(minion_mods): func = None try: @@ -24,7 +25,9 @@ def test_load_boto_vpc(minion_mods): assert isinstance(func, salt.loader.lazy.LoadedFunc) -@pytest.mark.skipIf(not salt.modules.virt.HAS_LIBVIRT, "libvirt-python must be installed.") +@pytest.mark.skipif( + not salt.modules.virt.HAS_LIBVIRT, reason="libvirt-python must be installed." +) def test_load_virt(minion_mods): func = None try: From 4e6624412d37be3fc32ae26ed656634b8e8a0fbd Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Mon, 18 Dec 2023 00:37:52 -0700 Subject: [PATCH 21/60] Fix vault tests --- salt/utils/vault.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/salt/utils/vault.py b/salt/utils/vault.py index cbd2aec2b0b1..07fcf3929b1d 100644 --- a/salt/utils/vault.py +++ b/salt/utils/vault.py @@ -36,8 +36,9 @@ def __virtual__(): logging.getLogger("requests").setLevel(logging.WARNING) return True except Exception as e: # pylint: disable=broad-except - log.error("Could not load __salt__: %s", e) + log.error("Could not load __salt__: %s", e, exc_info=True) return False + return True def _get_token_and_url_from_master(): From ea65abcd588deec7bb1dfc4b1f655f169866a709 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Mon, 18 Dec 2023 17:26:51 -0700 Subject: [PATCH 22/60] Fix up test and close minion channels --- salt/minion.py | 18 +++++++++++++++++- .../integration/minion/test_return_retries.py | 4 ++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/salt/minion.py b/salt/minion.py index 29afda235042..0c5c77a91e50 100644 --- a/salt/minion.py +++ b/salt/minion.py @@ -1286,6 +1286,7 @@ def __init__( self.ready = False self.jid_queue = [] if jid_queue is None else jid_queue self.periodic_callbacks = {} + self.req_channel = None if io_loop is None: self.io_loop = salt.ext.tornado.ioloop.IOLoop.current() @@ -1396,6 +1397,16 @@ def connect_master(self, failed=False): """ Return a future which will complete when you are connected to a master """ + if hasattr(self, "pub_channel") and self.pub_channel: + self.pub_channel.on_recv(None) + if hasattr(self.pub_channel, "auth"): + self.pub_channel.auth.invalidate() + if hasattr(self.pub_channel, "close"): + self.pub_channel.close() + if hasattr(self, "req_channel") and self.req_channel: + self.req_channel.close() + self.req_channel = None + # Consider refactoring so that eval_master does not have a subtle side-effect on the contents of the opts array master, self.pub_channel = yield self.eval_master( self.opts, self.timeout, self.safe, failed @@ -2870,7 +2881,9 @@ def handle_event(self, package): self.pub_channel.auth.invalidate() if hasattr(self.pub_channel, "close"): self.pub_channel.close() - del self.pub_channel + if hasattr(self, "req_channel") and self.req_channel: + self.req_channel.close() + self.req_channel = None # if eval_master finds a new master for us, self.connected # will be True again on successful master authentication @@ -3303,6 +3316,9 @@ def destroy(self): if hasattr(self.pub_channel, "close"): self.pub_channel.close() del self.pub_channel + if hasattr(self, "req_channel") and self.req_channel: + self.req_channel.close() + self.req_channel = None if hasattr(self, "periodic_callbacks"): for cb in self.periodic_callbacks.values(): cb.stop() diff --git a/tests/pytests/integration/minion/test_return_retries.py b/tests/pytests/integration/minion/test_return_retries.py index d6456e4a47e9..feefdfac6a12 100644 --- a/tests/pytests/integration/minion/test_return_retries.py +++ b/tests/pytests/integration/minion/test_return_retries.py @@ -28,7 +28,7 @@ def salt_minion_retry(salt_master, salt_minion_id): @pytest.mark.slow_test def test_publish_retry(salt_master, salt_minion_retry, salt_cli, salt_run_cli): # run job that takes some time for warmup - rtn = salt_cli.run("test.sleep", "5", "--async", minion_tgt=salt_minion_retry.id) + rtn = salt_cli.run("test.sleep", "3.5", "--async", minion_tgt=salt_minion_retry.id) # obtain JID jid = rtn.stdout.strip().split(" ")[-1] @@ -55,7 +55,7 @@ def test_publish_retry(salt_master, salt_minion_retry, salt_cli, salt_run_cli): @pytest.mark.slow_test def test_pillar_timeout(salt_master_factory): cmd = """ - python -c "import time; time.sleep(5); print('{\\"foo\\": \\"bar\\"}');\" + python -c "import time; time.sleep(4); print('{\\"foo\\": \\"bar\\"}');\" """.strip() master_overrides = { "ext_pillar": [ From d53fb4cade66f52c1be4ee9e1340d7d57d9698b8 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Mon, 18 Dec 2023 22:44:40 -0700 Subject: [PATCH 23/60] Even more reliable pillar timeout test --- .../integration/minion/test_return_retries.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/pytests/integration/minion/test_return_retries.py b/tests/pytests/integration/minion/test_return_retries.py index feefdfac6a12..f70609cdb1ad 100644 --- a/tests/pytests/integration/minion/test_return_retries.py +++ b/tests/pytests/integration/minion/test_return_retries.py @@ -3,6 +3,8 @@ import pytest from saltfactories.utils import random_string +import salt.utils.files + @pytest.fixture(scope="function") def salt_minion_retry(salt_master, salt_minion_id): @@ -53,13 +55,15 @@ def test_publish_retry(salt_master, salt_minion_retry, salt_cli, salt_run_cli): @pytest.mark.slow_test -def test_pillar_timeout(salt_master_factory): - cmd = """ - python -c "import time; time.sleep(4); print('{\\"foo\\": \\"bar\\"}');\" - """.strip() +def test_pillar_timeout(salt_master_factory, tmp_path): + cmd = 'print(\'{"foo": "bar"}\');\n' + + with salt.utils.files.fopen(tmp_path / "script.py", "w") as fp: + fp.write(cmd) + master_overrides = { "ext_pillar": [ - {"cmd_json": cmd}, + {"cmd_json": f"python {tmp_path / 'script.py'}"}, ], "auto_accept": True, "worker_threads": 2, @@ -105,8 +109,10 @@ def test_pillar_timeout(salt_master_factory): "{}.sls".format(sls_name), sls_contents ) with master.started(), minion1.started(), minion2.started(), minion3.started(), minion4.started(), sls_tempfile: + cmd = 'import time; time.sleep(6); print(\'{"foo": "bang"}\');\n' + with salt.utils.files.fopen(tmp_path / "script.py", "w") as fp: + fp.write(cmd) proc = cli.run("state.sls", sls_name, minion_tgt="*") - print(proc) # At least one minion should have a Pillar timeout assert proc.returncode == 1 minion_timed_out = False From 76ec03ac64da5e52cbcd6c57df6990079ef6fcc2 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Tue, 19 Dec 2023 10:20:33 -0700 Subject: [PATCH 24/60] Add explicit timeout for test_salt_documentation test --- tests/pytests/integration/cli/test_matcher.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/pytests/integration/cli/test_matcher.py b/tests/pytests/integration/cli/test_matcher.py index 2e91eba7ad41..5d3ef4e3309e 100644 --- a/tests/pytests/integration/cli/test_matcher.py +++ b/tests/pytests/integration/cli/test_matcher.py @@ -506,7 +506,9 @@ def test_salt_documentation(salt_cli, salt_minion): """ Test to see if we're supporting --doc """ - ret = salt_cli.run("-d", "test", minion_tgt=salt_minion.id) + # Setting an explicity long timeout otherwise this test may fail when the + # system is under load. + ret = salt_cli.run("-d", "test", minion_tgt=salt_minion.id, _timeout=90) assert ret.returncode == 0 assert "test.ping" in ret.data From a57fb1c82e39272bcdff43d6bf81cd832f7716fe Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Thu, 21 Dec 2023 21:02:49 -0700 Subject: [PATCH 25/60] Increase beacon add timeout for more reliable test --- tests/pytests/scenarios/multimaster/beacons/test_inotify.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/pytests/scenarios/multimaster/beacons/test_inotify.py b/tests/pytests/scenarios/multimaster/beacons/test_inotify.py index c16384d7b6fb..16babf1cf742 100644 --- a/tests/pytests/scenarios/multimaster/beacons/test_inotify.py +++ b/tests/pytests/scenarios/multimaster/beacons/test_inotify.py @@ -46,6 +46,7 @@ def setup_beacons(mm_master_1_salt_cli, salt_mm_minion_1, inotify_test_path): "inotify", beacon_data=[{"files": {str(inotify_test_path): {"mask": ["create"]}}}], minion_tgt=salt_mm_minion_1.id, + timeout=60, ) assert ret.returncode == 0 log.debug("Inotify beacon add returned: %s", ret.data or ret.stdout) From 048028466a8b6a29493d495140d7e09217c37d9a Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Thu, 21 Dec 2023 22:59:05 -0700 Subject: [PATCH 26/60] Do not add dunder salt outside of loader context --- salt/utils/azurearm.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/salt/utils/azurearm.py b/salt/utils/azurearm.py index 276cbb66b369..9ae128273cc2 100644 --- a/salt/utils/azurearm.py +++ b/salt/utils/azurearm.py @@ -47,8 +47,6 @@ except ImportError: HAS_AZURE = False -__opts__ = salt.config.minion_config("/etc/salt/minion") -__salt__ = salt.loader.minion_mods(__opts__) log = logging.getLogger(__name__) From 4a8908cd11eb5200ce0dea1af129a1d6b3f95a0f Mon Sep 17 00:00:00 2001 From: David Murphy < dmurphy@saltstack.com> Date: Wed, 20 Dec 2023 10:14:37 -0700 Subject: [PATCH 27/60] Ensure initial _sync_grains only occurs if masterless minion in class SMinion initialization --- changelog/65692.fixed.md | 1 + salt/minion.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelog/65692.fixed.md diff --git a/changelog/65692.fixed.md b/changelog/65692.fixed.md new file mode 100644 index 000000000000..8dc59a2f5626 --- /dev/null +++ b/changelog/65692.fixed.md @@ -0,0 +1 @@ +Ensure initial _sync_grains only occurs if masterless minion in class SMinion initialization diff --git a/salt/minion.py b/salt/minion.py index 0c5c77a91e50..196e919e6269 100644 --- a/salt/minion.py +++ b/salt/minion.py @@ -116,7 +116,8 @@ def _sync_grains(opts): # need sync of custom grains as may be used in pillar compilation - # if coming up initially and remote client, the first sync _grains + # if coming up initially and local client (masterless minion) + # if local client (masterless minion), the first sync _grains # doesn't have opts["master_uri"] set yet during the sync, so need # to force local, otherwise will throw an exception when attempting # to retrieve opts["master_uri"] when retrieving key for remote communication @@ -129,7 +130,7 @@ def _sync_grains(opts): if opts.get("extmod_blacklist", None) is None: opts["extmod_blacklist"] = {} - if opts.get("file_client", "remote") == "remote" and not opts.get( + if opts.get("file_client", "remote") == "local" and not opts.get( "master_uri", None ): salt.utils.extmods.sync(opts, "grains", force_local=True) From 7b0c0afdc376761a8858b946cbff747c1b690e52 Mon Sep 17 00:00:00 2001 From: David Murphy < dmurphy@saltstack.com> Date: Wed, 20 Dec 2023 13:34:09 -0700 Subject: [PATCH 28/60] Updated _sync_grains to only operate if masterless minion --- salt/minion.py | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/salt/minion.py b/salt/minion.py index 196e919e6269..7c5bd5798b80 100644 --- a/salt/minion.py +++ b/salt/minion.py @@ -115,27 +115,21 @@ def _sync_grains(opts): - # need sync of custom grains as may be used in pillar compilation - # if coming up initially and local client (masterless minion) - # if local client (masterless minion), the first sync _grains - # doesn't have opts["master_uri"] set yet during the sync, so need - # to force local, otherwise will throw an exception when attempting - # to retrieve opts["master_uri"] when retrieving key for remote communication - # in addition opts sometimes does not contain extmod_whitelist and extmod_blacklist - # hence set those to defaults, empty dict, if not part of opts, as ref'd in + # if local client (masterless minion), need sync of custom grains + # as they may be used in pillar compilation + # in addition, with masterless minion some opts may not be filled + # at this point of syncing,for example sometimes does not contain + # extmod_whitelist and extmod_blacklist hence set those to defaults, + # empty dict, if not part of opts, as ref'd in # salt.utils.extmod sync function - if opts.get("extmod_whitelist", None) is None: - opts["extmod_whitelist"] = {} + if "local" == opts.get("file_client", "remote"): + if opts.get("extmod_whitelist", None) is None: + opts["extmod_whitelist"] = {} - if opts.get("extmod_blacklist", None) is None: - opts["extmod_blacklist"] = {} + if opts.get("extmod_blacklist", None) is None: + opts["extmod_blacklist"] = {} - if opts.get("file_client", "remote") == "local" and not opts.get( - "master_uri", None - ): salt.utils.extmods.sync(opts, "grains", force_local=True) - else: - salt.utils.extmods.sync(opts, "grains") def resolve_dns(opts, fallback=True): From 70c22eff6262e247f26ff3ef1e69b833c7f777c3 Mon Sep 17 00:00:00 2001 From: David Murphy < dmurphy@saltstack.com> Date: Wed, 20 Dec 2023 14:52:50 -0700 Subject: [PATCH 29/60] Removed PR 65185 changes since incomplete solution --- changelog/65692.fixed.md | 2 +- salt/fileclient.py | 7 +- salt/minion.py | 19 ----- salt/utils/extmods.py | 5 +- .../pytests/integration/cli/test_salt_call.py | 71 ------------------- 5 files changed, 4 insertions(+), 100 deletions(-) diff --git a/changelog/65692.fixed.md b/changelog/65692.fixed.md index 8dc59a2f5626..b4eef6c93d46 100644 --- a/changelog/65692.fixed.md +++ b/changelog/65692.fixed.md @@ -1 +1 @@ -Ensure initial _sync_grains only occurs if masterless minion in class SMinion initialization +Removed PR 65185 changes since incomplete solution diff --git a/salt/fileclient.py b/salt/fileclient.py index 42e7120aab18..443861cc03fd 100644 --- a/salt/fileclient.py +++ b/salt/fileclient.py @@ -45,15 +45,12 @@ MAX_FILENAME_LENGTH = 255 -def get_file_client(opts, pillar=False, force_local=False): +def get_file_client(opts, pillar=False): """ Read in the ``file_client`` option and return the correct type of file server """ - if force_local: - client = "local" - else: - client = opts.get("file_client", "remote") + client = opts.get("file_client", "remote") if pillar and client == "local": client = "pillar" diff --git a/salt/minion.py b/salt/minion.py index 7c5bd5798b80..15d46b2dacf9 100644 --- a/salt/minion.py +++ b/salt/minion.py @@ -114,24 +114,6 @@ # 6. Handle publications -def _sync_grains(opts): - # if local client (masterless minion), need sync of custom grains - # as they may be used in pillar compilation - # in addition, with masterless minion some opts may not be filled - # at this point of syncing,for example sometimes does not contain - # extmod_whitelist and extmod_blacklist hence set those to defaults, - # empty dict, if not part of opts, as ref'd in - # salt.utils.extmod sync function - if "local" == opts.get("file_client", "remote"): - if opts.get("extmod_whitelist", None) is None: - opts["extmod_whitelist"] = {} - - if opts.get("extmod_blacklist", None) is None: - opts["extmod_blacklist"] = {} - - salt.utils.extmods.sync(opts, "grains", force_local=True) - - def resolve_dns(opts, fallback=True): """ Resolves the master_ip and master_uri options @@ -939,7 +921,6 @@ def __init__(self, opts, context=None): # Late setup of the opts grains, so we can log from the grains module import salt.loader - _sync_grains(opts) opts["grains"] = salt.loader.grains(opts) super().__init__(opts) diff --git a/salt/utils/extmods.py b/salt/utils/extmods.py index 6a4d5c14440c..a7dc265476f5 100644 --- a/salt/utils/extmods.py +++ b/salt/utils/extmods.py @@ -39,7 +39,6 @@ def sync( saltenv=None, extmod_whitelist=None, extmod_blacklist=None, - force_local=False, ): """ Sync custom modules into the extension_modules directory @@ -83,9 +82,7 @@ def sync( "Cannot create cache module directory %s. Check permissions.", mod_dir, ) - with salt.fileclient.get_file_client( - opts, pillar=False, force_local=force_local - ) as fileclient: + with salt.fileclient.get_file_client(opts) as fileclient: for sub_env in saltenv: log.info("Syncing %s for environment '%s'", form, sub_env) cache = [] diff --git a/tests/pytests/integration/cli/test_salt_call.py b/tests/pytests/integration/cli/test_salt_call.py index b1af43050e1d..6aa6730ec5c2 100644 --- a/tests/pytests/integration/cli/test_salt_call.py +++ b/tests/pytests/integration/cli/test_salt_call.py @@ -429,74 +429,3 @@ def test_local_salt_call_no_function_no_retcode(salt_call_cli): assert "test" in ret.data assert ret.data["test"] == "'test' is not available." assert "test.echo" in ret.data - - -def test_state_highstate_custom_grains(salt_master, salt_minion_factory): - """ - This test ensure that custom grains in salt://_grains are loaded before pillar compilation - to ensure that any use of custom grains in pillar files are available, this implies that - a sync of grains occurs before loading the regular /etc/salt/grains or configuration file - grains, as well as the usual grains. - - Note: cannot use salt_minion and salt_call_cli, since these will be loaded before - the pillar and custom_grains files are written, hence using salt_minion_factory. - """ - pillar_top_sls = """ - base: - '*': - - defaults - """ - - pillar_defaults_sls = """ - mypillar: "{{ grains['custom_grain'] }}" - """ - - salt_top_sls = """ - base: - '*': - - test - """ - - salt_test_sls = """ - "donothing": - test.nop: [] - """ - - salt_custom_grains_py = """ - def main(): - return {'custom_grain': 'test_value'} - """ - assert salt_master.is_running() - with salt_minion_factory.started(): - salt_minion = salt_minion_factory - salt_call_cli = salt_minion_factory.salt_call_cli() - with salt_minion.pillar_tree.base.temp_file( - "top.sls", pillar_top_sls - ), salt_minion.pillar_tree.base.temp_file( - "defaults.sls", pillar_defaults_sls - ), salt_minion.state_tree.base.temp_file( - "top.sls", salt_top_sls - ), salt_minion.state_tree.base.temp_file( - "test.sls", salt_test_sls - ), salt_minion.state_tree.base.temp_file( - "_grains/custom_grain.py", salt_custom_grains_py - ): - ret = salt_call_cli.run("--local", "state.highstate") - assert ret.returncode == 0 - ret = salt_call_cli.run("--local", "pillar.items") - assert ret.returncode == 0 - assert ret.data - pillar_items = ret.data - assert "mypillar" in pillar_items - assert pillar_items["mypillar"] == "test_value" - - -def test_salt_call_versions(salt_call_cli, caplog): - """ - Call test.versions without '--local' to test grains - are sync'd without any missing keys in opts - """ - with caplog.at_level(logging.DEBUG): - ret = salt_call_cli.run("test.versions") - assert ret.returncode == 0 - assert "Failed to sync grains module: 'master_uri'" not in caplog.messages From 478e2e243957f53a7536151932d2df13b47a7957 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 26 Dec 2023 06:29:18 +0000 Subject: [PATCH 30/60] Append the `.0` for Photon OS, after checking supported versions Signed-off-by: Pedro Algarvio --- tools/pkg/repo/create.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/pkg/repo/create.py b/tools/pkg/repo/create.py index 3e94575639e2..382ffdd0998d 100644 --- a/tools/pkg/repo/create.py +++ b/tools/pkg/repo/create.py @@ -381,13 +381,14 @@ def rpm( assert repo_path is not None assert key_id is not None - if distro == "photon": - distro_version = f"{distro_version}.0" display_name = f"{distro.capitalize()} {distro_version}" if distro_version not in _rpm_distro_info[distro]: ctx.error(f"Support for {display_name} is missing.") ctx.exit(1) + if distro == "photon": + distro_version = f"{distro_version}.0" + ctx.info("Creating repository directory structure ...") create_repo_path = create_top_level_repo_path( ctx, From 15616715d40580e12391c10d38ef337b23c1d237 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 26 Dec 2023 06:55:39 +0000 Subject: [PATCH 31/60] Bump to `paramiko==3.4.0` due to https://github.com/advisories/GHSA-45x7-px36-x8w8 A dependency of paramiko also had to be upgraded, `bcrypt==4.1.2` Signed-off-by: Pedro Algarvio --- requirements/static/ci/py3.10/cloud.txt | 7 ++----- requirements/static/ci/py3.10/darwin.txt | 4 ++-- requirements/static/ci/py3.10/freebsd.txt | 4 ++-- requirements/static/ci/py3.10/lint.txt | 7 ++----- requirements/static/ci/py3.10/linux.txt | 4 ++-- requirements/static/ci/py3.10/windows.txt | 2 +- requirements/static/ci/py3.11/cloud.txt | 7 ++----- requirements/static/ci/py3.11/darwin.txt | 2 +- requirements/static/ci/py3.11/freebsd.txt | 4 ++-- requirements/static/ci/py3.11/lint.txt | 7 ++----- requirements/static/ci/py3.11/linux.txt | 4 ++-- requirements/static/ci/py3.11/windows.txt | 2 +- requirements/static/ci/py3.12/cloud.txt | 7 ++----- requirements/static/ci/py3.12/darwin.txt | 2 +- requirements/static/ci/py3.12/freebsd.txt | 4 ++-- requirements/static/ci/py3.12/lint.txt | 7 ++----- requirements/static/ci/py3.12/linux.txt | 4 ++-- requirements/static/ci/py3.12/windows.txt | 2 +- requirements/static/ci/py3.7/cloud.txt | 7 ++----- requirements/static/ci/py3.7/freebsd.txt | 4 ++-- requirements/static/ci/py3.7/lint.txt | 7 ++----- requirements/static/ci/py3.7/linux.txt | 4 ++-- requirements/static/ci/py3.7/windows.txt | 2 +- requirements/static/ci/py3.8/cloud.txt | 7 ++----- requirements/static/ci/py3.8/freebsd.txt | 4 ++-- requirements/static/ci/py3.8/lint.txt | 7 ++----- requirements/static/ci/py3.8/linux.txt | 4 ++-- requirements/static/ci/py3.8/windows.txt | 2 +- requirements/static/ci/py3.9/cloud.txt | 7 ++----- requirements/static/ci/py3.9/darwin.txt | 4 ++-- requirements/static/ci/py3.9/freebsd.txt | 4 ++-- requirements/static/ci/py3.9/lint.txt | 7 ++----- requirements/static/ci/py3.9/linux.txt | 4 ++-- requirements/static/ci/py3.9/windows.txt | 2 +- 34 files changed, 60 insertions(+), 96 deletions(-) diff --git a/requirements/static/ci/py3.10/cloud.txt b/requirements/static/ci/py3.10/cloud.txt index 2b962a7a2ed2..ead86ebfed81 100644 --- a/requirements/static/ci/py3.10/cloud.txt +++ b/requirements/static/ci/py3.10/cloud.txt @@ -40,7 +40,7 @@ backports.entry-points-selectable==1.1.0 # via # -c requirements/static/ci/py3.10/linux.txt # virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.10/linux.txt # -r requirements/static/ci/common.in @@ -84,7 +84,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.10/linux.txt # -c requirements/static/ci/py3.10/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pynacl charset-normalizer==3.2.0 @@ -360,7 +359,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.10/linux.txt # -r requirements/static/ci/common.in @@ -612,7 +611,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.10/linux.txt # -c requirements/static/ci/py3.10/linux.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -624,7 +622,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # profitbricks # pypsexec # python-dateutil diff --git a/requirements/static/ci/py3.10/darwin.txt b/requirements/static/ci/py3.10/darwin.txt index f27842ae66be..1465e05a154b 100644 --- a/requirements/static/ci/py3.10/darwin.txt +++ b/requirements/static/ci/py3.10/darwin.txt @@ -30,7 +30,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -258,7 +258,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 +paramiko==3.4.0 # via # junos-eznc # ncclient diff --git a/requirements/static/ci/py3.10/freebsd.txt b/requirements/static/ci/py3.10/freebsd.txt index 95a14846949a..159f0840e340 100644 --- a/requirements/static/ci/py3.10/freebsd.txt +++ b/requirements/static/ci/py3.10/freebsd.txt @@ -27,7 +27,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -250,7 +250,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 # via # -r requirements/static/ci/common.in # junos-eznc diff --git a/requirements/static/ci/py3.10/lint.txt b/requirements/static/ci/py3.10/lint.txt index 1d62be50e88a..ab2d132518c6 100644 --- a/requirements/static/ci/py3.10/lint.txt +++ b/requirements/static/ci/py3.10/lint.txt @@ -48,7 +48,7 @@ backports.entry-points-selectable==1.1.0 # via # -c requirements/static/ci/py3.10/linux.txt # virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.10/linux.txt # -r requirements/static/ci/common.in @@ -94,7 +94,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.10/linux.txt # -c requirements/static/ci/py3.10/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -364,7 +363,7 @@ packaging==22.0 # -r requirements/base.txt # ansible-core # docker -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.10/linux.txt # -r requirements/static/ci/common.in @@ -593,7 +592,6 @@ six==1.16.0 # -c requirements/static/ci/py3.10/linux.txt # apscheduler # astroid - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -605,7 +603,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.10/linux.txt b/requirements/static/ci/py3.10/linux.txt index 2cdc0f15e6a6..a1eba6120df3 100644 --- a/requirements/static/ci/py3.10/linux.txt +++ b/requirements/static/ci/py3.10/linux.txt @@ -33,7 +33,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -261,7 +261,7 @@ packaging==22.0 # ansible-core # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 # via # -r requirements/static/ci/common.in # junos-eznc diff --git a/requirements/static/ci/py3.10/windows.txt b/requirements/static/ci/py3.10/windows.txt index 08d00aea31b4..18fb61e7cfcb 100644 --- a/requirements/static/ci/py3.10/windows.txt +++ b/requirements/static/ci/py3.10/windows.txt @@ -19,7 +19,7 @@ attrs==23.1.0 # pytest-shell-utilities # pytest-skip-markers # pytest-system-statistics -bcrypt==4.0.1 +bcrypt==4.1.2 # via -r requirements/static/ci/common.in boto3==1.21.46 # via diff --git a/requirements/static/ci/py3.11/cloud.txt b/requirements/static/ci/py3.11/cloud.txt index e8493764de5c..08cf932132e1 100644 --- a/requirements/static/ci/py3.11/cloud.txt +++ b/requirements/static/ci/py3.11/cloud.txt @@ -36,7 +36,7 @@ backports.entry-points-selectable==1.1.0 # via # -c requirements/static/ci/py3.11/linux.txt # virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.11/linux.txt # -r requirements/static/ci/common.in @@ -80,7 +80,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.11/linux.txt # -c requirements/static/ci/py3.11/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pynacl charset-normalizer==3.2.0 @@ -335,7 +334,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.11/linux.txt # -r requirements/static/ci/common.in @@ -570,7 +569,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.11/linux.txt # -c requirements/static/ci/py3.11/linux.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -580,7 +578,6 @@ six==1.16.0 # kazoo # kubernetes # more-itertools - # paramiko # profitbricks # pypsexec # python-dateutil diff --git a/requirements/static/ci/py3.11/darwin.txt b/requirements/static/ci/py3.11/darwin.txt index 2607474a10f2..56a960215550 100644 --- a/requirements/static/ci/py3.11/darwin.txt +++ b/requirements/static/ci/py3.11/darwin.txt @@ -28,7 +28,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via -r requirements/static/ci/common.in boto3==1.21.46 # via diff --git a/requirements/static/ci/py3.11/freebsd.txt b/requirements/static/ci/py3.11/freebsd.txt index 4f701987b635..2a62a094fc3c 100644 --- a/requirements/static/ci/py3.11/freebsd.txt +++ b/requirements/static/ci/py3.11/freebsd.txt @@ -25,7 +25,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -235,7 +235,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 # via -r requirements/static/ci/common.in passlib==1.7.4 # via -r requirements/static/ci/common.in diff --git a/requirements/static/ci/py3.11/lint.txt b/requirements/static/ci/py3.11/lint.txt index cb69e4dad8ca..77cf1719f3b8 100644 --- a/requirements/static/ci/py3.11/lint.txt +++ b/requirements/static/ci/py3.11/lint.txt @@ -44,7 +44,7 @@ backports.entry-points-selectable==1.1.0 # via # -c requirements/static/ci/py3.11/linux.txt # virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.11/linux.txt # -r requirements/static/ci/common.in @@ -90,7 +90,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.11/linux.txt # -c requirements/static/ci/py3.11/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -342,7 +341,7 @@ packaging==22.0 # -r requirements/base.txt # ansible-core # docker -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.11/linux.txt # -r requirements/static/ci/common.in @@ -554,7 +553,6 @@ six==1.16.0 # -c requirements/static/ci/py3.11/linux.txt # apscheduler # astroid - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -564,7 +562,6 @@ six==1.16.0 # kazoo # kubernetes # more-itertools - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.11/linux.txt b/requirements/static/ci/py3.11/linux.txt index 633139c5000b..0ebf5835257e 100644 --- a/requirements/static/ci/py3.11/linux.txt +++ b/requirements/static/ci/py3.11/linux.txt @@ -31,7 +31,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -246,7 +246,7 @@ packaging==22.0 # ansible-core # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 # via -r requirements/static/ci/common.in passlib==1.7.4 # via -r requirements/static/ci/common.in diff --git a/requirements/static/ci/py3.11/windows.txt b/requirements/static/ci/py3.11/windows.txt index 3a7a9c755669..5b49ddbefe94 100644 --- a/requirements/static/ci/py3.11/windows.txt +++ b/requirements/static/ci/py3.11/windows.txt @@ -17,7 +17,7 @@ attrs==23.1.0 # pytest-shell-utilities # pytest-skip-markers # pytest-system-statistics -bcrypt==4.0.1 +bcrypt==4.1.2 # via -r requirements/static/ci/common.in boto3==1.21.46 # via diff --git a/requirements/static/ci/py3.12/cloud.txt b/requirements/static/ci/py3.12/cloud.txt index 7fd5de1764ff..88e09b3c09e8 100644 --- a/requirements/static/ci/py3.12/cloud.txt +++ b/requirements/static/ci/py3.12/cloud.txt @@ -36,7 +36,7 @@ backports.entry-points-selectable==1.1.0 # via # -c requirements/static/ci/py3.12/linux.txt # virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.12/linux.txt # -r requirements/static/ci/common.in @@ -80,7 +80,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.12/linux.txt # -c requirements/static/ci/py3.12/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pynacl charset-normalizer==3.2.0 @@ -335,7 +334,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.12/linux.txt # -r requirements/static/ci/common.in @@ -570,7 +569,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.12/linux.txt # -c requirements/static/ci/py3.12/linux.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -580,7 +578,6 @@ six==1.16.0 # kazoo # kubernetes # more-itertools - # paramiko # profitbricks # pypsexec # python-dateutil diff --git a/requirements/static/ci/py3.12/darwin.txt b/requirements/static/ci/py3.12/darwin.txt index bee058e2de71..e22a5e4b809f 100644 --- a/requirements/static/ci/py3.12/darwin.txt +++ b/requirements/static/ci/py3.12/darwin.txt @@ -28,7 +28,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via -r requirements/static/ci/common.in boto3==1.21.46 # via diff --git a/requirements/static/ci/py3.12/freebsd.txt b/requirements/static/ci/py3.12/freebsd.txt index 4a8b0e37df98..80f65e6217d4 100644 --- a/requirements/static/ci/py3.12/freebsd.txt +++ b/requirements/static/ci/py3.12/freebsd.txt @@ -25,7 +25,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -235,7 +235,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 # via -r requirements/static/ci/common.in passlib==1.7.4 # via -r requirements/static/ci/common.in diff --git a/requirements/static/ci/py3.12/lint.txt b/requirements/static/ci/py3.12/lint.txt index 1b76109d7393..d9bc8cc01a01 100644 --- a/requirements/static/ci/py3.12/lint.txt +++ b/requirements/static/ci/py3.12/lint.txt @@ -44,7 +44,7 @@ backports.entry-points-selectable==1.1.0 # via # -c requirements/static/ci/py3.12/linux.txt # virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.12/linux.txt # -r requirements/static/ci/common.in @@ -90,7 +90,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.12/linux.txt # -c requirements/static/ci/py3.12/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -342,7 +341,7 @@ packaging==22.0 # -r requirements/base.txt # ansible-core # docker -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.12/linux.txt # -r requirements/static/ci/common.in @@ -554,7 +553,6 @@ six==1.16.0 # -c requirements/static/ci/py3.12/linux.txt # apscheduler # astroid - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -564,7 +562,6 @@ six==1.16.0 # kazoo # kubernetes # more-itertools - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.12/linux.txt b/requirements/static/ci/py3.12/linux.txt index 7873144f0523..371e4c5114cc 100644 --- a/requirements/static/ci/py3.12/linux.txt +++ b/requirements/static/ci/py3.12/linux.txt @@ -31,7 +31,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -246,7 +246,7 @@ packaging==22.0 # ansible-core # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 # via -r requirements/static/ci/common.in passlib==1.7.4 # via -r requirements/static/ci/common.in diff --git a/requirements/static/ci/py3.12/windows.txt b/requirements/static/ci/py3.12/windows.txt index 863e89886965..db8775c0c379 100644 --- a/requirements/static/ci/py3.12/windows.txt +++ b/requirements/static/ci/py3.12/windows.txt @@ -17,7 +17,7 @@ attrs==23.1.0 # pytest-shell-utilities # pytest-skip-markers # pytest-system-statistics -bcrypt==4.0.1 +bcrypt==4.1.2 # via -r requirements/static/ci/common.in boto3==1.21.46 # via diff --git a/requirements/static/ci/py3.7/cloud.txt b/requirements/static/ci/py3.7/cloud.txt index 43b872f936d5..ff42754208ee 100644 --- a/requirements/static/ci/py3.7/cloud.txt +++ b/requirements/static/ci/py3.7/cloud.txt @@ -44,7 +44,7 @@ backports.entry-points-selectable==1.1.0 # via # -c requirements/static/ci/py3.7/linux.txt # virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.7/linux.txt # -r requirements/static/ci/common.in @@ -88,7 +88,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.7/linux.txt # -c requirements/static/ci/py3.7/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pynacl @@ -405,7 +404,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.7/linux.txt # -r requirements/static/ci/common.in @@ -667,7 +666,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.7/linux.txt # -c requirements/static/ci/py3.7/linux.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -679,7 +677,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # profitbricks # pypsexec # python-dateutil diff --git a/requirements/static/ci/py3.7/freebsd.txt b/requirements/static/ci/py3.7/freebsd.txt index cca81480e6df..c14b5d8d76f3 100644 --- a/requirements/static/ci/py3.7/freebsd.txt +++ b/requirements/static/ci/py3.7/freebsd.txt @@ -29,7 +29,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -286,7 +286,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 # via # -r requirements/static/ci/common.in # junos-eznc diff --git a/requirements/static/ci/py3.7/lint.txt b/requirements/static/ci/py3.7/lint.txt index 5ad5a03f4f68..ab45fb203363 100644 --- a/requirements/static/ci/py3.7/lint.txt +++ b/requirements/static/ci/py3.7/lint.txt @@ -56,7 +56,7 @@ backports.zoneinfo==0.2.1 # via # -c requirements/static/ci/py3.7/linux.txt # tzlocal -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.7/linux.txt # -r requirements/static/ci/common.in @@ -106,7 +106,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.7/linux.txt # -c requirements/static/ci/py3.7/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pygit2 @@ -415,7 +414,7 @@ packaging==22.0 # -r requirements/base.txt # ansible-core # docker -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.7/linux.txt # -r requirements/static/ci/common.in @@ -654,7 +653,6 @@ six==1.16.0 # -c requirements/static/ci/py3.7/linux.txt # apscheduler # astroid - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -666,7 +664,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.7/linux.txt b/requirements/static/ci/py3.7/linux.txt index 5973155bed13..e9a97f4a62f9 100644 --- a/requirements/static/ci/py3.7/linux.txt +++ b/requirements/static/ci/py3.7/linux.txt @@ -37,7 +37,7 @@ backports.entry-points-selectable==1.1.0 # via virtualenv backports.zoneinfo==0.2.1 # via tzlocal -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -299,7 +299,7 @@ packaging==22.0 # ansible-core # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 # via # -r requirements/static/ci/common.in # junos-eznc diff --git a/requirements/static/ci/py3.7/windows.txt b/requirements/static/ci/py3.7/windows.txt index 26df2e6b4601..2f58f7a7fc1d 100644 --- a/requirements/static/ci/py3.7/windows.txt +++ b/requirements/static/ci/py3.7/windows.txt @@ -23,7 +23,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==4.0.1 +bcrypt==4.1.2 # via -r requirements/static/ci/common.in boto3==1.21.46 # via diff --git a/requirements/static/ci/py3.8/cloud.txt b/requirements/static/ci/py3.8/cloud.txt index e04c55630b0c..0b9ffde4b9aa 100644 --- a/requirements/static/ci/py3.8/cloud.txt +++ b/requirements/static/ci/py3.8/cloud.txt @@ -40,7 +40,7 @@ backports.entry-points-selectable==1.1.0 # via # -c requirements/static/ci/py3.8/linux.txt # virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.8/linux.txt # -r requirements/static/ci/common.in @@ -84,7 +84,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.8/linux.txt # -c requirements/static/ci/py3.8/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pynacl @@ -392,7 +391,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.8/linux.txt # -r requirements/static/ci/common.in @@ -654,7 +653,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.8/linux.txt # -c requirements/static/ci/py3.8/linux.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -666,7 +664,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # profitbricks # pypsexec # python-dateutil diff --git a/requirements/static/ci/py3.8/freebsd.txt b/requirements/static/ci/py3.8/freebsd.txt index 486a8ad0ac29..34b57f6e2896 100644 --- a/requirements/static/ci/py3.8/freebsd.txt +++ b/requirements/static/ci/py3.8/freebsd.txt @@ -27,7 +27,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -273,7 +273,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 # via # -r requirements/static/ci/common.in # junos-eznc diff --git a/requirements/static/ci/py3.8/lint.txt b/requirements/static/ci/py3.8/lint.txt index d4d26cab35e3..dc7137c9cd74 100644 --- a/requirements/static/ci/py3.8/lint.txt +++ b/requirements/static/ci/py3.8/lint.txt @@ -52,7 +52,7 @@ backports.zoneinfo==0.2.1 # via # -c requirements/static/ci/py3.8/linux.txt # tzlocal -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.8/linux.txt # -r requirements/static/ci/common.in @@ -98,7 +98,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.8/linux.txt # -c requirements/static/ci/py3.8/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pygit2 @@ -400,7 +399,7 @@ packaging==22.0 # -r requirements/base.txt # ansible-core # docker -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.8/linux.txt # -r requirements/static/ci/common.in @@ -639,7 +638,6 @@ six==1.16.0 # -c requirements/static/ci/py3.8/linux.txt # apscheduler # astroid - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -651,7 +649,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.8/linux.txt b/requirements/static/ci/py3.8/linux.txt index 1349031a8091..afc5c517d332 100644 --- a/requirements/static/ci/py3.8/linux.txt +++ b/requirements/static/ci/py3.8/linux.txt @@ -35,7 +35,7 @@ backports.entry-points-selectable==1.1.0 # via virtualenv backports.zoneinfo==0.2.1 # via tzlocal -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -286,7 +286,7 @@ packaging==22.0 # ansible-core # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 # via # -r requirements/static/ci/common.in # junos-eznc diff --git a/requirements/static/ci/py3.8/windows.txt b/requirements/static/ci/py3.8/windows.txt index 1fb470c86dcb..a1ff9cae9963 100644 --- a/requirements/static/ci/py3.8/windows.txt +++ b/requirements/static/ci/py3.8/windows.txt @@ -21,7 +21,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==4.0.1 +bcrypt==4.1.2 # via -r requirements/static/ci/common.in boto3==1.21.46 # via diff --git a/requirements/static/ci/py3.9/cloud.txt b/requirements/static/ci/py3.9/cloud.txt index 49fb9216523c..03e3fb8a7e6e 100644 --- a/requirements/static/ci/py3.9/cloud.txt +++ b/requirements/static/ci/py3.9/cloud.txt @@ -40,7 +40,7 @@ backports.entry-points-selectable==1.1.0 # via # -c requirements/static/ci/py3.9/linux.txt # virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.9/linux.txt # -r requirements/static/ci/common.in @@ -84,7 +84,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.9/linux.txt # -c requirements/static/ci/py3.9/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pynacl @@ -392,7 +391,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.9/linux.txt # -r requirements/static/ci/common.in @@ -656,7 +655,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.9/linux.txt # -c requirements/static/ci/py3.9/linux.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -668,7 +666,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # profitbricks # pypsexec # python-dateutil diff --git a/requirements/static/ci/py3.9/darwin.txt b/requirements/static/ci/py3.9/darwin.txt index 4500475ede2a..69ba32505a83 100644 --- a/requirements/static/ci/py3.9/darwin.txt +++ b/requirements/static/ci/py3.9/darwin.txt @@ -30,7 +30,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -281,7 +281,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 +paramiko==3.4.0 # via # junos-eznc # napalm diff --git a/requirements/static/ci/py3.9/freebsd.txt b/requirements/static/ci/py3.9/freebsd.txt index 569dc344f7d6..f869631343b1 100644 --- a/requirements/static/ci/py3.9/freebsd.txt +++ b/requirements/static/ci/py3.9/freebsd.txt @@ -27,7 +27,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -273,7 +273,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 # via # -r requirements/static/ci/common.in # junos-eznc diff --git a/requirements/static/ci/py3.9/lint.txt b/requirements/static/ci/py3.9/lint.txt index bad348247b8a..b9ade888daef 100644 --- a/requirements/static/ci/py3.9/lint.txt +++ b/requirements/static/ci/py3.9/lint.txt @@ -48,7 +48,7 @@ backports.entry-points-selectable==1.1.0 # via # -c requirements/static/ci/py3.9/linux.txt # virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -c requirements/static/ci/py3.9/linux.txt # -r requirements/static/ci/common.in @@ -94,7 +94,6 @@ cffi==1.14.6 # -c requirements/static/ci/../pkg/py3.9/linux.txt # -c requirements/static/ci/py3.9/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pygit2 @@ -396,7 +395,7 @@ packaging==22.0 # -r requirements/base.txt # ansible-core # docker -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -c requirements/static/ci/py3.9/linux.txt # -r requirements/static/ci/common.in @@ -637,7 +636,6 @@ six==1.16.0 # -c requirements/static/ci/py3.9/linux.txt # apscheduler # astroid - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -649,7 +647,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.9/linux.txt b/requirements/static/ci/py3.9/linux.txt index 8f5611c0f920..e54e13fb7116 100644 --- a/requirements/static/ci/py3.9/linux.txt +++ b/requirements/static/ci/py3.9/linux.txt @@ -33,7 +33,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==3.1.6 +bcrypt==4.1.2 # via # -r requirements/static/ci/common.in # paramiko @@ -284,7 +284,7 @@ packaging==22.0 # ansible-core # docker # pytest -paramiko==2.10.1 ; sys_platform != "win32" and sys_platform != "darwin" +paramiko==3.4.0 # via # -r requirements/static/ci/common.in # junos-eznc diff --git a/requirements/static/ci/py3.9/windows.txt b/requirements/static/ci/py3.9/windows.txt index dcb2c3e4a6b2..264902fc0819 100644 --- a/requirements/static/ci/py3.9/windows.txt +++ b/requirements/static/ci/py3.9/windows.txt @@ -21,7 +21,7 @@ attrs==23.1.0 # pytest-system-statistics backports.entry-points-selectable==1.1.0 # via virtualenv -bcrypt==4.0.1 +bcrypt==4.1.2 # via -r requirements/static/ci/common.in boto3==1.21.46 # via From abe92390c36d6afbe377a2f7c718718e47326e7a Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Wed, 27 Dec 2023 11:15:09 -0700 Subject: [PATCH 32/60] Fix nonsensical in fileclient timeout error message --- changelog/65752.fixed.md | 1 + salt/fileclient.py | 2 +- tests/pytests/unit/fileclient/test_fileclient.py | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelog/65752.fixed.md diff --git a/changelog/65752.fixed.md b/changelog/65752.fixed.md new file mode 100644 index 000000000000..f611c5e65ec8 --- /dev/null +++ b/changelog/65752.fixed.md @@ -0,0 +1 @@ +Fix nonsensical time in fileclient timeout error. diff --git a/salt/fileclient.py b/salt/fileclient.py index 443861cc03fd..321f41996ab8 100644 --- a/salt/fileclient.py +++ b/salt/fileclient.py @@ -1157,7 +1157,7 @@ def _channel_send(self, load, raw=False): ) except salt.exceptions.SaltReqTimeoutError: raise SaltClientError( - f"File client timed out after {int(time.time() - start)}" + f"File client timed out after {int(time.monotonic() - start)}" ) def destroy(self): diff --git a/tests/pytests/unit/fileclient/test_fileclient.py b/tests/pytests/unit/fileclient/test_fileclient.py index 0e072e5c36f4..f5cfce92eeca 100644 --- a/tests/pytests/unit/fileclient/test_fileclient.py +++ b/tests/pytests/unit/fileclient/test_fileclient.py @@ -126,7 +126,8 @@ def mock_dumps(*args): # Crypticle must return bytes to pass to transport.RequestClient.send client.auth._crypticle = Mock() client.auth._crypticle.dumps = mock_dumps - with pytest.raises(salt.exceptions.SaltClientError): + msg = r"^File client timed out after \d{1,4}$" + with pytest.raises(salt.exceptions.SaltClientError, match=msg): client.file_list() From f118440daedff65d5747390c4b005994b69ab0c8 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Wed, 27 Dec 2023 12:24:08 -0700 Subject: [PATCH 33/60] Add unit to timeout value --- salt/fileclient.py | 2 +- tests/pytests/unit/fileclient/test_fileclient.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/fileclient.py b/salt/fileclient.py index 321f41996ab8..5929c1dbdc23 100644 --- a/salt/fileclient.py +++ b/salt/fileclient.py @@ -1157,7 +1157,7 @@ def _channel_send(self, load, raw=False): ) except salt.exceptions.SaltReqTimeoutError: raise SaltClientError( - f"File client timed out after {int(time.monotonic() - start)}" + f"File client timed out after {int(time.monotonic() - start)} seconds" ) def destroy(self): diff --git a/tests/pytests/unit/fileclient/test_fileclient.py b/tests/pytests/unit/fileclient/test_fileclient.py index f5cfce92eeca..cbdbd763313c 100644 --- a/tests/pytests/unit/fileclient/test_fileclient.py +++ b/tests/pytests/unit/fileclient/test_fileclient.py @@ -126,7 +126,7 @@ def mock_dumps(*args): # Crypticle must return bytes to pass to transport.RequestClient.send client.auth._crypticle = Mock() client.auth._crypticle.dumps = mock_dumps - msg = r"^File client timed out after \d{1,4}$" + msg = r"^File client timed out after \d{1,4} seconds$" with pytest.raises(salt.exceptions.SaltClientError, match=msg): client.file_list() From f6ec1d874424d863e006c47ccf72540493d5a00c Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Wed, 27 Dec 2023 12:24:26 -0700 Subject: [PATCH 34/60] Validate pillar timeout message --- tests/pytests/unit/pillar/test_pillar.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/pytests/unit/pillar/test_pillar.py b/tests/pytests/unit/pillar/test_pillar.py index 11eda34318be..77e25527cf1e 100644 --- a/tests/pytests/unit/pillar/test_pillar.py +++ b/tests/pytests/unit/pillar/test_pillar.py @@ -173,5 +173,6 @@ def test_remote_pillar_timeout(temp_salt_minion, tmp_path): mock = MagicMock() mock.side_effect = salt.exceptions.SaltReqTimeoutError() pillar.channel.crypted_transfer_decode_dictentry = mock + msg = r"^Pillar timed out after \d{1,4} seconds$" with pytest.raises(salt.exceptions.SaltClientError): pillar.compile_pillar() From 0106e1dbf64a05eb48b452575f799b830fa61a36 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Sat, 30 Dec 2023 01:34:25 -0700 Subject: [PATCH 35/60] Fix pre-commit --- requirements/static/ci/py3.10/darwin.txt | 3 --- requirements/static/ci/py3.10/freebsd.txt | 5 +---- requirements/static/ci/py3.10/linux.txt | 5 +---- requirements/static/ci/py3.11/darwin.txt | 2 -- requirements/static/ci/py3.11/freebsd.txt | 5 +---- requirements/static/ci/py3.11/linux.txt | 5 +---- requirements/static/ci/py3.12/darwin.txt | 2 -- requirements/static/ci/py3.12/freebsd.txt | 5 +---- requirements/static/ci/py3.12/linux.txt | 5 +---- requirements/static/ci/py3.7/freebsd.txt | 5 +---- requirements/static/ci/py3.7/linux.txt | 5 +---- requirements/static/ci/py3.8/freebsd.txt | 5 +---- requirements/static/ci/py3.8/linux.txt | 5 +---- requirements/static/ci/py3.9/darwin.txt | 3 --- requirements/static/ci/py3.9/freebsd.txt | 5 +---- requirements/static/ci/py3.9/linux.txt | 5 +---- 16 files changed, 12 insertions(+), 58 deletions(-) diff --git a/requirements/static/ci/py3.10/darwin.txt b/requirements/static/ci/py3.10/darwin.txt index 1465e05a154b..16753a6d8ecb 100644 --- a/requirements/static/ci/py3.10/darwin.txt +++ b/requirements/static/ci/py3.10/darwin.txt @@ -61,7 +61,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.10/darwin.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -426,7 +425,6 @@ setproctitle==1.3.2 six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.10/darwin.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -436,7 +434,6 @@ six==1.16.0 # junos-eznc # kubernetes # ncclient - # paramiko # python-dateutil # pyvmomi # responses diff --git a/requirements/static/ci/py3.10/freebsd.txt b/requirements/static/ci/py3.10/freebsd.txt index 159f0840e340..652da67d8042 100644 --- a/requirements/static/ci/py3.10/freebsd.txt +++ b/requirements/static/ci/py3.10/freebsd.txt @@ -58,7 +58,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.10/freebsd.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -250,7 +249,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==3.4.0 +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -r requirements/static/ci/common.in # junos-eznc @@ -418,7 +417,6 @@ setproctitle==1.3.2 six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.10/freebsd.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -430,7 +428,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-dateutil # pyvmomi # responses diff --git a/requirements/static/ci/py3.10/linux.txt b/requirements/static/ci/py3.10/linux.txt index a1eba6120df3..11c7d86fe4a4 100644 --- a/requirements/static/ci/py3.10/linux.txt +++ b/requirements/static/ci/py3.10/linux.txt @@ -67,7 +67,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.10/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -261,7 +260,7 @@ packaging==22.0 # ansible-core # docker # pytest -paramiko==3.4.0 +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -r requirements/static/ci/common.in # junos-eznc @@ -456,7 +455,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.10/linux.txt # apscheduler - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -468,7 +466,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.11/darwin.txt b/requirements/static/ci/py3.11/darwin.txt index 56a960215550..782eb706c9a9 100644 --- a/requirements/static/ci/py3.11/darwin.txt +++ b/requirements/static/ci/py3.11/darwin.txt @@ -57,7 +57,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.11/darwin.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -394,7 +393,6 @@ setproctitle==1.3.2 six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.11/darwin.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py diff --git a/requirements/static/ci/py3.11/freebsd.txt b/requirements/static/ci/py3.11/freebsd.txt index 2a62a094fc3c..c43b1ad59054 100644 --- a/requirements/static/ci/py3.11/freebsd.txt +++ b/requirements/static/ci/py3.11/freebsd.txt @@ -56,7 +56,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.11/freebsd.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -235,7 +234,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==3.4.0 +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via -r requirements/static/ci/common.in passlib==1.7.4 # via -r requirements/static/ci/common.in @@ -391,7 +390,6 @@ setproctitle==1.3.2 six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.11/freebsd.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -401,7 +399,6 @@ six==1.16.0 # kazoo # kubernetes # more-itertools - # paramiko # python-dateutil # pyvmomi # responses diff --git a/requirements/static/ci/py3.11/linux.txt b/requirements/static/ci/py3.11/linux.txt index 0ebf5835257e..ebc412a971c9 100644 --- a/requirements/static/ci/py3.11/linux.txt +++ b/requirements/static/ci/py3.11/linux.txt @@ -65,7 +65,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.11/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -246,7 +245,7 @@ packaging==22.0 # ansible-core # docker # pytest -paramiko==3.4.0 +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via -r requirements/static/ci/common.in passlib==1.7.4 # via -r requirements/static/ci/common.in @@ -429,7 +428,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.11/linux.txt # apscheduler - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -439,7 +437,6 @@ six==1.16.0 # kazoo # kubernetes # more-itertools - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.12/darwin.txt b/requirements/static/ci/py3.12/darwin.txt index e22a5e4b809f..73d0da16da49 100644 --- a/requirements/static/ci/py3.12/darwin.txt +++ b/requirements/static/ci/py3.12/darwin.txt @@ -57,7 +57,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.12/darwin.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -394,7 +393,6 @@ setproctitle==1.3.2 six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.12/darwin.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py diff --git a/requirements/static/ci/py3.12/freebsd.txt b/requirements/static/ci/py3.12/freebsd.txt index 80f65e6217d4..ba227a016f47 100644 --- a/requirements/static/ci/py3.12/freebsd.txt +++ b/requirements/static/ci/py3.12/freebsd.txt @@ -56,7 +56,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.12/freebsd.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -235,7 +234,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==3.4.0 +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via -r requirements/static/ci/common.in passlib==1.7.4 # via -r requirements/static/ci/common.in @@ -391,7 +390,6 @@ setproctitle==1.3.2 six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.12/freebsd.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -401,7 +399,6 @@ six==1.16.0 # kazoo # kubernetes # more-itertools - # paramiko # python-dateutil # pyvmomi # responses diff --git a/requirements/static/ci/py3.12/linux.txt b/requirements/static/ci/py3.12/linux.txt index 371e4c5114cc..71f9965b699d 100644 --- a/requirements/static/ci/py3.12/linux.txt +++ b/requirements/static/ci/py3.12/linux.txt @@ -65,7 +65,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.12/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # pygit2 # pynacl @@ -246,7 +245,7 @@ packaging==22.0 # ansible-core # docker # pytest -paramiko==3.4.0 +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via -r requirements/static/ci/common.in passlib==1.7.4 # via -r requirements/static/ci/common.in @@ -429,7 +428,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.12/linux.txt # apscheduler - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -439,7 +437,6 @@ six==1.16.0 # kazoo # kubernetes # more-itertools - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.7/freebsd.txt b/requirements/static/ci/py3.7/freebsd.txt index c14b5d8d76f3..83c0f8a05c55 100644 --- a/requirements/static/ci/py3.7/freebsd.txt +++ b/requirements/static/ci/py3.7/freebsd.txt @@ -62,7 +62,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.7/freebsd.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pygit2 @@ -286,7 +285,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==3.4.0 +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -r requirements/static/ci/common.in # junos-eznc @@ -465,7 +464,6 @@ setproctitle==1.3.2 six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.7/freebsd.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -477,7 +475,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-dateutil # pyvmomi # responses diff --git a/requirements/static/ci/py3.7/linux.txt b/requirements/static/ci/py3.7/linux.txt index e9a97f4a62f9..7295d938e7d3 100644 --- a/requirements/static/ci/py3.7/linux.txt +++ b/requirements/static/ci/py3.7/linux.txt @@ -73,7 +73,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.7/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pygit2 @@ -299,7 +298,7 @@ packaging==22.0 # ansible-core # docker # pytest -paramiko==3.4.0 +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -r requirements/static/ci/common.in # junos-eznc @@ -505,7 +504,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.7/linux.txt # apscheduler - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -517,7 +515,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.8/freebsd.txt b/requirements/static/ci/py3.8/freebsd.txt index 34b57f6e2896..804264dcd952 100644 --- a/requirements/static/ci/py3.8/freebsd.txt +++ b/requirements/static/ci/py3.8/freebsd.txt @@ -58,7 +58,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.8/freebsd.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pygit2 @@ -273,7 +272,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==3.4.0 +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -r requirements/static/ci/common.in # junos-eznc @@ -452,7 +451,6 @@ setproctitle==1.3.2 six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.8/freebsd.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -464,7 +462,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-dateutil # pyvmomi # responses diff --git a/requirements/static/ci/py3.8/linux.txt b/requirements/static/ci/py3.8/linux.txt index afc5c517d332..a85202678899 100644 --- a/requirements/static/ci/py3.8/linux.txt +++ b/requirements/static/ci/py3.8/linux.txt @@ -69,7 +69,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.8/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pygit2 @@ -286,7 +285,7 @@ packaging==22.0 # ansible-core # docker # pytest -paramiko==3.4.0 +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -r requirements/static/ci/common.in # junos-eznc @@ -492,7 +491,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.8/linux.txt # apscheduler - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -504,7 +502,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-consul # python-dateutil # pyvmomi diff --git a/requirements/static/ci/py3.9/darwin.txt b/requirements/static/ci/py3.9/darwin.txt index 69ba32505a83..e0fdc9a80bcf 100644 --- a/requirements/static/ci/py3.9/darwin.txt +++ b/requirements/static/ci/py3.9/darwin.txt @@ -61,7 +61,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.9/darwin.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pygit2 @@ -462,7 +461,6 @@ setproctitle==1.3.2 six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.9/darwin.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -472,7 +470,6 @@ six==1.16.0 # junos-eznc # kubernetes # ncclient - # paramiko # python-dateutil # pyvmomi # responses diff --git a/requirements/static/ci/py3.9/freebsd.txt b/requirements/static/ci/py3.9/freebsd.txt index f869631343b1..bef6e3b8737e 100644 --- a/requirements/static/ci/py3.9/freebsd.txt +++ b/requirements/static/ci/py3.9/freebsd.txt @@ -58,7 +58,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.9/freebsd.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pygit2 @@ -273,7 +272,7 @@ packaging==22.0 # -r requirements/base.txt # docker # pytest -paramiko==3.4.0 +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -r requirements/static/ci/common.in # junos-eznc @@ -454,7 +453,6 @@ setproctitle==1.3.2 six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.9/freebsd.txt - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -466,7 +464,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-dateutil # pyvmomi # responses diff --git a/requirements/static/ci/py3.9/linux.txt b/requirements/static/ci/py3.9/linux.txt index e54e13fb7116..bbabe2b0878c 100644 --- a/requirements/static/ci/py3.9/linux.txt +++ b/requirements/static/ci/py3.9/linux.txt @@ -67,7 +67,6 @@ cffi==1.14.6 # via # -c requirements/static/ci/../pkg/py3.9/linux.txt # -r requirements/static/ci/common.in - # bcrypt # cryptography # napalm # pygit2 @@ -284,7 +283,7 @@ packaging==22.0 # ansible-core # docker # pytest -paramiko==3.4.0 +paramiko==3.4.0 ; sys_platform != "win32" and sys_platform != "darwin" # via # -r requirements/static/ci/common.in # junos-eznc @@ -492,7 +491,6 @@ six==1.16.0 # via # -c requirements/static/ci/../pkg/py3.9/linux.txt # apscheduler - # bcrypt # cassandra-driver # cheroot # etcd3-py @@ -504,7 +502,6 @@ six==1.16.0 # kubernetes # more-itertools # ncclient - # paramiko # python-consul # python-dateutil # pyvmomi From d92f80c7ba4c1be9bc53a23ff7cc9417a806f0d3 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 2 Jan 2024 14:15:34 +0000 Subject: [PATCH 36/60] Remove deprecation warning which turned into an error on Jan 2024 Signed-off-by: Pedro Algarvio --- salt/modules/aptpkg.py | 34 ----------------------- tests/pytests/unit/modules/test_aptpkg.py | 6 ++-- 2 files changed, 3 insertions(+), 37 deletions(-) diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py index 6014129d58dc..58a6fa85f688 100644 --- a/salt/modules/aptpkg.py +++ b/salt/modules/aptpkg.py @@ -47,7 +47,6 @@ SaltInvocationError, ) from salt.modules.cmdmod import _parse_env -from salt.utils.versions import warn_until_date log = logging.getLogger(__name__) @@ -3113,39 +3112,6 @@ def _expand_repo_def(os_name, os_codename=None, **kwargs): return sanitized -def expand_repo_def(**kwargs): - """ - Take a repository definition and expand it to the full pkg repository dict - that can be used for comparison. This is a helper function to make - the Debian/Ubuntu apt sources sane for comparison in the pkgrepo states. - - This is designed to be called from pkgrepo states and will have little use - being called on the CLI. - - CLI Examples: - - .. code-block:: bash - - NOT USABLE IN THE CLI - """ - warn_until_date( - "20240101", - "The pkg.expand_repo_def function is deprecated and set for removal " - "after {date}. This is only unsed internally by the apt pkg state " - "module. If that's not the case, please file an new issue requesting " - "the removal of this deprecation warning", - stacklevel=3, - ) - if "os_name" not in kwargs: - kwargs["os_name"] = __grains__["os"] - if "os_codename" not in kwargs: - if "lsb_distrib_codename" in kwargs: - kwargs["os_codename"] = kwargs["lsb_distrib_codename"] - else: - kwargs["os_codename"] = __grains__.get("oscodename") - return _expand_repo_def(**kwargs) - - def _parse_selections(dpkgselection): """ Parses the format from ``dpkg --get-selections`` and return a format that diff --git a/tests/pytests/unit/modules/test_aptpkg.py b/tests/pytests/unit/modules/test_aptpkg.py index 7958a206a368..fdad2be4343d 100644 --- a/tests/pytests/unit/modules/test_aptpkg.py +++ b/tests/pytests/unit/modules/test_aptpkg.py @@ -1269,8 +1269,8 @@ def test_expand_repo_def_cdrom(): # Valid source repo = "# deb cdrom:[Debian GNU/Linux 11.4.0 _Bullseye_ - Official amd64 NETINST 20220709-10:31]/ bullseye main\n" - sanitized = aptpkg.expand_repo_def(os_name="debian", repo=repo, file=source_file) - log.warning("SAN: %s", sanitized) + sanitized = aptpkg._expand_repo_def(os_name="debian", repo=repo, file=source_file) + log.debug("SAN: %s", sanitized) assert isinstance(sanitized, dict) assert "uri" in sanitized @@ -1280,7 +1280,7 @@ def test_expand_repo_def_cdrom(): # Pass the architecture and make sure it is added the the line attribute repo = "deb http://cdn-aws.deb.debian.org/debian/ stretch main\n" - sanitized = aptpkg.expand_repo_def( + sanitized = aptpkg._expand_repo_def( os_name="debian", repo=repo, file=source_file, architectures="amd64" ) From 6b61ff6af6232fe5b19de0038403d112016570cf Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 2 Jan 2024 16:31:58 +0000 Subject: [PATCH 37/60] Stop importing `salt.log` it's long deprecated Signed-off-by: Pedro Algarvio --- .../pkg/integration/test_check_imports.py | 46 ++++++++++++++++--- 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/tests/pytests/pkg/integration/test_check_imports.py b/tests/pytests/pkg/integration/test_check_imports.py index eac49f48fac2..f16aa338bf74 100644 --- a/tests/pytests/pkg/integration/test_check_imports.py +++ b/tests/pytests/pkg/integration/test_check_imports.py @@ -19,12 +19,46 @@ def run(): config = {} for module in [ - 'templates', 'platform', 'cli', 'executors', 'config', 'wheel', 'netapi', - 'cache', 'proxy', 'transport', 'metaproxy', 'modules', 'tokens', 'matchers', - 'acl', 'auth', 'log', 'engines', 'client', 'returners', 'runners', 'tops', - 'output', 'daemons', 'thorium', 'renderers', 'states', 'cloud', 'roster', - 'beacons', 'pillar', 'spm', 'utils', 'sdb', 'fileserver', 'defaults', - 'ext', 'queues', 'grains', 'serializers' + '_logging', + 'acl', + 'auth', + 'beacons', + 'cache', + 'cli', + 'client', + 'cloud', + 'config', + 'daemons', + 'defaults', + 'engines', + 'executors', + 'ext', + 'fileserver', + 'grains', + 'matchers', + 'metaproxy', + 'modules', + 'netapi', + 'output', + 'pillar', + 'platform', + 'proxy', + 'queues', + 'renderers', + 'returners', + 'roster', + 'runners', + 'sdb', + 'serializers', + 'spm', + 'states', + 'templates', + 'thorium', + 'tokens', + 'tops', + 'transport', + 'utils', + 'wheel', ]: import_name = "salt.{}".format(module) try: From c01b6b380835da86bb81df2eb8a1251a6ac6a685 Mon Sep 17 00:00:00 2001 From: David Murphy < dmurphy@saltstack.com> Date: Wed, 20 Dec 2023 15:39:51 -0700 Subject: [PATCH 38/60] [WIP] initial support for correct encode changes for artifactory --- salt/modules/artifactory.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/salt/modules/artifactory.py b/salt/modules/artifactory.py index 0f01d89e82f5..d28e1ca0927f 100644 --- a/salt/modules/artifactory.py +++ b/salt/modules/artifactory.py @@ -79,7 +79,7 @@ def get_latest_snapshot( headers = {} if username and password: headers["Authorization"] = "Basic {}".format( - salt.utils.hashutils.base64_encodestring( + salt.utils.hashutils.base64_encode( "{}:{}".format(username.replace("\n", ""), password.replace("\n", "")) ) ) @@ -165,7 +165,7 @@ def get_snapshot( headers = {} if username and password: headers["Authorization"] = "Basic {}".format( - salt.utils.hashutils.base64_encodestring( + salt.utils.hashutils.base64_encode( "{}:{}".format(username.replace("\n", ""), password.replace("\n", "")) ) ) @@ -238,7 +238,7 @@ def get_latest_release( headers = {} if username and password: headers["Authorization"] = "Basic {}".format( - salt.utils.hashutils.base64_encodestring( + salt.utils.hashutils.base64_encode( "{}:{}".format(username.replace("\n", ""), password.replace("\n", "")) ) ) @@ -320,8 +320,9 @@ def get_release( headers = {} if username and password: headers["Authorization"] = "Basic {}".format( - salt.utils.hashutils.base64_encodestring( + salt.utils.hashutils.base64_encode( "{}:{}".format(username.replace("\n", ""), password.replace("\n", "")) + ## f"{username.replace("\n", "")}:{password.replace("\n", "")}") ) ) release_url, file_name = _get_release_url( From ce1cdebedd4199b25c966bf3438fec510ecbba9f Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Fri, 29 Dec 2023 20:42:59 -0700 Subject: [PATCH 39/60] Skip flakey blackout tests on windows --- tests/pytests/scenarios/blackout/test_minion_blackout.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/pytests/scenarios/blackout/test_minion_blackout.py b/tests/pytests/scenarios/blackout/test_minion_blackout.py index fcc288edfb78..581ad2b135ba 100644 --- a/tests/pytests/scenarios/blackout/test_minion_blackout.py +++ b/tests/pytests/scenarios/blackout/test_minion_blackout.py @@ -11,7 +11,11 @@ def _check_skip(grains): - if grains["os"] == "Windows" and grains["osrelease"] == "2016Server": + """ + Skip on windows because these tests are flaky, we need to spend some time to + debug why. + """ + if grains["os"] == "Windows": return True return False From b8bb8f4c7011d3f46fc956d597cdfc9c1313fb50 Mon Sep 17 00:00:00 2001 From: David Murphy < dmurphy@saltstack.com> Date: Wed, 3 Jan 2024 14:32:22 -0700 Subject: [PATCH 40/60] Updated tests for artifactory username/password encoding --- tests/pytests/unit/modules/test_artifactory.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/pytests/unit/modules/test_artifactory.py b/tests/pytests/unit/modules/test_artifactory.py index 220cdf9ad88b..722bb7656c84 100644 --- a/tests/pytests/unit/modules/test_artifactory.py +++ b/tests/pytests/unit/modules/test_artifactory.py @@ -278,7 +278,7 @@ def test_get_latest_snapshot_username_password(): save_artifact_mock.assert_called_with( "http://artifactory.example.com/artifactory/snapshot", "/path/to/file", - {"Authorization": "Basic dXNlcjpwYXNzd29yZA==\n"}, + {"Authorization": "Basic dXNlcjpwYXNzd29yZA=="}, ) @@ -305,7 +305,7 @@ def test_get_snapshot_username_password(): save_artifact_mock.assert_called_with( "http://artifactory.example.com/artifactory/snapshot", "/path/to/file", - {"Authorization": "Basic dXNlcjpwYXNzd29yZA==\n"}, + {"Authorization": "Basic dXNlcjpwYXNzd29yZA=="}, ) @@ -334,7 +334,7 @@ def test_get_latest_release_username_password(): save_artifact_mock.assert_called_with( "http://artifactory.example.com/artifactory/release", "/path/to/file", - {"Authorization": "Basic dXNlcjpwYXNzd29yZA==\n"}, + {"Authorization": "Basic dXNlcjpwYXNzd29yZA=="}, ) @@ -361,7 +361,7 @@ def test_get_release_username_password(): save_artifact_mock.assert_called_with( "http://artifactory.example.com/artifactory/release", "/path/to/file", - {"Authorization": "Basic dXNlcjpwYXNzd29yZA==\n"}, + {"Authorization": "Basic dXNlcjpwYXNzd29yZA=="}, ) From f9d456bf107827a00eb023fda8aec937f403c2eb Mon Sep 17 00:00:00 2001 From: David Murphy < dmurphy@saltstack.com> Date: Wed, 3 Jan 2024 14:57:41 -0700 Subject: [PATCH 41/60] Updated use of base64_b64encode and change log --- changelog/63063.fixed.md | 1 + salt/modules/artifactory.py | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 changelog/63063.fixed.md diff --git a/changelog/63063.fixed.md b/changelog/63063.fixed.md new file mode 100644 index 000000000000..6f26fc11abd9 --- /dev/null +++ b/changelog/63063.fixed.md @@ -0,0 +1 @@ +Corrected encoding of credentials for use with Artifactory diff --git a/salt/modules/artifactory.py b/salt/modules/artifactory.py index d28e1ca0927f..7eaf9c724580 100644 --- a/salt/modules/artifactory.py +++ b/salt/modules/artifactory.py @@ -79,7 +79,7 @@ def get_latest_snapshot( headers = {} if username and password: headers["Authorization"] = "Basic {}".format( - salt.utils.hashutils.base64_encode( + salt.utils.hashutils.base64_b64encode( "{}:{}".format(username.replace("\n", ""), password.replace("\n", "")) ) ) @@ -165,7 +165,7 @@ def get_snapshot( headers = {} if username and password: headers["Authorization"] = "Basic {}".format( - salt.utils.hashutils.base64_encode( + salt.utils.hashutils.base64_b64encode( "{}:{}".format(username.replace("\n", ""), password.replace("\n", "")) ) ) @@ -238,7 +238,7 @@ def get_latest_release( headers = {} if username and password: headers["Authorization"] = "Basic {}".format( - salt.utils.hashutils.base64_encode( + salt.utils.hashutils.base64_b64encode( "{}:{}".format(username.replace("\n", ""), password.replace("\n", "")) ) ) @@ -320,7 +320,7 @@ def get_release( headers = {} if username and password: headers["Authorization"] = "Basic {}".format( - salt.utils.hashutils.base64_encode( + salt.utils.hashutils.base64_b64encode( "{}:{}".format(username.replace("\n", ""), password.replace("\n", "")) ## f"{username.replace("\n", "")}:{password.replace("\n", "")}") ) From d2d34303dda1581c01166521c47240201ccbbcd8 Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Thu, 28 Dec 2023 22:21:47 -0700 Subject: [PATCH 42/60] Fix un-closed tranport in tornado netapi --- changelog/65759.fixed.md | 1 + salt/netapi/rest_tornado/saltnado.py | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 changelog/65759.fixed.md diff --git a/changelog/65759.fixed.md b/changelog/65759.fixed.md new file mode 100644 index 000000000000..426cb3f24bf7 --- /dev/null +++ b/changelog/65759.fixed.md @@ -0,0 +1 @@ +Fix un-closed transport in tornado netapi diff --git a/salt/netapi/rest_tornado/saltnado.py b/salt/netapi/rest_tornado/saltnado.py index 44c4089ccbbd..cf55454ebb8a 100644 --- a/salt/netapi/rest_tornado/saltnado.py +++ b/salt/netapi/rest_tornado/saltnado.py @@ -396,6 +396,9 @@ def _handle_event_socket_recv(self, raw): ) del self.timeout_map[future] + def destroy(self): + self.event.destroy() + class BaseSaltAPIHandler(salt.ext.tornado.web.RequestHandler): # pylint: disable=W0223 ct_out_map = ( @@ -510,6 +513,7 @@ def on_finish(self): self.timeout_futures() # clear local_client objects to disconnect event publisher's IOStream connections del self.saltclients + self.application.event_listener.destroy() def on_connection_close(self): """ From 41d3b8f75f5308f7ee44429629f1344a46f5135d Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Sat, 30 Dec 2023 00:21:36 -0700 Subject: [PATCH 43/60] Destroy event_listener when app is no-longer used --- salt/netapi/rest_tornado/saltnado.py | 1 - tests/pytests/integration/netapi/rest_tornado/conftest.py | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/salt/netapi/rest_tornado/saltnado.py b/salt/netapi/rest_tornado/saltnado.py index cf55454ebb8a..6d47de1446a4 100644 --- a/salt/netapi/rest_tornado/saltnado.py +++ b/salt/netapi/rest_tornado/saltnado.py @@ -513,7 +513,6 @@ def on_finish(self): self.timeout_futures() # clear local_client objects to disconnect event publisher's IOStream connections del self.saltclients - self.application.event_listener.destroy() def on_connection_close(self): """ diff --git a/tests/pytests/integration/netapi/rest_tornado/conftest.py b/tests/pytests/integration/netapi/rest_tornado/conftest.py index f8923f01efb7..c69f8a4c28a2 100644 --- a/tests/pytests/integration/netapi/rest_tornado/conftest.py +++ b/tests/pytests/integration/netapi/rest_tornado/conftest.py @@ -18,9 +18,13 @@ def client_config(client_config, netapi_port): @pytest.fixture def app(app_urls, load_auth, client_config, minion_config, salt_sub_minion): - return netapi.build_tornado_app( + app = netapi.build_tornado_app( app_urls, load_auth, client_config, minion_config, setup_event_listener=True ) + try: + yield app + finally: + app.event_listener.destroy() @pytest.fixture From 9dfe502a1689c0ec4219c661e1a6277116f23ac0 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 2 Jan 2024 12:14:08 +0000 Subject: [PATCH 44/60] Build documentation on GitHub Hosted Runners Signed-off-by: Pedro Algarvio --- .github/workflows/build-docs.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 2afb5d8ce29d..a2692d7ac1f4 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -24,10 +24,7 @@ jobs: build: name: Build runs-on: - - self-hosted - - linux - - medium - - x86_64 + - ubuntu-latest strategy: fail-fast: false matrix: From abfc1c82d50922ca665e8a964a85618393dbd676 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 2 Jan 2024 12:21:03 +0000 Subject: [PATCH 45/60] Prefer GitHub hosted actions runners Signed-off-by: Pedro Algarvio --- .github/workflows/ci.yml | 11 +++++------ .github/workflows/lint-action.yml | 4 ++-- .github/workflows/nightly.yml | 15 +++++++-------- .github/workflows/pre-commit-action.yml | 2 +- .github/workflows/release-tag.yml | 2 +- .github/workflows/release-update-winrepo.yml | 2 +- .github/workflows/release.yml | 4 ++-- .github/workflows/scheduled.yml | 15 +++++++-------- .github/workflows/staging.yml | 8 ++++---- .github/workflows/templates/ci.yml.jinja | 7 +++---- .github/workflows/templates/layout.yml.jinja | 4 ++-- .github/workflows/templates/nightly.yml.jinja | 2 +- .github/workflows/templates/release.yml.jinja | 2 +- .github/workflows/templates/staging.yml.jinja | 2 +- .../templates/trigger-branch-workflows.yml.jinja | 2 +- .../workflow-requirements-check.yml.jinja | 2 +- .github/workflows/test-action-macos.yml | 4 ++-- .github/workflows/test-packages-action-macos.yml | 2 +- .github/workflows/triage.yml | 2 +- 19 files changed, 44 insertions(+), 48 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ffeb2dfef10f..e95e362fbb83 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: prepare-workflow: name: Prepare Workflow Run - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest outputs: jobs: ${{ steps.define-jobs.outputs.jobs }} runners: ${{ steps.runner-types.outputs.runners }} @@ -266,7 +266,7 @@ jobs: prepare-release: name: "Prepare Release: ${{ needs.prepare-workflow.outputs.salt-version }}" if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['prepare-release'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "medium", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - prepare-workflow steps: @@ -388,7 +388,7 @@ jobs: needs: - prepare-workflow - prepare-release - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "medium", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -2775,7 +2775,7 @@ jobs: combine-all-code-coverage: name: Combine Code Coverage if: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] == false }} - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - prepare-workflow - windows-2016-ci-deps @@ -2857,7 +2857,6 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.10 - if: ${{ github.event.repository.private == false }} uses: actions/setup-python@v4 with: python-version: "3.10" @@ -2963,7 +2962,7 @@ jobs: # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status if: always() - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - prepare-workflow - pre-commit diff --git a/.github/workflows/lint-action.yml b/.github/workflows/lint-action.yml index 347ddd291986..fb414dd96102 100644 --- a/.github/workflows/lint-action.yml +++ b/.github/workflows/lint-action.yml @@ -18,7 +18,7 @@ env: jobs: Salt: name: Lint Salt's Source Code - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "large", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest if: ${{ contains(fromJSON('["push", "schedule", "workflow_dispatch"]'), github.event_name) || fromJSON(inputs.changed-files)['salt'] || fromJSON(inputs.changed-files)['lint'] }} container: @@ -62,7 +62,7 @@ jobs: Tests: name: Lint Salt's Test Suite - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "large", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest if: ${{ contains(fromJSON('["push", "schedule", "workflow_dispatch"]'), github.event_name) || fromJSON(inputs.changed-files)['tests'] || fromJSON(inputs.changed-files)['lint'] }} container: diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 62c58619c70d..746c6e3f881f 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -38,7 +38,7 @@ jobs: workflow-requirements: name: Check Workflow Requirements - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest outputs: requirements-met: ${{ steps.check-requirements.outputs.requirements-met }} steps: @@ -65,7 +65,7 @@ jobs: trigger-branch-nightly-builds: name: Trigger Branch Workflows if: ${{ github.event_name == 'schedule' && fromJSON(needs.workflow-requirements.outputs.requirements-met) }} - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - workflow-requirements steps: @@ -77,7 +77,7 @@ jobs: prepare-workflow: name: Prepare Workflow Run - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest if: ${{ fromJSON(needs.workflow-requirements.outputs.requirements-met) }} needs: - workflow-requirements @@ -310,7 +310,7 @@ jobs: prepare-release: name: "Prepare Release: ${{ needs.prepare-workflow.outputs.salt-version }}" if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['prepare-release'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "medium", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - prepare-workflow steps: @@ -437,7 +437,7 @@ jobs: needs: - prepare-workflow - prepare-release - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "medium", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -2836,7 +2836,7 @@ jobs: combine-all-code-coverage: name: Combine Code Coverage if: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] == false }} - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - prepare-workflow - windows-2016-ci-deps @@ -2918,7 +2918,6 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.10 - if: ${{ github.event.repository.private == false }} uses: actions/setup-python@v4 with: python-version: "3.10" @@ -3925,7 +3924,7 @@ jobs: # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status if: always() - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest environment: nightly needs: - workflow-requirements diff --git a/.github/workflows/pre-commit-action.yml b/.github/workflows/pre-commit-action.yml index 4c1a34e2f4ab..658dbf5cc4d1 100644 --- a/.github/workflows/pre-commit-action.yml +++ b/.github/workflows/pre-commit-action.yml @@ -21,7 +21,7 @@ jobs: Pre-Commit: name: Run Pre-Commit Against Salt - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest container: image: ghcr.io/saltstack/salt-ci-containers/python:3.10 diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml index 2908fd96f43c..85154bd59faf 100644 --- a/.github/workflows/release-tag.yml +++ b/.github/workflows/release-tag.yml @@ -31,7 +31,7 @@ jobs: permissions: contents: write # for dev-drprasad/delete-tag-and-release to delete tags or releases name: Generate Tag and Github Release - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest steps: - uses: dev-drprasad/delete-tag-and-release@v0.2.0 if: github.event.inputs.reTag == 'true' diff --git a/.github/workflows/release-update-winrepo.yml b/.github/workflows/release-update-winrepo.yml index 4eac8c2c836c..7774657351c5 100644 --- a/.github/workflows/release-update-winrepo.yml +++ b/.github/workflows/release-update-winrepo.yml @@ -19,7 +19,7 @@ permissions: jobs: update-winrepo: name: Update Winrepo - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest steps: - name: Checkout Salt diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9b2ce992589b..6cb6ab1d27e6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,7 +35,7 @@ jobs: check-requirements: name: Check Requirements - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest environment: release-check steps: - name: Check For Admin Permission @@ -1114,7 +1114,7 @@ jobs: # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status if: always() - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - check-requirements - prepare-workflow diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index c03929fc970e..ccb79b95fc2f 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -28,7 +28,7 @@ jobs: workflow-requirements: name: Check Workflow Requirements - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest outputs: requirements-met: ${{ steps.check-requirements.outputs.requirements-met }} steps: @@ -55,7 +55,7 @@ jobs: trigger-branch-scheduled-builds: name: Trigger Branch Workflows if: ${{ github.event_name == 'schedule' && fromJSON(needs.workflow-requirements.outputs.requirements-met) }} - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - workflow-requirements steps: @@ -67,7 +67,7 @@ jobs: prepare-workflow: name: Prepare Workflow Run - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest if: ${{ fromJSON(needs.workflow-requirements.outputs.requirements-met) }} needs: - workflow-requirements @@ -300,7 +300,7 @@ jobs: prepare-release: name: "Prepare Release: ${{ needs.prepare-workflow.outputs.salt-version }}" if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['prepare-release'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "medium", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - prepare-workflow steps: @@ -422,7 +422,7 @@ jobs: needs: - prepare-workflow - prepare-release - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "medium", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -2809,7 +2809,7 @@ jobs: combine-all-code-coverage: name: Combine Code Coverage if: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] == false }} - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - prepare-workflow - windows-2016-ci-deps @@ -2891,7 +2891,6 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.10 - if: ${{ github.event.repository.private == false }} uses: actions/setup-python@v4 with: python-version: "3.10" @@ -2997,7 +2996,7 @@ jobs: # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status if: always() - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - workflow-requirements - trigger-branch-scheduled-builds diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 0940d371b7ef..43147cae346a 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -53,7 +53,7 @@ jobs: check-requirements: name: Check Requirements - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest environment: staging-check steps: - name: Check For Admin Permission @@ -64,7 +64,7 @@ jobs: prepare-workflow: name: Prepare Workflow Run - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - check-requirements outputs: @@ -427,7 +427,7 @@ jobs: needs: - prepare-workflow - prepare-release - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "medium", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -3944,7 +3944,7 @@ jobs: # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status if: always() - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - check-requirements - prepare-workflow diff --git a/.github/workflows/templates/ci.yml.jinja b/.github/workflows/templates/ci.yml.jinja index b02604c40d8c..9538746fd112 100644 --- a/.github/workflows/templates/ci.yml.jinja +++ b/.github/workflows/templates/ci.yml.jinja @@ -52,7 +52,7 @@ - x86_64 <%- else %> if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['<{ job_name }>'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "medium", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest <%- endif %> needs: - prepare-workflow @@ -205,7 +205,7 @@ needs: - prepare-workflow - prepare-release - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "medium", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -309,7 +309,7 @@ <%- do conclusion_needs.append("combine-all-code-coverage") %> name: Combine Code Coverage if: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] == false }} - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - prepare-workflow <%- for need in test_salt_needs.iter(consume=False) %> @@ -319,7 +319,6 @@ - uses: actions/checkout@v4 - name: Set up Python 3.10 - if: ${{ github.event.repository.private == false }} uses: actions/setup-python@v4 with: python-version: "3.10" diff --git a/.github/workflows/templates/layout.yml.jinja b/.github/workflows/templates/layout.yml.jinja index 5934eb8d579b..1ed2616983c1 100644 --- a/.github/workflows/templates/layout.yml.jinja +++ b/.github/workflows/templates/layout.yml.jinja @@ -75,7 +75,7 @@ jobs: prepare-workflow: name: Prepare Workflow Run - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest <%- if prepare_workflow_if_check %> if: <{ prepare_workflow_if_check }> <%- endif %> @@ -337,7 +337,7 @@ jobs: # on a pull request instead of requiring all name: Set the ${{ github.workflow }} Pipeline Exit Status if: always() - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest <%- if workflow_slug == "nightly" %> environment: <{ workflow_slug }> <%- endif %> diff --git a/.github/workflows/templates/nightly.yml.jinja b/.github/workflows/templates/nightly.yml.jinja index e4350f44a366..b058b727b4d0 100644 --- a/.github/workflows/templates/nightly.yml.jinja +++ b/.github/workflows/templates/nightly.yml.jinja @@ -58,7 +58,7 @@ concurrency: <%- do conclusion_needs.append('notify-slack') %> notify-slack: name: Notify Slack - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest environment: <{ gh_environment }> needs: <%- for need in prepare_workflow_needs.iter(consume=False) %> diff --git a/.github/workflows/templates/release.yml.jinja b/.github/workflows/templates/release.yml.jinja index b020138baff8..cf05beefa80b 100644 --- a/.github/workflows/templates/release.yml.jinja +++ b/.github/workflows/templates/release.yml.jinja @@ -52,7 +52,7 @@ permissions: <{ job_name }>: <%- do prepare_workflow_needs.append(job_name) %> name: Check Requirements - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest environment: <{ gh_environment }>-check steps: - name: Check For Admin Permission diff --git a/.github/workflows/templates/staging.yml.jinja b/.github/workflows/templates/staging.yml.jinja index c84ade076364..45866284cfc8 100644 --- a/.github/workflows/templates/staging.yml.jinja +++ b/.github/workflows/templates/staging.yml.jinja @@ -66,7 +66,7 @@ concurrency: <{ job_name }>: <%- do prepare_workflow_needs.append(job_name) %> name: Check Requirements - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest environment: <{ gh_environment }>-check steps: - name: Check For Admin Permission diff --git a/.github/workflows/templates/trigger-branch-workflows.yml.jinja b/.github/workflows/templates/trigger-branch-workflows.yml.jinja index 24d0147b9152..9d187cd6a2d1 100644 --- a/.github/workflows/templates/trigger-branch-workflows.yml.jinja +++ b/.github/workflows/templates/trigger-branch-workflows.yml.jinja @@ -7,7 +7,7 @@ <%- do conclusion_needs.append(job_name) %> name: Trigger Branch Workflows if: ${{ github.event_name == 'schedule' && fromJSON(needs.workflow-requirements.outputs.requirements-met) }} - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - workflow-requirements steps: diff --git a/.github/workflows/templates/workflow-requirements-check.yml.jinja b/.github/workflows/templates/workflow-requirements-check.yml.jinja index a18c13c69f5a..419ee3f6f526 100644 --- a/.github/workflows/templates/workflow-requirements-check.yml.jinja +++ b/.github/workflows/templates/workflow-requirements-check.yml.jinja @@ -4,7 +4,7 @@ <{ job_name }>: <%- do prepare_workflow_needs.append(job_name) %> name: Check Workflow Requirements - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest outputs: requirements-met: ${{ steps.check-requirements.outputs.requirements-met }} steps: diff --git a/.github/workflows/test-action-macos.yml b/.github/workflows/test-action-macos.yml index 085695122c90..5c113f264898 100644 --- a/.github/workflows/test-action-macos.yml +++ b/.github/workflows/test-action-macos.yml @@ -76,7 +76,7 @@ jobs: generate-matrix: name: Test Matrix - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest outputs: matrix-include: ${{ steps.generate-matrix.outputs.matrix }} steps: @@ -383,7 +383,7 @@ jobs: report: name: Test Reports if: always() && inputs.skip-code-coverage == false && needs.test.result != 'cancelled' && needs.test.result != 'skipped' - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest needs: - test diff --git a/.github/workflows/test-packages-action-macos.yml b/.github/workflows/test-packages-action-macos.yml index 4dac7599e348..d3f1f2a3dd4b 100644 --- a/.github/workflows/test-packages-action-macos.yml +++ b/.github/workflows/test-packages-action-macos.yml @@ -220,7 +220,7 @@ jobs: report: name: Report - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest if: always() && (inputs.skip-code-coverage == false || inputs.skip-junit-reports == false) && needs.test.result != 'cancelled' && needs.test.result != 'skipped' needs: - test diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index 2971429a4dc3..7d0ad560116e 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -22,7 +22,7 @@ jobs: issues: write pull-requests: read # for dawidd6/action-download-artifact to query commit hash name: Triage New Issue - runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 9c5ea5a3247aaf8d00bda2c23ae906e646922a69 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 2 Jan 2024 09:45:10 +0000 Subject: [PATCH 46/60] Reduce GitHub Actions cache usage Signed-off-by: Pedro Algarvio --- ...ion.yml => build-deps-ci-action-linux.yml} | 10 +- .../workflows/build-deps-ci-action-macos.yml | 12 +- .../build-deps-ci-action-windows.yml | 160 +++ .github/workflows/ci.yml | 1028 +++-------------- .github/workflows/nightly.yml | 1028 +++-------------- .github/workflows/release.yml | 694 +---------- .github/workflows/scheduled.yml | 1028 +++-------------- .github/workflows/staging.yml | 1024 +++------------- .../templates/build-ci-deps.yml.jinja | 36 +- .../test-package-downloads-action.yml.jinja | 20 +- .../templates/test-salt-pkg.yml.jinja | 10 +- .../workflows/templates/test-salt.yml.jinja | 10 +- ...{test-action.yml => test-action-linux.yml} | 6 +- .github/workflows/test-action-macos.yml | 8 +- .github/workflows/test-action-windows.yml | 399 +++++++ .../test-package-downloads-action.yml | 89 +- ...ion.yml => test-packages-action-linux.yml} | 6 +- .../workflows/test-packages-action-macos.yml | 8 +- .../test-packages-action-windows.yml | 275 +++++ noxfile.py | 59 +- tools/precommit/workflows.py | 114 +- tools/utils/__init__.py | 21 + tools/vm.py | 12 +- 23 files changed, 1731 insertions(+), 4326 deletions(-) rename .github/workflows/{build-deps-ci-action.yml => build-deps-ci-action-linux.yml} (93%) create mode 100644 .github/workflows/build-deps-ci-action-windows.yml rename .github/workflows/{test-action.yml => test-action-linux.yml} (98%) create mode 100644 .github/workflows/test-action-windows.yml rename .github/workflows/{test-packages-action.yml => test-packages-action-linux.yml} (97%) create mode 100644 .github/workflows/test-packages-action-windows.yml diff --git a/.github/workflows/build-deps-ci-action.yml b/.github/workflows/build-deps-ci-action-linux.yml similarity index 93% rename from .github/workflows/build-deps-ci-action.yml rename to .github/workflows/build-deps-ci-action-linux.yml index 0d596c0e1dcf..a20c08a56ff9 100644 --- a/.github/workflows/build-deps-ci-action.yml +++ b/.github/workflows/build-deps-ci-action-linux.yml @@ -70,12 +70,12 @@ jobs: - name: Checkout Source Code uses: actions/checkout@v4 - - name: Cache nox.${{ inputs.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Cache nox.linux.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }} id: nox-dependencies-cache uses: actions/cache@v3.3.1 with: - path: nox.${{ inputs.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ + path: nox.linux.${{ inputs.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }} @@ -156,5 +156,5 @@ jobs: - name: Upload Nox Requirements Tarball uses: actions/upload-artifact@v3 with: - name: nox-${{ inputs.distro-slug }}-${{ inputs.nox-session }} - path: nox.${{ inputs.distro-slug }}.tar.* + name: nox-linux-${{ inputs.arch }}-${{ inputs.nox-session }} + path: nox.linux.${{ inputs.arch }}.tar.* diff --git a/.github/workflows/build-deps-ci-action-macos.yml b/.github/workflows/build-deps-ci-action-macos.yml index 125a6713a85e..fec65ad6bcb9 100644 --- a/.github/workflows/build-deps-ci-action-macos.yml +++ b/.github/workflows/build-deps-ci-action-macos.yml @@ -66,12 +66,12 @@ jobs: - name: Checkout Source Code uses: actions/checkout@v4 - - name: Cache nox.${{ inputs.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Cache nox.macos.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }} id: nox-dependencies-cache uses: actions/cache@v3.3.1 with: - path: nox.${{ inputs.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ + path: nox.macos.${{ inputs.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }} @@ -126,10 +126,10 @@ jobs: - name: Compress .nox Directory if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - nox --force-color -e compress-dependencies -- ${{ inputs.distro-slug }} + nox --force-color -e compress-dependencies -- macos ${{ inputs.arch }} - name: Upload Nox Requirements Tarball uses: actions/upload-artifact@v3 with: - name: nox-${{ inputs.distro-slug }}-${{ inputs.nox-session }} - path: nox.${{ inputs.distro-slug }}.tar.* + name: nox-macos-${{ inputs.arch }}-${{ inputs.nox-session }} + path: nox.macos.${{ inputs.arch }}.tar.* diff --git a/.github/workflows/build-deps-ci-action-windows.yml b/.github/workflows/build-deps-ci-action-windows.yml new file mode 100644 index 000000000000..5bff2d825ce2 --- /dev/null +++ b/.github/workflows/build-deps-ci-action-windows.yml @@ -0,0 +1,160 @@ +--- +name: Install Test Dependencies + +on: + workflow_call: + inputs: + distro-slug: + required: true + type: string + description: The OS slug to run tests against + nox-session: + required: true + type: string + description: The nox session to run + salt-version: + type: string + required: true + description: The Salt version to set prior to running tests. + cache-prefix: + required: true + type: string + description: Seed used to invalidate caches + platform: + required: true + type: string + description: The platform being tested + arch: + required: true + type: string + description: The platform arch being tested + nox-version: + required: true + type: string + description: The nox version to install + python-version: + required: false + type: string + description: The python version to run tests with + default: "3.10" + package-name: + required: false + type: string + description: The onedir package name to use + default: salt + + +env: + COLUMNS: 190 + AWS_MAX_ATTEMPTS: "10" + AWS_RETRY_MODE: "adaptive" + PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ + PIP_EXTRA_INDEX_URL: https://pypi.org/simple + +jobs: + + dependencies: + name: Install + runs-on: + - self-hosted + - linux + - bastion + timeout-minutes: 90 + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Cache nox.windows.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }} + id: nox-dependencies-cache + uses: actions/cache@v3.3.1 + with: + path: nox.windows.${{ inputs.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ + hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') + }} + + - name: Download Onedir Tarball as an Artifact + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz + path: artifacts/ + + - name: Decompress Onedir Tarball + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + shell: bash + run: | + python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" + cd artifacts + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz + + - name: PyPi Proxy + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + sed -i '7s;^;--index-url=https://pypi-proxy.saltstack.net/root/local/+simple/ --extra-index-url=https://pypi.org/simple\n;' requirements/static/ci/*/*.txt + + - name: Setup Python Tools Scripts + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }}-build-deps-ci + + - name: Get Salt Project GitHub Actions Bot Environment + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30") + SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/tags/instance/spb:environment) + echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV" + + - name: Start VM + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + id: spin-up-vm + run: | + tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ inputs.distro-slug }} + + - name: List Free Space + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm ssh ${{ inputs.distro-slug }} -- df -h || true + + - name: Upload Checkout To VM + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm rsync ${{ inputs.distro-slug }} + + - name: Install Dependencies + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm install-dependencies --nox-session=${{ inputs.nox-session }} ${{ inputs.distro-slug }} + + - name: Cleanup .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm pre-archive-cleanup ${{ inputs.distro-slug }} + + - name: Compress .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm compress-dependencies ${{ inputs.distro-slug }} + + - name: Download Compressed .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm download-dependencies ${{ inputs.distro-slug }} + + - name: Destroy VM + if: always() && steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm destroy --no-wait ${{ inputs.distro-slug }} + + - name: Upload Nox Requirements Tarball + uses: actions/upload-artifact@v3 + with: + name: nox-windows-${{ inputs.arch }}-${{ inputs.nox-session }} + path: nox.windows.${{ inputs.arch }}.tar.* diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e95e362fbb83..cf6a7ad51179 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -615,47 +615,13 @@ jobs: python-version: "3.10.13" source: "src" - windows-2016-ci-deps: - name: Windows 2016 Deps + windows-amd64-ci-deps: + name: Windows amd64 CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2016 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - windows-2019-ci-deps: - name: Windows 2019 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2019 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - windows-2022-ci-deps: - name: Windows 2022 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml + uses: ./.github/workflows/build-deps-ci-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -666,8 +632,8 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - macos-12-ci-deps: - name: macOS 12 Deps + macos-x86_64-ci-deps: + name: MacOS x86_64 CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow @@ -683,25 +649,8 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - macos-13-ci-deps: - name: macOS 13 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-13 - nox-session: ci-test-onedir - platform: darwin - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-13-xlarge-ci-deps: - name: macOS 13 Arm64 Deps + macos-arm64-ci-deps: + name: MacOS arm64 CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow @@ -711,172 +660,19 @@ jobs: distro-slug: macos-13-xlarge nox-session: ci-test-onedir platform: darwin - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-8-ci-deps: - name: Alma Linux 8 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-8-arm64-ci-deps: - name: Alma Linux 8 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-9-ci-deps: - name: Alma Linux 9 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-9-arm64-ci-deps: - name: Alma Linux 9 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2-ci-deps: - name: Amazon Linux 2 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2-arm64-ci-deps: - name: Amazon Linux 2 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - amazonlinux-2023-ci-deps: - name: Amazon Linux 2023 Deps + linux-x86_64-ci-deps: + name: Linux x86_64 CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2023 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2023-arm64-ci-deps: - name: Amazon Linux 2023 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2023-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - archlinux-lts-ci-deps: - name: Arch Linux LTS Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: archlinux-lts - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centos-7-ci-deps: - name: CentOS 7 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + uses: ./.github/workflows/build-deps-ci-action-linux.yml with: distro-slug: centos-7 nox-session: ci-test-onedir @@ -887,426 +683,18 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - centos-7-arm64-ci-deps: - name: CentOS 7 Arm64 Deps + linux-arm64-ci-deps: + name: Linux arm64 CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + uses: ./.github/workflows/build-deps-ci-action-linux.yml with: distro-slug: centos-7-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-8-ci-deps: - name: CentOS Stream 8 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-8-arm64-ci-deps: - name: CentOS Stream 8 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-9-ci-deps: - name: CentOS Stream 9 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-9-arm64-ci-deps: - name: CentOS Stream 9 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-10-ci-deps: - name: Debian 10 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-10 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-11-ci-deps: - name: Debian 11 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-11 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-11-arm64-ci-deps: - name: Debian 11 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-11-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-12-ci-deps: - name: Debian 12 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-12 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-12-arm64-ci-deps: - name: Debian 12 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-12-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-37-ci-deps: - name: Fedora 37 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-37 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-37-arm64-ci-deps: - name: Fedora 37 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-37-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-38-ci-deps: - name: Fedora 38 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-38 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-38-arm64-ci-deps: - name: Fedora 38 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-38-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - opensuse-15-ci-deps: - name: Opensuse 15 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: opensuse-15 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-3-ci-deps: - name: Photon OS 3 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-3 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-3-arm64-ci-deps: - name: Photon OS 3 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-3-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-4-ci-deps: - name: Photon OS 4 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-4-arm64-ci-deps: - name: Photon OS 4 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-5-ci-deps: - name: Photon OS 5 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-5-arm64-ci-deps: - name: Photon OS 5 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-5-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2004-ci-deps: - name: Ubuntu 20.04 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-20.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2004-arm64-ci-deps: - name: Ubuntu 20.04 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-20.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2204-ci-deps: - name: Ubuntu 22.04 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-22.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2204-arm64-ci-deps: - name: Ubuntu 22.04 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-22.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -1318,8 +706,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - amazonlinux-2-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2 nox-session: ci-test-onedir @@ -1340,13 +728,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - amazonlinux-2-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1362,8 +750,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - amazonlinux-2023-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023 nox-session: ci-test-onedir @@ -1384,13 +772,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - amazonlinux-2023-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1406,8 +794,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - centos-7-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centos-7 nox-session: ci-test-onedir @@ -1428,8 +816,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - centosstream-8-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-8 nox-session: ci-test-onedir @@ -1450,8 +838,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - centosstream-9-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9 nox-session: ci-test-onedir @@ -1472,13 +860,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - centosstream-9-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1494,8 +882,8 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - debian-10-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-10 nox-session: ci-test-onedir @@ -1516,8 +904,8 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - debian-11-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11 nox-session: ci-test-onedir @@ -1538,13 +926,13 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - debian-11-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1560,8 +948,8 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - debian-12-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12 nox-session: ci-test-onedir @@ -1582,13 +970,13 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - debian-12-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1604,8 +992,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-3-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3 nox-session: ci-test-onedir @@ -1626,13 +1014,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-3-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1648,8 +1036,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-4-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4 nox-session: ci-test-onedir @@ -1671,13 +1059,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-4-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1694,8 +1082,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-5-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5 nox-session: ci-test-onedir @@ -1717,13 +1105,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-5-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1740,8 +1128,8 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - ubuntu-2004-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04 nox-session: ci-test-onedir @@ -1762,13 +1150,13 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - ubuntu-2004-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1784,8 +1172,8 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - ubuntu-2204-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04 nox-session: ci-test-onedir @@ -1806,13 +1194,13 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - ubuntu-2204-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1828,7 +1216,7 @@ jobs: needs: - prepare-workflow - build-macos-pkgs-onedir - - macos-12-ci-deps + - macos-x86_64-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-12 @@ -1850,7 +1238,7 @@ jobs: needs: - prepare-workflow - build-macos-pkgs-onedir - - macos-13-ci-deps + - macos-x86_64-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13 @@ -1872,13 +1260,13 @@ jobs: needs: - prepare-workflow - build-macos-pkgs-onedir - - macos-13-xlarge-ci-deps + - macos-arm64-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir platform: darwin - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos nox-version: 2022.8.7 @@ -1894,8 +1282,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2016-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -1916,8 +1304,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2016-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -1938,8 +1326,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2019-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -1960,8 +1348,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2019-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -1982,8 +1370,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2022-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2004,8 +1392,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2022-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2025,8 +1413,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2016-ci-deps - uses: ./.github/workflows/test-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -2047,8 +1435,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2019-ci-deps - uses: ./.github/workflows/test-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -2069,8 +1457,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2022-ci-deps - uses: ./.github/workflows/test-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2091,7 +1479,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-12-ci-deps + - macos-x86_64-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-12 @@ -2113,7 +1501,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-13-ci-deps + - macos-x86_64-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13 @@ -2135,13 +1523,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-13-xlarge-ci-deps + - macos-arm64-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir platform: darwin - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2157,8 +1545,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - almalinux-8-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-8 nox-session: ci-test-onedir @@ -2179,8 +1567,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - almalinux-9-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-9 nox-session: ci-test-onedir @@ -2201,8 +1589,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2 nox-session: ci-test-onedir @@ -2223,13 +1611,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2245,8 +1633,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2023-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023 nox-session: ci-test-onedir @@ -2267,13 +1655,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2023-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2289,8 +1677,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - archlinux-lts-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: archlinux-lts nox-session: ci-test-onedir @@ -2311,8 +1699,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centos-7-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centos-7 nox-session: ci-test-onedir @@ -2333,8 +1721,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centosstream-8-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-8 nox-session: ci-test-onedir @@ -2355,8 +1743,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centosstream-9-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-9 nox-session: ci-test-onedir @@ -2377,8 +1765,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-10-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-10 nox-session: ci-test-onedir @@ -2399,8 +1787,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-11-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11 nox-session: ci-test-onedir @@ -2421,13 +1809,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-11-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2443,8 +1831,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-12-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12 nox-session: ci-test-onedir @@ -2465,13 +1853,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-12-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2487,8 +1875,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - fedora-37-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-37 nox-session: ci-test-onedir @@ -2509,8 +1897,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - fedora-38-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-38 nox-session: ci-test-onedir @@ -2531,8 +1919,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - opensuse-15-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: opensuse-15 nox-session: ci-test-onedir @@ -2553,8 +1941,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-3-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3 nox-session: ci-test-onedir @@ -2575,13 +1963,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-3-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2597,8 +1985,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-4-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4 nox-session: ci-test-onedir @@ -2620,13 +2008,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-4-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2643,8 +2031,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-5-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5 nox-session: ci-test-onedir @@ -2666,13 +2054,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-5-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2689,8 +2077,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2004-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04 nox-session: ci-test-onedir @@ -2711,13 +2099,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2004-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2733,8 +2121,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2204-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04 nox-session: ci-test-onedir @@ -2755,13 +2143,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2204-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2778,47 +2166,11 @@ jobs: runs-on: ubuntu-latest needs: - prepare-workflow - - windows-2016-ci-deps - - windows-2019-ci-deps - - windows-2022-ci-deps - - macos-12-ci-deps - - macos-13-ci-deps - - macos-13-xlarge-ci-deps - - almalinux-8-ci-deps - - almalinux-8-arm64-ci-deps - - almalinux-9-ci-deps - - almalinux-9-arm64-ci-deps - - amazonlinux-2-ci-deps - - amazonlinux-2-arm64-ci-deps - - amazonlinux-2023-ci-deps - - amazonlinux-2023-arm64-ci-deps - - archlinux-lts-ci-deps - - centos-7-ci-deps - - centos-7-arm64-ci-deps - - centosstream-8-ci-deps - - centosstream-8-arm64-ci-deps - - centosstream-9-ci-deps - - centosstream-9-arm64-ci-deps - - debian-10-ci-deps - - debian-11-ci-deps - - debian-11-arm64-ci-deps - - debian-12-ci-deps - - debian-12-arm64-ci-deps - - fedora-37-ci-deps - - fedora-37-arm64-ci-deps - - fedora-38-ci-deps - - fedora-38-arm64-ci-deps - - opensuse-15-ci-deps - - photonos-3-ci-deps - - photonos-3-arm64-ci-deps - - photonos-4-ci-deps - - photonos-4-arm64-ci-deps - - photonos-5-ci-deps - - photonos-5-arm64-ci-deps - - ubuntu-2004-ci-deps - - ubuntu-2004-arm64-ci-deps - - ubuntu-2204-ci-deps - - ubuntu-2204-arm64-ci-deps + - windows-amd64-ci-deps + - macos-x86_64-ci-deps + - macos-arm64-ci-deps + - linux-x86_64-ci-deps + - linux-arm64-ci-deps - windows-2016 - windows-2019 - windows-2022 @@ -2979,47 +2331,11 @@ jobs: - build-windows-pkgs-src - build-macos-pkgs-src - combine-all-code-coverage - - windows-2016-ci-deps - - windows-2019-ci-deps - - windows-2022-ci-deps - - macos-12-ci-deps - - macos-13-ci-deps - - macos-13-xlarge-ci-deps - - almalinux-8-ci-deps - - almalinux-8-arm64-ci-deps - - almalinux-9-ci-deps - - almalinux-9-arm64-ci-deps - - amazonlinux-2-ci-deps - - amazonlinux-2-arm64-ci-deps - - amazonlinux-2023-ci-deps - - amazonlinux-2023-arm64-ci-deps - - archlinux-lts-ci-deps - - centos-7-ci-deps - - centos-7-arm64-ci-deps - - centosstream-8-ci-deps - - centosstream-8-arm64-ci-deps - - centosstream-9-ci-deps - - centosstream-9-arm64-ci-deps - - debian-10-ci-deps - - debian-11-ci-deps - - debian-11-arm64-ci-deps - - debian-12-ci-deps - - debian-12-arm64-ci-deps - - fedora-37-ci-deps - - fedora-37-arm64-ci-deps - - fedora-38-ci-deps - - fedora-38-arm64-ci-deps - - opensuse-15-ci-deps - - photonos-3-ci-deps - - photonos-3-arm64-ci-deps - - photonos-4-ci-deps - - photonos-4-arm64-ci-deps - - photonos-5-ci-deps - - photonos-5-arm64-ci-deps - - ubuntu-2004-ci-deps - - ubuntu-2004-arm64-ci-deps - - ubuntu-2204-ci-deps - - ubuntu-2204-arm64-ci-deps + - windows-amd64-ci-deps + - macos-x86_64-ci-deps + - macos-arm64-ci-deps + - linux-x86_64-ci-deps + - linux-arm64-ci-deps - windows-2016 - windows-2019 - windows-2022 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 746c6e3f881f..77de8acad97b 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -676,47 +676,13 @@ jobs: sign-packages: true secrets: inherit - windows-2016-ci-deps: - name: Windows 2016 Deps + windows-amd64-ci-deps: + name: Windows amd64 CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2016 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - windows-2019-ci-deps: - name: Windows 2019 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2019 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - windows-2022-ci-deps: - name: Windows 2022 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml + uses: ./.github/workflows/build-deps-ci-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -727,8 +693,8 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - macos-12-ci-deps: - name: macOS 12 Deps + macos-x86_64-ci-deps: + name: MacOS x86_64 CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow @@ -744,25 +710,8 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - macos-13-ci-deps: - name: macOS 13 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-13 - nox-session: ci-test-onedir - platform: darwin - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-13-xlarge-ci-deps: - name: macOS 13 Arm64 Deps + macos-arm64-ci-deps: + name: MacOS arm64 CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow @@ -772,172 +721,19 @@ jobs: distro-slug: macos-13-xlarge nox-session: ci-test-onedir platform: darwin - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-8-ci-deps: - name: Alma Linux 8 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-8-arm64-ci-deps: - name: Alma Linux 8 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-9-ci-deps: - name: Alma Linux 9 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-9-arm64-ci-deps: - name: Alma Linux 9 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2-ci-deps: - name: Amazon Linux 2 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2-arm64-ci-deps: - name: Amazon Linux 2 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - amazonlinux-2023-ci-deps: - name: Amazon Linux 2023 Deps + linux-x86_64-ci-deps: + name: Linux x86_64 CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2023 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2023-arm64-ci-deps: - name: Amazon Linux 2023 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2023-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - archlinux-lts-ci-deps: - name: Arch Linux LTS Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: archlinux-lts - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centos-7-ci-deps: - name: CentOS 7 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + uses: ./.github/workflows/build-deps-ci-action-linux.yml with: distro-slug: centos-7 nox-session: ci-test-onedir @@ -948,426 +744,18 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - centos-7-arm64-ci-deps: - name: CentOS 7 Arm64 Deps + linux-arm64-ci-deps: + name: Linux arm64 CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + uses: ./.github/workflows/build-deps-ci-action-linux.yml with: distro-slug: centos-7-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-8-ci-deps: - name: CentOS Stream 8 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-8-arm64-ci-deps: - name: CentOS Stream 8 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-9-ci-deps: - name: CentOS Stream 9 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-9-arm64-ci-deps: - name: CentOS Stream 9 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-10-ci-deps: - name: Debian 10 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-10 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-11-ci-deps: - name: Debian 11 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-11 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-11-arm64-ci-deps: - name: Debian 11 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-11-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-12-ci-deps: - name: Debian 12 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-12 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-12-arm64-ci-deps: - name: Debian 12 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-12-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-37-ci-deps: - name: Fedora 37 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-37 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-37-arm64-ci-deps: - name: Fedora 37 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-37-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-38-ci-deps: - name: Fedora 38 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-38 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-38-arm64-ci-deps: - name: Fedora 38 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-38-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - opensuse-15-ci-deps: - name: Opensuse 15 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: opensuse-15 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-3-ci-deps: - name: Photon OS 3 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-3 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-3-arm64-ci-deps: - name: Photon OS 3 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-3-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-4-ci-deps: - name: Photon OS 4 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-4-arm64-ci-deps: - name: Photon OS 4 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-5-ci-deps: - name: Photon OS 5 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-5-arm64-ci-deps: - name: Photon OS 5 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-5-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2004-ci-deps: - name: Ubuntu 20.04 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-20.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2004-arm64-ci-deps: - name: Ubuntu 20.04 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-20.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2204-ci-deps: - name: Ubuntu 22.04 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-22.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2204-arm64-ci-deps: - name: Ubuntu 22.04 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-22.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -1379,8 +767,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - amazonlinux-2-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2 nox-session: ci-test-onedir @@ -1401,13 +789,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - amazonlinux-2-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1423,8 +811,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - amazonlinux-2023-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023 nox-session: ci-test-onedir @@ -1445,13 +833,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - amazonlinux-2023-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1467,8 +855,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - centos-7-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centos-7 nox-session: ci-test-onedir @@ -1489,8 +877,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - centosstream-8-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-8 nox-session: ci-test-onedir @@ -1511,8 +899,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - centosstream-9-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9 nox-session: ci-test-onedir @@ -1533,13 +921,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - centosstream-9-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1555,8 +943,8 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - debian-10-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-10 nox-session: ci-test-onedir @@ -1577,8 +965,8 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - debian-11-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11 nox-session: ci-test-onedir @@ -1599,13 +987,13 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - debian-11-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1621,8 +1009,8 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - debian-12-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12 nox-session: ci-test-onedir @@ -1643,13 +1031,13 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - debian-12-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1665,8 +1053,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-3-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3 nox-session: ci-test-onedir @@ -1687,13 +1075,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-3-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1709,8 +1097,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-4-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4 nox-session: ci-test-onedir @@ -1732,13 +1120,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-4-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1755,8 +1143,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-5-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5 nox-session: ci-test-onedir @@ -1778,13 +1166,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-5-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1801,8 +1189,8 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - ubuntu-2004-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04 nox-session: ci-test-onedir @@ -1823,13 +1211,13 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - ubuntu-2004-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1845,8 +1233,8 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - ubuntu-2204-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04 nox-session: ci-test-onedir @@ -1867,13 +1255,13 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - ubuntu-2204-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1889,7 +1277,7 @@ jobs: needs: - prepare-workflow - build-macos-pkgs-onedir - - macos-12-ci-deps + - macos-x86_64-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-12 @@ -1911,7 +1299,7 @@ jobs: needs: - prepare-workflow - build-macos-pkgs-onedir - - macos-13-ci-deps + - macos-x86_64-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13 @@ -1933,13 +1321,13 @@ jobs: needs: - prepare-workflow - build-macos-pkgs-onedir - - macos-13-xlarge-ci-deps + - macos-arm64-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir platform: darwin - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos nox-version: 2022.8.7 @@ -1955,8 +1343,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2016-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -1977,8 +1365,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2016-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -1999,8 +1387,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2019-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -2021,8 +1409,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2019-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -2043,8 +1431,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2022-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2065,8 +1453,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2022-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2086,8 +1474,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2016-ci-deps - uses: ./.github/workflows/test-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -2108,8 +1496,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2019-ci-deps - uses: ./.github/workflows/test-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -2130,8 +1518,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2022-ci-deps - uses: ./.github/workflows/test-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2152,7 +1540,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-12-ci-deps + - macos-x86_64-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-12 @@ -2174,7 +1562,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-13-ci-deps + - macos-x86_64-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13 @@ -2196,13 +1584,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-13-xlarge-ci-deps + - macos-arm64-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir platform: darwin - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2218,8 +1606,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - almalinux-8-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-8 nox-session: ci-test-onedir @@ -2240,8 +1628,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - almalinux-9-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-9 nox-session: ci-test-onedir @@ -2262,8 +1650,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2 nox-session: ci-test-onedir @@ -2284,13 +1672,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2306,8 +1694,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2023-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023 nox-session: ci-test-onedir @@ -2328,13 +1716,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2023-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2350,8 +1738,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - archlinux-lts-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: archlinux-lts nox-session: ci-test-onedir @@ -2372,8 +1760,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centos-7-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centos-7 nox-session: ci-test-onedir @@ -2394,8 +1782,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centosstream-8-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-8 nox-session: ci-test-onedir @@ -2416,8 +1804,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centosstream-9-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-9 nox-session: ci-test-onedir @@ -2438,8 +1826,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-10-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-10 nox-session: ci-test-onedir @@ -2460,8 +1848,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-11-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11 nox-session: ci-test-onedir @@ -2482,13 +1870,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-11-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2504,8 +1892,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-12-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12 nox-session: ci-test-onedir @@ -2526,13 +1914,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-12-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2548,8 +1936,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - fedora-37-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-37 nox-session: ci-test-onedir @@ -2570,8 +1958,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - fedora-38-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-38 nox-session: ci-test-onedir @@ -2592,8 +1980,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - opensuse-15-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: opensuse-15 nox-session: ci-test-onedir @@ -2614,8 +2002,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-3-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3 nox-session: ci-test-onedir @@ -2636,13 +2024,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-3-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2658,8 +2046,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-4-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4 nox-session: ci-test-onedir @@ -2681,13 +2069,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-4-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2704,8 +2092,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-5-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5 nox-session: ci-test-onedir @@ -2727,13 +2115,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-5-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2750,8 +2138,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2004-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04 nox-session: ci-test-onedir @@ -2772,13 +2160,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2004-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2794,8 +2182,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2204-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04 nox-session: ci-test-onedir @@ -2816,13 +2204,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2204-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2839,47 +2227,11 @@ jobs: runs-on: ubuntu-latest needs: - prepare-workflow - - windows-2016-ci-deps - - windows-2019-ci-deps - - windows-2022-ci-deps - - macos-12-ci-deps - - macos-13-ci-deps - - macos-13-xlarge-ci-deps - - almalinux-8-ci-deps - - almalinux-8-arm64-ci-deps - - almalinux-9-ci-deps - - almalinux-9-arm64-ci-deps - - amazonlinux-2-ci-deps - - amazonlinux-2-arm64-ci-deps - - amazonlinux-2023-ci-deps - - amazonlinux-2023-arm64-ci-deps - - archlinux-lts-ci-deps - - centos-7-ci-deps - - centos-7-arm64-ci-deps - - centosstream-8-ci-deps - - centosstream-8-arm64-ci-deps - - centosstream-9-ci-deps - - centosstream-9-arm64-ci-deps - - debian-10-ci-deps - - debian-11-ci-deps - - debian-11-arm64-ci-deps - - debian-12-ci-deps - - debian-12-arm64-ci-deps - - fedora-37-ci-deps - - fedora-37-arm64-ci-deps - - fedora-38-ci-deps - - fedora-38-arm64-ci-deps - - opensuse-15-ci-deps - - photonos-3-ci-deps - - photonos-3-arm64-ci-deps - - photonos-4-ci-deps - - photonos-4-arm64-ci-deps - - photonos-5-ci-deps - - photonos-5-arm64-ci-deps - - ubuntu-2004-ci-deps - - ubuntu-2004-arm64-ci-deps - - ubuntu-2204-ci-deps - - ubuntu-2204-arm64-ci-deps + - windows-amd64-ci-deps + - macos-x86_64-ci-deps + - macos-arm64-ci-deps + - linux-x86_64-ci-deps + - linux-arm64-ci-deps - windows-2016 - windows-2019 - windows-2022 @@ -3807,47 +3159,11 @@ jobs: - build-windows-repo - build-macos-repo - build-onedir-repo - - windows-2016-ci-deps - - windows-2019-ci-deps - - windows-2022-ci-deps - - macos-12-ci-deps - - macos-13-ci-deps - - macos-13-xlarge-ci-deps - - almalinux-8-ci-deps - - almalinux-8-arm64-ci-deps - - almalinux-9-ci-deps - - almalinux-9-arm64-ci-deps - - amazonlinux-2-ci-deps - - amazonlinux-2-arm64-ci-deps - - amazonlinux-2023-ci-deps - - amazonlinux-2023-arm64-ci-deps - - archlinux-lts-ci-deps - - centos-7-ci-deps - - centos-7-arm64-ci-deps - - centosstream-8-ci-deps - - centosstream-8-arm64-ci-deps - - centosstream-9-ci-deps - - centosstream-9-arm64-ci-deps - - debian-10-ci-deps - - debian-11-ci-deps - - debian-11-arm64-ci-deps - - debian-12-ci-deps - - debian-12-arm64-ci-deps - - fedora-37-ci-deps - - fedora-37-arm64-ci-deps - - fedora-38-ci-deps - - fedora-38-arm64-ci-deps - - opensuse-15-ci-deps - - photonos-3-ci-deps - - photonos-3-arm64-ci-deps - - photonos-4-ci-deps - - photonos-4-arm64-ci-deps - - photonos-5-ci-deps - - photonos-5-arm64-ci-deps - - ubuntu-2004-ci-deps - - ubuntu-2004-arm64-ci-deps - - ubuntu-2204-ci-deps - - ubuntu-2204-arm64-ci-deps + - windows-amd64-ci-deps + - macos-x86_64-ci-deps + - macos-arm64-ci-deps + - linux-x86_64-ci-deps + - linux-arm64-ci-deps - windows-2016 - windows-2019 - windows-2022 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6cb6ab1d27e6..bc0a5732ebcf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -167,44 +167,12 @@ jobs: retention-days: 7 if-no-files-found: error - windows-2016-ci-deps: - name: Windows 2016 Deps + windows-amd64-ci-deps: + name: Windows amd64 CI Deps needs: - prepare-workflow - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2016 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - windows-2019-ci-deps: - name: Windows 2019 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2019 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - windows-2022-ci-deps: - name: Windows 2022 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml + uses: ./.github/workflows/build-deps-ci-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -215,8 +183,8 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - macos-12-ci-deps: - name: macOS 12 Deps + macos-x86_64-ci-deps: + name: MacOS x86_64 CI Deps needs: - prepare-workflow - download-onedir-artifact @@ -231,24 +199,8 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - macos-13-ci-deps: - name: macOS 13 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-13 - nox-session: ci-test-onedir - platform: darwin - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-13-xlarge-ci-deps: - name: macOS 13 Arm64 Deps + macos-arm64-ci-deps: + name: MacOS arm64 CI Deps needs: - prepare-workflow - download-onedir-artifact @@ -257,162 +209,18 @@ jobs: distro-slug: macos-13-xlarge nox-session: ci-test-onedir platform: darwin - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-8-ci-deps: - name: Alma Linux 8 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 + arch: arm64 nox-version: 2022.8.7 python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - almalinux-8-arm64-ci-deps: - name: Alma Linux 8 Arm64 Deps + linux-x86_64-ci-deps: + name: Linux x86_64 CI Deps needs: - prepare-workflow - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-9-ci-deps: - name: Alma Linux 9 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-9-arm64-ci-deps: - name: Alma Linux 9 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2-ci-deps: - name: Amazon Linux 2 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2-arm64-ci-deps: - name: Amazon Linux 2 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2023-ci-deps: - name: Amazon Linux 2023 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2023 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2023-arm64-ci-deps: - name: Amazon Linux 2023 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2023-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - archlinux-lts-ci-deps: - name: Arch Linux LTS Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: archlinux-lts - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centos-7-ci-deps: - name: CentOS 7 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml + uses: ./.github/workflows/build-deps-ci-action-linux.yml with: distro-slug: centos-7 nox-session: ci-test-onedir @@ -423,401 +231,17 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - centos-7-arm64-ci-deps: - name: CentOS 7 Arm64 Deps + linux-arm64-ci-deps: + name: Linux arm64 CI Deps needs: - prepare-workflow - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml + uses: ./.github/workflows/build-deps-ci-action-linux.yml with: distro-slug: centos-7-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-8-ci-deps: - name: CentOS Stream 8 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-8-arm64-ci-deps: - name: CentOS Stream 8 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-9-ci-deps: - name: CentOS Stream 9 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-9-arm64-ci-deps: - name: CentOS Stream 9 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-10-ci-deps: - name: Debian 10 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-10 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-11-ci-deps: - name: Debian 11 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-11 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-11-arm64-ci-deps: - name: Debian 11 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-11-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-12-ci-deps: - name: Debian 12 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-12 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-12-arm64-ci-deps: - name: Debian 12 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-12-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-37-ci-deps: - name: Fedora 37 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-37 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-37-arm64-ci-deps: - name: Fedora 37 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-37-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-38-ci-deps: - name: Fedora 38 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-38 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-38-arm64-ci-deps: - name: Fedora 38 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-38-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - opensuse-15-ci-deps: - name: Opensuse 15 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: opensuse-15 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-3-ci-deps: - name: Photon OS 3 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-3 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-3-arm64-ci-deps: - name: Photon OS 3 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-3-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-4-ci-deps: - name: Photon OS 4 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-4-arm64-ci-deps: - name: Photon OS 4 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-5-ci-deps: - name: Photon OS 5 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-5-arm64-ci-deps: - name: Photon OS 5 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-5-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2004-ci-deps: - name: Ubuntu 20.04 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-20.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2004-arm64-ci-deps: - name: Ubuntu 20.04 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-20.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2204-ci-deps: - name: Ubuntu 22.04 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-22.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2204-arm64-ci-deps: - name: Ubuntu 22.04 Arm64 Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-22.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -894,43 +318,11 @@ jobs: needs: - prepare-workflow - publish-repositories - - almalinux-8-arm64-ci-deps - - almalinux-8-ci-deps - - almalinux-9-arm64-ci-deps - - almalinux-9-ci-deps - - amazonlinux-2-arm64-ci-deps - - amazonlinux-2-ci-deps - - amazonlinux-2023-arm64-ci-deps - - amazonlinux-2023-ci-deps - - centos-7-arm64-ci-deps - - centos-7-ci-deps - - centosstream-8-arm64-ci-deps - - centosstream-8-ci-deps - - centosstream-9-arm64-ci-deps - - centosstream-9-ci-deps - - debian-10-ci-deps - - debian-11-arm64-ci-deps - - debian-11-ci-deps - - debian-12-arm64-ci-deps - - debian-12-ci-deps - - fedora-37-arm64-ci-deps - - fedora-37-ci-deps - - fedora-38-arm64-ci-deps - - fedora-38-ci-deps - - macos-12-ci-deps - - macos-13-ci-deps - - macos-13-xlarge-ci-deps - - photonos-3-arm64-ci-deps - - photonos-3-ci-deps - - photonos-4-arm64-ci-deps - - photonos-4-ci-deps - - photonos-5-arm64-ci-deps - - photonos-5-ci-deps - - ubuntu-2004-arm64-ci-deps - - ubuntu-2004-ci-deps - - ubuntu-2204-arm64-ci-deps - - ubuntu-2204-ci-deps - - windows-2022-ci-deps + - linux-arm64-ci-deps + - linux-x86_64-ci-deps + - macos-arm64-ci-deps + - macos-x86_64-ci-deps + - windows-amd64-ci-deps - download-onedir-artifact uses: ./.github/workflows/test-package-downloads-action.yml with: @@ -1122,47 +514,11 @@ jobs: - pkg-download-tests - release - publish-pypi - - windows-2016-ci-deps - - windows-2019-ci-deps - - windows-2022-ci-deps - - macos-12-ci-deps - - macos-13-ci-deps - - macos-13-xlarge-ci-deps - - almalinux-8-ci-deps - - almalinux-8-arm64-ci-deps - - almalinux-9-ci-deps - - almalinux-9-arm64-ci-deps - - amazonlinux-2-ci-deps - - amazonlinux-2-arm64-ci-deps - - amazonlinux-2023-ci-deps - - amazonlinux-2023-arm64-ci-deps - - archlinux-lts-ci-deps - - centos-7-ci-deps - - centos-7-arm64-ci-deps - - centosstream-8-ci-deps - - centosstream-8-arm64-ci-deps - - centosstream-9-ci-deps - - centosstream-9-arm64-ci-deps - - debian-10-ci-deps - - debian-11-ci-deps - - debian-11-arm64-ci-deps - - debian-12-ci-deps - - debian-12-arm64-ci-deps - - fedora-37-ci-deps - - fedora-37-arm64-ci-deps - - fedora-38-ci-deps - - fedora-38-arm64-ci-deps - - opensuse-15-ci-deps - - photonos-3-ci-deps - - photonos-3-arm64-ci-deps - - photonos-4-ci-deps - - photonos-4-arm64-ci-deps - - photonos-5-ci-deps - - photonos-5-arm64-ci-deps - - ubuntu-2004-ci-deps - - ubuntu-2004-arm64-ci-deps - - ubuntu-2204-ci-deps - - ubuntu-2204-arm64-ci-deps + - windows-amd64-ci-deps + - macos-x86_64-ci-deps + - macos-arm64-ci-deps + - linux-x86_64-ci-deps + - linux-arm64-ci-deps steps: - name: Get workflow information id: get-workflow-info diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index ccb79b95fc2f..59bd58d986e4 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -649,47 +649,13 @@ jobs: python-version: "3.10.13" source: "src" - windows-2016-ci-deps: - name: Windows 2016 Deps + windows-amd64-ci-deps: + name: Windows amd64 CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2016 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - windows-2019-ci-deps: - name: Windows 2019 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2019 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - windows-2022-ci-deps: - name: Windows 2022 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml + uses: ./.github/workflows/build-deps-ci-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -700,8 +666,8 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - macos-12-ci-deps: - name: macOS 12 Deps + macos-x86_64-ci-deps: + name: MacOS x86_64 CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow @@ -717,25 +683,8 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - macos-13-ci-deps: - name: macOS 13 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-13 - nox-session: ci-test-onedir - platform: darwin - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-13-xlarge-ci-deps: - name: macOS 13 Arm64 Deps + macos-arm64-ci-deps: + name: MacOS arm64 CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow @@ -745,172 +694,19 @@ jobs: distro-slug: macos-13-xlarge nox-session: ci-test-onedir platform: darwin - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-8-ci-deps: - name: Alma Linux 8 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-8-arm64-ci-deps: - name: Alma Linux 8 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-9-ci-deps: - name: Alma Linux 9 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-9-arm64-ci-deps: - name: Alma Linux 9 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2-ci-deps: - name: Amazon Linux 2 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2-arm64-ci-deps: - name: Amazon Linux 2 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - amazonlinux-2023-ci-deps: - name: Amazon Linux 2023 Deps + linux-x86_64-ci-deps: + name: Linux x86_64 CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2023 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2023-arm64-ci-deps: - name: Amazon Linux 2023 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2023-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - archlinux-lts-ci-deps: - name: Arch Linux LTS Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: archlinux-lts - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centos-7-ci-deps: - name: CentOS 7 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + uses: ./.github/workflows/build-deps-ci-action-linux.yml with: distro-slug: centos-7 nox-session: ci-test-onedir @@ -921,426 +717,18 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - centos-7-arm64-ci-deps: - name: CentOS 7 Arm64 Deps + linux-arm64-ci-deps: + name: Linux arm64 CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + uses: ./.github/workflows/build-deps-ci-action-linux.yml with: distro-slug: centos-7-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-8-ci-deps: - name: CentOS Stream 8 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-8-arm64-ci-deps: - name: CentOS Stream 8 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-9-ci-deps: - name: CentOS Stream 9 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-9-arm64-ci-deps: - name: CentOS Stream 9 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-10-ci-deps: - name: Debian 10 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-10 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-11-ci-deps: - name: Debian 11 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-11 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-11-arm64-ci-deps: - name: Debian 11 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-11-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-12-ci-deps: - name: Debian 12 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-12 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-12-arm64-ci-deps: - name: Debian 12 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-12-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-37-ci-deps: - name: Fedora 37 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-37 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-37-arm64-ci-deps: - name: Fedora 37 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-37-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-38-ci-deps: - name: Fedora 38 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-38 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-38-arm64-ci-deps: - name: Fedora 38 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-38-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - opensuse-15-ci-deps: - name: Opensuse 15 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: opensuse-15 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-3-ci-deps: - name: Photon OS 3 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-3 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-3-arm64-ci-deps: - name: Photon OS 3 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-3-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-4-ci-deps: - name: Photon OS 4 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-4-arm64-ci-deps: - name: Photon OS 4 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-5-ci-deps: - name: Photon OS 5 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-5-arm64-ci-deps: - name: Photon OS 5 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-5-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2004-ci-deps: - name: Ubuntu 20.04 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-20.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2004-arm64-ci-deps: - name: Ubuntu 20.04 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-20.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2204-ci-deps: - name: Ubuntu 22.04 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-22.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2204-arm64-ci-deps: - name: Ubuntu 22.04 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-22.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -1352,8 +740,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - amazonlinux-2-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2 nox-session: ci-test-onedir @@ -1374,13 +762,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - amazonlinux-2-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1396,8 +784,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - amazonlinux-2023-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023 nox-session: ci-test-onedir @@ -1418,13 +806,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - amazonlinux-2023-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1440,8 +828,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - centos-7-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centos-7 nox-session: ci-test-onedir @@ -1462,8 +850,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - centosstream-8-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-8 nox-session: ci-test-onedir @@ -1484,8 +872,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - centosstream-9-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9 nox-session: ci-test-onedir @@ -1506,13 +894,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - centosstream-9-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1528,8 +916,8 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - debian-10-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-10 nox-session: ci-test-onedir @@ -1550,8 +938,8 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - debian-11-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11 nox-session: ci-test-onedir @@ -1572,13 +960,13 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - debian-11-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1594,8 +982,8 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - debian-12-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12 nox-session: ci-test-onedir @@ -1616,13 +1004,13 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - debian-12-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1638,8 +1026,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-3-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3 nox-session: ci-test-onedir @@ -1660,13 +1048,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-3-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1682,8 +1070,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-4-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4 nox-session: ci-test-onedir @@ -1705,13 +1093,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-4-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1728,8 +1116,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-5-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5 nox-session: ci-test-onedir @@ -1751,13 +1139,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-5-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1774,8 +1162,8 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - ubuntu-2004-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04 nox-session: ci-test-onedir @@ -1796,13 +1184,13 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - ubuntu-2004-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1818,8 +1206,8 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - ubuntu-2204-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04 nox-session: ci-test-onedir @@ -1840,13 +1228,13 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - ubuntu-2204-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1862,7 +1250,7 @@ jobs: needs: - prepare-workflow - build-macos-pkgs-onedir - - macos-12-ci-deps + - macos-x86_64-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-12 @@ -1884,7 +1272,7 @@ jobs: needs: - prepare-workflow - build-macos-pkgs-onedir - - macos-13-ci-deps + - macos-x86_64-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13 @@ -1906,13 +1294,13 @@ jobs: needs: - prepare-workflow - build-macos-pkgs-onedir - - macos-13-xlarge-ci-deps + - macos-arm64-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir platform: darwin - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos nox-version: 2022.8.7 @@ -1928,8 +1316,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2016-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -1950,8 +1338,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2016-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -1972,8 +1360,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2019-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -1994,8 +1382,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2019-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -2016,8 +1404,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2022-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2038,8 +1426,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2022-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2059,8 +1447,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2016-ci-deps - uses: ./.github/workflows/test-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -2081,8 +1469,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2019-ci-deps - uses: ./.github/workflows/test-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -2103,8 +1491,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2022-ci-deps - uses: ./.github/workflows/test-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2125,7 +1513,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-12-ci-deps + - macos-x86_64-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-12 @@ -2147,7 +1535,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-13-ci-deps + - macos-x86_64-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13 @@ -2169,13 +1557,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-13-xlarge-ci-deps + - macos-arm64-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir platform: darwin - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2191,8 +1579,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - almalinux-8-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-8 nox-session: ci-test-onedir @@ -2213,8 +1601,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - almalinux-9-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-9 nox-session: ci-test-onedir @@ -2235,8 +1623,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2 nox-session: ci-test-onedir @@ -2257,13 +1645,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2279,8 +1667,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2023-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023 nox-session: ci-test-onedir @@ -2301,13 +1689,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2023-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2323,8 +1711,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - archlinux-lts-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: archlinux-lts nox-session: ci-test-onedir @@ -2345,8 +1733,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centos-7-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centos-7 nox-session: ci-test-onedir @@ -2367,8 +1755,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centosstream-8-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-8 nox-session: ci-test-onedir @@ -2389,8 +1777,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centosstream-9-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-9 nox-session: ci-test-onedir @@ -2411,8 +1799,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-10-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-10 nox-session: ci-test-onedir @@ -2433,8 +1821,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-11-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11 nox-session: ci-test-onedir @@ -2455,13 +1843,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-11-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2477,8 +1865,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-12-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12 nox-session: ci-test-onedir @@ -2499,13 +1887,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-12-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2521,8 +1909,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - fedora-37-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-37 nox-session: ci-test-onedir @@ -2543,8 +1931,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - fedora-38-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-38 nox-session: ci-test-onedir @@ -2565,8 +1953,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - opensuse-15-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: opensuse-15 nox-session: ci-test-onedir @@ -2587,8 +1975,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-3-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3 nox-session: ci-test-onedir @@ -2609,13 +1997,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-3-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2631,8 +2019,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-4-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4 nox-session: ci-test-onedir @@ -2654,13 +2042,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-4-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2677,8 +2065,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-5-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5 nox-session: ci-test-onedir @@ -2700,13 +2088,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-5-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2723,8 +2111,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2004-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04 nox-session: ci-test-onedir @@ -2745,13 +2133,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2004-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2767,8 +2155,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2204-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04 nox-session: ci-test-onedir @@ -2789,13 +2177,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2204-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2812,47 +2200,11 @@ jobs: runs-on: ubuntu-latest needs: - prepare-workflow - - windows-2016-ci-deps - - windows-2019-ci-deps - - windows-2022-ci-deps - - macos-12-ci-deps - - macos-13-ci-deps - - macos-13-xlarge-ci-deps - - almalinux-8-ci-deps - - almalinux-8-arm64-ci-deps - - almalinux-9-ci-deps - - almalinux-9-arm64-ci-deps - - amazonlinux-2-ci-deps - - amazonlinux-2-arm64-ci-deps - - amazonlinux-2023-ci-deps - - amazonlinux-2023-arm64-ci-deps - - archlinux-lts-ci-deps - - centos-7-ci-deps - - centos-7-arm64-ci-deps - - centosstream-8-ci-deps - - centosstream-8-arm64-ci-deps - - centosstream-9-ci-deps - - centosstream-9-arm64-ci-deps - - debian-10-ci-deps - - debian-11-ci-deps - - debian-11-arm64-ci-deps - - debian-12-ci-deps - - debian-12-arm64-ci-deps - - fedora-37-ci-deps - - fedora-37-arm64-ci-deps - - fedora-38-ci-deps - - fedora-38-arm64-ci-deps - - opensuse-15-ci-deps - - photonos-3-ci-deps - - photonos-3-arm64-ci-deps - - photonos-4-ci-deps - - photonos-4-arm64-ci-deps - - photonos-5-ci-deps - - photonos-5-arm64-ci-deps - - ubuntu-2004-ci-deps - - ubuntu-2004-arm64-ci-deps - - ubuntu-2204-ci-deps - - ubuntu-2204-arm64-ci-deps + - windows-amd64-ci-deps + - macos-x86_64-ci-deps + - macos-arm64-ci-deps + - linux-x86_64-ci-deps + - linux-arm64-ci-deps - windows-2016 - windows-2019 - windows-2022 @@ -3015,47 +2367,11 @@ jobs: - build-windows-pkgs-src - build-macos-pkgs-src - combine-all-code-coverage - - windows-2016-ci-deps - - windows-2019-ci-deps - - windows-2022-ci-deps - - macos-12-ci-deps - - macos-13-ci-deps - - macos-13-xlarge-ci-deps - - almalinux-8-ci-deps - - almalinux-8-arm64-ci-deps - - almalinux-9-ci-deps - - almalinux-9-arm64-ci-deps - - amazonlinux-2-ci-deps - - amazonlinux-2-arm64-ci-deps - - amazonlinux-2023-ci-deps - - amazonlinux-2023-arm64-ci-deps - - archlinux-lts-ci-deps - - centos-7-ci-deps - - centos-7-arm64-ci-deps - - centosstream-8-ci-deps - - centosstream-8-arm64-ci-deps - - centosstream-9-ci-deps - - centosstream-9-arm64-ci-deps - - debian-10-ci-deps - - debian-11-ci-deps - - debian-11-arm64-ci-deps - - debian-12-ci-deps - - debian-12-arm64-ci-deps - - fedora-37-ci-deps - - fedora-37-arm64-ci-deps - - fedora-38-ci-deps - - fedora-38-arm64-ci-deps - - opensuse-15-ci-deps - - photonos-3-ci-deps - - photonos-3-arm64-ci-deps - - photonos-4-ci-deps - - photonos-4-arm64-ci-deps - - photonos-5-ci-deps - - photonos-5-arm64-ci-deps - - ubuntu-2004-ci-deps - - ubuntu-2004-arm64-ci-deps - - ubuntu-2204-ci-deps - - ubuntu-2204-arm64-ci-deps + - windows-amd64-ci-deps + - macos-x86_64-ci-deps + - macos-arm64-ci-deps + - linux-x86_64-ci-deps + - linux-arm64-ci-deps - windows-2016 - windows-2019 - windows-2022 diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 43147cae346a..b39ba8635ae0 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -666,47 +666,13 @@ jobs: sign-packages: true secrets: inherit - windows-2016-ci-deps: - name: Windows 2016 Deps + windows-amd64-ci-deps: + name: Windows amd64 CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2016 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - windows-2019-ci-deps: - name: Windows 2019 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: windows-2019 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - windows-2022-ci-deps: - name: Windows 2022 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action.yml + uses: ./.github/workflows/build-deps-ci-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -717,8 +683,8 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - macos-12-ci-deps: - name: macOS 12 Deps + macos-x86_64-ci-deps: + name: MacOS x86_64 CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow @@ -734,25 +700,8 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - macos-13-ci-deps: - name: macOS 13 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-13 - nox-session: ci-test-onedir - platform: darwin - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-13-xlarge-ci-deps: - name: macOS 13 Arm64 Deps + macos-arm64-ci-deps: + name: MacOS arm64 CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow @@ -762,172 +711,19 @@ jobs: distro-slug: macos-13-xlarge nox-session: ci-test-onedir platform: darwin - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-8-ci-deps: - name: Alma Linux 8 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-8-arm64-ci-deps: - name: Alma Linux 8 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-9-ci-deps: - name: Alma Linux 9 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - almalinux-9-arm64-ci-deps: - name: Alma Linux 9 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: almalinux-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2-ci-deps: - name: Amazon Linux 2 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2-arm64-ci-deps: - name: Amazon Linux 2 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - amazonlinux-2023-ci-deps: - name: Amazon Linux 2023 Deps + linux-x86_64-ci-deps: + name: Linux x86_64 CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2023 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - amazonlinux-2023-arm64-ci-deps: - name: Amazon Linux 2023 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: amazonlinux-2023-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - archlinux-lts-ci-deps: - name: Arch Linux LTS Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: archlinux-lts - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centos-7-ci-deps: - name: CentOS 7 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + uses: ./.github/workflows/build-deps-ci-action-linux.yml with: distro-slug: centos-7 nox-session: ci-test-onedir @@ -938,426 +734,18 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - centos-7-arm64-ci-deps: - name: CentOS 7 Arm64 Deps + linux-arm64-ci-deps: + name: Linux arm64 CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml + uses: ./.github/workflows/build-deps-ci-action-linux.yml with: distro-slug: centos-7-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-8-ci-deps: - name: CentOS Stream 8 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-8 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-8-arm64-ci-deps: - name: CentOS Stream 8 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-8-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-9-ci-deps: - name: CentOS Stream 9 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-9 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - centosstream-9-arm64-ci-deps: - name: CentOS Stream 9 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: centosstream-9-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-10-ci-deps: - name: Debian 10 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-10 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-11-ci-deps: - name: Debian 11 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-11 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-11-arm64-ci-deps: - name: Debian 11 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-11-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-12-ci-deps: - name: Debian 12 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-12 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - debian-12-arm64-ci-deps: - name: Debian 12 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: debian-12-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-37-ci-deps: - name: Fedora 37 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-37 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-37-arm64-ci-deps: - name: Fedora 37 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-37-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-38-ci-deps: - name: Fedora 38 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-38 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - fedora-38-arm64-ci-deps: - name: Fedora 38 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: fedora-38-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - opensuse-15-ci-deps: - name: Opensuse 15 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: opensuse-15 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-3-ci-deps: - name: Photon OS 3 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-3 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-3-arm64-ci-deps: - name: Photon OS 3 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-3-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-4-ci-deps: - name: Photon OS 4 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-4 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-4-arm64-ci-deps: - name: Photon OS 4 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-4-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-5-ci-deps: - name: Photon OS 5 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-5 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - photonos-5-arm64-ci-deps: - name: Photon OS 5 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: photonos-5-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2004-ci-deps: - name: Ubuntu 20.04 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-20.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2004-arm64-ci-deps: - name: Ubuntu 20.04 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-20.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2204-ci-deps: - name: Ubuntu 22.04 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-22.04 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - ubuntu-2204-arm64-ci-deps: - name: Ubuntu 22.04 Arm64 Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action.yml - with: - distro-slug: ubuntu-22.04-arm64 - nox-session: ci-test-onedir - platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -1369,8 +757,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - amazonlinux-2-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2 nox-session: ci-test-onedir @@ -1391,13 +779,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - amazonlinux-2-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1413,8 +801,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - amazonlinux-2023-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023 nox-session: ci-test-onedir @@ -1435,13 +823,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - amazonlinux-2023-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1457,8 +845,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - centos-7-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centos-7 nox-session: ci-test-onedir @@ -1479,8 +867,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - centosstream-8-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-8 nox-session: ci-test-onedir @@ -1501,8 +889,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - centosstream-9-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9 nox-session: ci-test-onedir @@ -1523,13 +911,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - centosstream-9-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1545,8 +933,8 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - debian-10-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-10 nox-session: ci-test-onedir @@ -1567,8 +955,8 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - debian-11-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11 nox-session: ci-test-onedir @@ -1589,13 +977,13 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - debian-11-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1611,8 +999,8 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - debian-12-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12 nox-session: ci-test-onedir @@ -1633,13 +1021,13 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - debian-12-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1655,8 +1043,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-3-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3 nox-session: ci-test-onedir @@ -1677,13 +1065,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-3-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1699,8 +1087,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-4-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4 nox-session: ci-test-onedir @@ -1722,13 +1110,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-4-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1745,8 +1133,8 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-5-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5 nox-session: ci-test-onedir @@ -1768,13 +1156,13 @@ jobs: needs: - prepare-workflow - build-rpm-pkgs-onedir - - photonos-5-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm nox-version: 2022.8.7 @@ -1791,8 +1179,8 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - ubuntu-2004-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04 nox-session: ci-test-onedir @@ -1813,13 +1201,13 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - ubuntu-2004-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1835,8 +1223,8 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - ubuntu-2204-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04 nox-session: ci-test-onedir @@ -1857,13 +1245,13 @@ jobs: needs: - prepare-workflow - build-deb-pkgs-onedir - - ubuntu-2204-arm64-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb nox-version: 2022.8.7 @@ -1879,7 +1267,7 @@ jobs: needs: - prepare-workflow - build-macos-pkgs-onedir - - macos-12-ci-deps + - macos-x86_64-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-12 @@ -1901,7 +1289,7 @@ jobs: needs: - prepare-workflow - build-macos-pkgs-onedir - - macos-13-ci-deps + - macos-x86_64-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13 @@ -1923,13 +1311,13 @@ jobs: needs: - prepare-workflow - build-macos-pkgs-onedir - - macos-13-xlarge-ci-deps + - macos-arm64-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir platform: darwin - arch: aarch64 + arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos nox-version: 2022.8.7 @@ -1945,8 +1333,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2016-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -1967,8 +1355,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2016-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -1989,8 +1377,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2019-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -2011,8 +1399,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2019-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -2033,8 +1421,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2022-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2055,8 +1443,8 @@ jobs: needs: - prepare-workflow - build-windows-pkgs-onedir - - windows-2022-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2076,8 +1464,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2016-ci-deps - uses: ./.github/workflows/test-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2016 nox-session: ci-test-onedir @@ -2098,8 +1486,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2019-ci-deps - uses: ./.github/workflows/test-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2019 nox-session: ci-test-onedir @@ -2120,8 +1508,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-2022-ci-deps - uses: ./.github/workflows/test-action.yml + - windows-amd64-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2022 nox-session: ci-test-onedir @@ -2142,7 +1530,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-12-ci-deps + - macos-x86_64-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-12 @@ -2164,7 +1552,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-13-ci-deps + - macos-x86_64-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13 @@ -2186,13 +1574,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-13-xlarge-ci-deps + - macos-arm64-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir platform: darwin - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2208,8 +1596,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - almalinux-8-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-8 nox-session: ci-test-onedir @@ -2230,8 +1618,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - almalinux-9-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-9 nox-session: ci-test-onedir @@ -2252,8 +1640,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2 nox-session: ci-test-onedir @@ -2274,13 +1662,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2296,8 +1684,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2023-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023 nox-session: ci-test-onedir @@ -2318,13 +1706,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - amazonlinux-2023-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2340,8 +1728,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - archlinux-lts-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: archlinux-lts nox-session: ci-test-onedir @@ -2362,8 +1750,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centos-7-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centos-7 nox-session: ci-test-onedir @@ -2384,8 +1772,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centosstream-8-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-8 nox-session: ci-test-onedir @@ -2406,8 +1794,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - centosstream-9-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-9 nox-session: ci-test-onedir @@ -2428,8 +1816,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-10-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-10 nox-session: ci-test-onedir @@ -2450,8 +1838,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-11-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11 nox-session: ci-test-onedir @@ -2472,13 +1860,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-11-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2494,8 +1882,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-12-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12 nox-session: ci-test-onedir @@ -2516,13 +1904,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - debian-12-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2538,8 +1926,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - fedora-37-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-37 nox-session: ci-test-onedir @@ -2560,8 +1948,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - fedora-38-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-38 nox-session: ci-test-onedir @@ -2582,8 +1970,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - opensuse-15-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: opensuse-15 nox-session: ci-test-onedir @@ -2604,8 +1992,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-3-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3 nox-session: ci-test-onedir @@ -2626,13 +2014,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-3-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2648,8 +2036,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-4-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4 nox-session: ci-test-onedir @@ -2671,13 +2059,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-4-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2694,8 +2082,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-5-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5 nox-session: ci-test-onedir @@ -2717,13 +2105,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - photonos-5-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2740,8 +2128,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2004-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04 nox-session: ci-test-onedir @@ -2762,13 +2150,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2004-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -2784,8 +2172,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2204-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-x86_64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04 nox-session: ci-test-onedir @@ -2806,13 +2194,13 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - ubuntu-2204-arm64-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-arm64-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 nox-session: ci-test-onedir platform: linux - arch: aarch64 + arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" testrun: ${{ needs.prepare-workflow.outputs.testrun }} @@ -3724,43 +3112,11 @@ jobs: needs: - prepare-workflow - publish-repositories - - almalinux-8-arm64-ci-deps - - almalinux-8-ci-deps - - almalinux-9-arm64-ci-deps - - almalinux-9-ci-deps - - amazonlinux-2-arm64-ci-deps - - amazonlinux-2-ci-deps - - amazonlinux-2023-arm64-ci-deps - - amazonlinux-2023-ci-deps - - centos-7-arm64-ci-deps - - centos-7-ci-deps - - centosstream-8-arm64-ci-deps - - centosstream-8-ci-deps - - centosstream-9-arm64-ci-deps - - centosstream-9-ci-deps - - debian-10-ci-deps - - debian-11-arm64-ci-deps - - debian-11-ci-deps - - debian-12-arm64-ci-deps - - debian-12-ci-deps - - fedora-37-arm64-ci-deps - - fedora-37-ci-deps - - fedora-38-arm64-ci-deps - - fedora-38-ci-deps - - macos-12-ci-deps - - macos-13-ci-deps - - macos-13-xlarge-ci-deps - - photonos-3-arm64-ci-deps - - photonos-3-ci-deps - - photonos-4-arm64-ci-deps - - photonos-4-ci-deps - - photonos-5-arm64-ci-deps - - photonos-5-ci-deps - - ubuntu-2004-arm64-ci-deps - - ubuntu-2004-ci-deps - - ubuntu-2204-arm64-ci-deps - - ubuntu-2204-ci-deps - - windows-2022-ci-deps + - linux-arm64-ci-deps + - linux-x86_64-ci-deps + - macos-arm64-ci-deps + - macos-x86_64-ci-deps + - windows-amd64-ci-deps - build-salt-onedir-linux - build-salt-onedir-macos - build-salt-onedir-windows @@ -3782,47 +3138,11 @@ jobs: needs: - prepare-workflow - upload-release-artifacts - - windows-2016-ci-deps - - windows-2019-ci-deps - - windows-2022-ci-deps - - macos-12-ci-deps - - macos-13-ci-deps - - macos-13-xlarge-ci-deps - - almalinux-8-ci-deps - - almalinux-8-arm64-ci-deps - - almalinux-9-ci-deps - - almalinux-9-arm64-ci-deps - - amazonlinux-2-ci-deps - - amazonlinux-2-arm64-ci-deps - - amazonlinux-2023-ci-deps - - amazonlinux-2023-arm64-ci-deps - - archlinux-lts-ci-deps - - centos-7-ci-deps - - centos-7-arm64-ci-deps - - centosstream-8-ci-deps - - centosstream-8-arm64-ci-deps - - centosstream-9-ci-deps - - centosstream-9-arm64-ci-deps - - debian-10-ci-deps - - debian-11-ci-deps - - debian-11-arm64-ci-deps - - debian-12-ci-deps - - debian-12-arm64-ci-deps - - fedora-37-ci-deps - - fedora-37-arm64-ci-deps - - fedora-38-ci-deps - - fedora-38-arm64-ci-deps - - opensuse-15-ci-deps - - photonos-3-ci-deps - - photonos-3-arm64-ci-deps - - photonos-4-ci-deps - - photonos-4-arm64-ci-deps - - photonos-5-ci-deps - - photonos-5-arm64-ci-deps - - ubuntu-2004-ci-deps - - ubuntu-2004-arm64-ci-deps - - ubuntu-2204-ci-deps - - ubuntu-2204-arm64-ci-deps + - windows-amd64-ci-deps + - macos-x86_64-ci-deps + - macos-arm64-ci-deps + - linux-x86_64-ci-deps + - linux-arm64-ci-deps - windows-2016 - windows-2019 - windows-2022 diff --git a/.github/workflows/templates/build-ci-deps.yml.jinja b/.github/workflows/templates/build-ci-deps.yml.jinja index eb3622eb52f1..fa5a0bc971f5 100644 --- a/.github/workflows/templates/build-ci-deps.yml.jinja +++ b/.github/workflows/templates/build-ci-deps.yml.jinja @@ -1,9 +1,9 @@ - <%- for slug, display_name, arch in build_ci_deps_listing["windows"] %> + <%- for arch, build_distro_slug in build_ci_deps_listing["windows"] %> - <{ slug.replace(".", "") }>-ci-deps: - <%- do test_salt_needs.append(slug.replace(".", "") + "-ci-deps") %> - name: <{ display_name }> Deps + windows-<{ arch }>-ci-deps: + <%- do test_salt_needs.append("windows-" + arch + "-ci-deps") %> + name: Windows <{ arch }> CI Deps <%- if workflow_slug != 'release' %> if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} <%- endif %> @@ -14,12 +14,12 @@ <%- else %> - download-onedir-artifact <%- endif %> - uses: ./.github/workflows/build-deps-ci-action.yml + uses: ./.github/workflows/build-deps-ci-action-windows.yml with: - distro-slug: <{ slug }> + distro-slug: <{ build_distro_slug }> nox-session: ci-test-onedir platform: windows - arch: amd64 + arch: <{ arch }> nox-version: <{ nox_version }> python-version: "<{ gh_actions_workflows_python_version }>" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -28,11 +28,11 @@ <%- endfor %> - <%- for slug, display_name, arch in build_ci_deps_listing["macos"] %> + <%- for arch, build_distro_slug in build_ci_deps_listing["macos"] %> - <{ slug.replace(".", "") }>-ci-deps: - <%- do test_salt_needs.append(slug.replace(".", "") + "-ci-deps") %> - name: <{ display_name }> Deps + macos-<{ arch }>-ci-deps: + <%- do test_salt_needs.append("macos-" + arch + "-ci-deps") %> + name: MacOS <{ arch }> CI Deps <%- if workflow_slug != 'release' %> if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} <%- endif %> @@ -45,7 +45,7 @@ <%- endif %> uses: ./.github/workflows/build-deps-ci-action-macos.yml with: - distro-slug: <{ slug }> + distro-slug: <{ build_distro_slug }> nox-session: ci-test-onedir platform: darwin arch: <{ arch }> @@ -57,11 +57,11 @@ <%- endfor %> - <%- for slug, display_name, arch in build_ci_deps_listing["linux"] %> + <%- for arch, build_distro_slug in build_ci_deps_listing["linux"] %> - <{ slug.replace(".", "") }>-ci-deps: - <%- do test_salt_needs.append(slug.replace(".", "") + "-ci-deps") %> - name: <{ display_name }> Deps + linux-<{ arch }>-ci-deps: + <%- do test_salt_needs.append("linux-" + arch + "-ci-deps") %> + name: Linux <{ arch }> CI Deps <%- if workflow_slug != 'release' %> if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} <%- endif %> @@ -72,9 +72,9 @@ <%- else %> - download-onedir-artifact <%- endif %> - uses: ./.github/workflows/build-deps-ci-action.yml + uses: ./.github/workflows/build-deps-ci-action-linux.yml with: - distro-slug: <{ slug }> + distro-slug: <{ build_distro_slug }> nox-session: ci-test-onedir platform: linux arch: <{ arch }> diff --git a/.github/workflows/templates/test-package-downloads-action.yml.jinja b/.github/workflows/templates/test-package-downloads-action.yml.jinja index 4f9502d7aae1..d92b2540e259 100644 --- a/.github/workflows/templates/test-package-downloads-action.yml.jinja +++ b/.github/workflows/templates/test-package-downloads-action.yml.jinja @@ -94,11 +94,11 @@ jobs: cd artifacts tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}.tar.xz - - name: Download cached nox.${{ matrix.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Download cached nox.linux.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3.3.1 with: - path: nox.${{ matrix.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}|${{ matrix.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ + path: nox.linux.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }} # If we get a cache miss here it means the dependencies step failed to save the cache @@ -342,11 +342,11 @@ jobs: run: | python3 -m pip install 'nox==${{ inputs.nox-version }}' - - name: Download cached nox.${{ matrix.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Download cached nox.macos.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3.3.1 with: - path: nox.${{ matrix.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}|${{ matrix.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ + path: nox.macos.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }} # If we get a cache miss here it means the dependencies step failed to save the cache @@ -354,7 +354,7 @@ jobs: - name: Decompress .nox Directory run: | - nox --force-color -e decompress-dependencies -- ${{ matrix.distro-slug }} + nox --force-color -e decompress-dependencies -- macos ${{ matrix.arch }} - name: Show System Info & Test Plan env: @@ -545,11 +545,11 @@ jobs: cd artifacts tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.tar.xz - - name: Download cached nox.${{ matrix.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Download cached nox.windows.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3.3.1 with: - path: nox.${{ matrix.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|${{ matrix.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ + path: nox.windows.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }} # If we get a cache miss here it means the dependencies step failed to save the cache diff --git a/.github/workflows/templates/test-salt-pkg.yml.jinja b/.github/workflows/templates/test-salt-pkg.yml.jinja index eb8b43d071ff..935dbe1cd386 100644 --- a/.github/workflows/templates/test-salt-pkg.yml.jinja +++ b/.github/workflows/templates/test-salt-pkg.yml.jinja @@ -8,8 +8,8 @@ needs: - prepare-workflow - build-<{ pkg_type }>-pkgs-onedir - - <{ slug.replace(".", "") }>-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - linux-<{ arch }>-ci-deps + uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: <{ slug }> nox-session: ci-test-onedir @@ -41,7 +41,7 @@ needs: - prepare-workflow - build-macos-pkgs-onedir - - <{ slug.replace(".", "") }>-ci-deps + - macos-<{ arch }>-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: <{ slug }> @@ -71,8 +71,8 @@ needs: - prepare-workflow - build-windows-pkgs-onedir - - <{ slug.replace(".", "") }>-ci-deps - uses: ./.github/workflows/test-packages-action.yml + - windows-<{ arch }>-ci-deps + uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: <{ slug }> nox-session: ci-test-onedir diff --git a/.github/workflows/templates/test-salt.yml.jinja b/.github/workflows/templates/test-salt.yml.jinja index 9c25d7f0a8c5..5d9e0355f976 100644 --- a/.github/workflows/templates/test-salt.yml.jinja +++ b/.github/workflows/templates/test-salt.yml.jinja @@ -12,8 +12,8 @@ if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - <{ slug.replace(".", "") }>-ci-deps - uses: ./.github/workflows/test-action.yml + - windows-<{ arch }>-ci-deps + uses: ./.github/workflows/test-action-windows.yml with: distro-slug: <{ slug }> nox-session: ci-test-onedir @@ -40,7 +40,7 @@ if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - <{ slug.replace(".", "") }>-ci-deps + - macos-<{ arch }>-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: <{ slug }> @@ -67,8 +67,8 @@ if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - <{ slug.replace(".", "") }>-ci-deps - uses: ./.github/workflows/test-action.yml + - linux-<{ arch }>-ci-deps + uses: ./.github/workflows/test-action-linux.yml with: distro-slug: <{ slug }> nox-session: ci-test-onedir diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action-linux.yml similarity index 98% rename from .github/workflows/test-action.yml rename to .github/workflows/test-action-linux.yml index f8635539cbd7..6a5ba0ae9515 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action-linux.yml @@ -155,11 +155,11 @@ jobs: cd artifacts tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz - - name: Download cached nox.${{ inputs.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Download cached nox.linux.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3.3.1 with: - path: nox.${{ inputs.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.gh-actions-python-version }}|${{ + path: nox.linux.${{ inputs.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.gh-actions-python-version }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }} # If we get a cache miss here it means the dependencies step failed to save the cache diff --git a/.github/workflows/test-action-macos.yml b/.github/workflows/test-action-macos.yml index 5c113f264898..605f16fc61fe 100644 --- a/.github/workflows/test-action-macos.yml +++ b/.github/workflows/test-action-macos.yml @@ -145,11 +145,11 @@ jobs: run: | brew install tree - - name: Download cached nox.${{ inputs.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Download cached nox.macos.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3.3.1 with: - path: nox.${{ inputs.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.gh-actions-python-version }}|${{ + path: nox.macos.${{ inputs.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.gh-actions-python-version }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }} # If we get a cache miss here it means the dependencies step failed to save the cache @@ -166,7 +166,7 @@ jobs: - name: Decompress .nox Directory run: | - nox --force-color -e decompress-dependencies -- ${{ inputs.distro-slug }} + nox --force-color -e decompress-dependencies -- macos ${{ inputs.arch }} - name: Download testrun-changed-files.txt if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }} diff --git a/.github/workflows/test-action-windows.yml b/.github/workflows/test-action-windows.yml new file mode 100644 index 000000000000..769bc03f48bd --- /dev/null +++ b/.github/workflows/test-action-windows.yml @@ -0,0 +1,399 @@ +--- +name: Test Artifact + +on: + workflow_call: + inputs: + distro-slug: + required: true + type: string + description: The OS slug to run tests against + nox-session: + required: true + type: string + description: The nox session to run + testrun: + required: true + type: string + description: JSON string containing information about what and how to run the test suite + salt-version: + type: string + required: true + description: The Salt version to set prior to running tests. + cache-prefix: + required: true + type: string + description: Seed used to invalidate caches + platform: + required: true + type: string + description: The platform being tested + arch: + required: true + type: string + description: The platform arch being tested + nox-version: + required: true + type: string + description: The nox version to install + gh-actions-python-version: + required: false + type: string + description: The python version to run tests with + default: "3.10" + fips: + required: false + type: boolean + default: false + description: Test run with FIPS enabled + package-name: + required: false + type: string + description: The onedir package name to use + default: salt + skip-code-coverage: + required: false + type: boolean + description: Skip code coverage + default: false + skip-junit-reports: + required: false + type: boolean + description: Skip Publishing JUnit Reports + default: false + workflow-slug: + required: false + type: string + description: Which workflow is running. + default: ci + default-timeout: + required: false + type: number + description: Timeout, in minutes, for the test job(Default 360, 6 hours). + default: 360 + +env: + COLUMNS: 190 + AWS_MAX_ATTEMPTS: "10" + AWS_RETRY_MODE: "adaptive" + PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ + PIP_EXTRA_INDEX_URL: https://pypi.org/simple + +jobs: + + generate-matrix: + name: Test Matrix + runs-on: + - self-hosted + - linux + - x86_64 + outputs: + matrix-include: ${{ steps.generate-matrix.outputs.matrix }} + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }} + + - name: Generate Test Matrix + id: generate-matrix + run: | + tools ci matrix --workflow=${{ inputs.workflow-slug }} ${{ fromJSON(inputs.testrun)['type'] == 'full' && '--full ' || '' }}${{ inputs.fips && '--fips ' || '' }}${{ inputs.distro-slug }} + + test: + name: Test + runs-on: + - self-hosted + - linux + - bastion + # Full test runs. Each chunk should never take more than 2 hours. + # Partial test runs(no chunk parallelization), 6 Hours + timeout-minutes: ${{ fromJSON(inputs.testrun)['type'] == 'full' && inputs.default-timeout || 360 }} + needs: + - generate-matrix + strategy: + fail-fast: false + matrix: + include: ${{ fromJSON(needs.generate-matrix.outputs.matrix-include) }} + env: + SALT_TRANSPORT: ${{ matrix.transport }} + TEST_GROUP: ${{ matrix.test-group || 1 }} + + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Setup Salt Version + run: | + echo "${{ inputs.salt-version }}" > salt/_version.txt + + - name: Download Onedir Tarball as an Artifact + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz + path: artifacts/ + + - name: Decompress Onedir Tarball + shell: bash + run: | + python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" + cd artifacts + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz + + - name: Download cached nox.windows.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }} + uses: actions/cache@v3.3.1 + with: + path: nox.windows.${{ inputs.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.gh-actions-python-version }}|${{ + hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') + }} + # If we get a cache miss here it means the dependencies step failed to save the cache + fail-on-cache-miss: true + + - name: PyPi Proxy + run: | + sed -i '7s;^;--index-url=https://pypi-proxy.saltstack.net/root/local/+simple/ --extra-index-url=https://pypi.org/simple\n;' requirements/static/ci/*/*.txt + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }} + + - name: Download testrun-changed-files.txt + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }} + uses: actions/download-artifact@v3 + with: + name: testrun-changed-files.txt + + - name: Get Salt Project GitHub Actions Bot Environment + run: | + TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30") + SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/tags/instance/spb:environment) + echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV" + + - name: Start VM + id: spin-up-vm + env: + TESTS_CHUNK: ${{ matrix.tests-chunk }} + run: | + tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ inputs.distro-slug }} + + - name: List Free Space + run: | + tools --timestamps vm ssh ${{ inputs.distro-slug }} -- df -h || true + + - name: Upload Checkout To VM + run: | + tools --timestamps vm rsync ${{ inputs.distro-slug }} + + - name: Decompress .nox Directory + run: | + tools --timestamps vm decompress-dependencies ${{ inputs.distro-slug }} + + - name: Show System Info & Test Plan + run: | + tools --timestamps --timeout-secs=1800 vm testplan --skip-requirements-install \ + --nox-session=${{ inputs.nox-session }} ${{ inputs.distro-slug }} \ + ${{ matrix.tests-chunk }} + + - name: Run Fast/Changed Tests + id: run-fast-changed-tests + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['fast'] == false }} + run: | + tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \ + --nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \ + ${{ matrix.tests-chunk }} -- --suppress-no-test-exit-code \ + --from-filenames=testrun-changed-files.txt + + - name: Run Slow/Changed Tests + id: run-slow-changed-tests + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['slow'] == false }} + run: | + tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \ + --nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \ + ${{ matrix.tests-chunk }} -- --no-fast-tests --slow-tests --suppress-no-test-exit-code \ + --from-filenames=testrun-changed-files.txt + + - name: Run Core/Changed Tests + id: run-core-changed-tests + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['core'] == false }} + run: | + tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \ + --nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \ + ${{ matrix.tests-chunk }} -- --no-fast-tests --core-tests --suppress-no-test-exit-code \ + --from-filenames=testrun-changed-files.txt + + - name: Run Fast Tests + id: run-fast-tests + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['fast'] }} + run: | + tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \ + --nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ (inputs.skip-code-coverage && matrix.tests-chunk != 'unit') && '--skip-code-coverage' || '' }} \ + ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} ${{ matrix.tests-chunk }} + + - name: Run Slow Tests + id: run-slow-tests + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['slow'] }} + run: | + tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \ + --nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \ + ${{ matrix.tests-chunk }} -- --no-fast-tests --slow-tests + + - name: Run Core Tests + id: run-core-tests + if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['core'] }} + run: | + tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \ + --nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \ + ${{ matrix.tests-chunk }} -- --no-fast-tests --core-tests + + - name: Run Flaky Tests + id: run-flaky-tests + if: ${{ fromJSON(inputs.testrun)['selected_tests']['flaky'] }} + run: | + tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \ + --nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \ + ${{ matrix.tests-chunk }} -- --no-fast-tests --flaky-jail + + - name: Run Full Tests + id: run-full-tests + if: ${{ fromJSON(inputs.testrun)['type'] == 'full' }} + run: | + tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \ + --nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ (inputs.skip-code-coverage && matrix.tests-chunk != 'unit') && '--skip-code-coverage' || '' }} \ + -E TEST_GROUP ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} ${{ matrix.tests-chunk }} -- --slow-tests --core-tests \ + --test-group-count=${{ matrix.test-group-count || 1 }} --test-group=${{ matrix.test-group || 1 }} + + - name: Combine Coverage Reports + if: always() && inputs.skip-code-coverage == false && steps.spin-up-vm.outcome == 'success' + run: | + tools --timestamps vm combine-coverage ${{ inputs.distro-slug }} + + - name: Download Test Run Artifacts + id: download-artifacts-from-vm + if: always() && steps.spin-up-vm.outcome == 'success' + run: | + tools --timestamps vm download-artifacts ${{ inputs.distro-slug }} + # Delete the salt onedir, we won't need it anymore and it will prevent + # from it showing in the tree command below + rm -rf artifacts/salt* + tree -a artifacts + if [ "${{ inputs.skip-code-coverage }}" != "true" ]; then + mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ inputs.distro-slug }}.${{ inputs.nox-session }}.${{ matrix.transport }}.${{ matrix.tests-chunk }}.grp${{ matrix.test-group || '1' }} + fi + + - name: Destroy VM + if: always() + run: | + tools --timestamps vm destroy --no-wait ${{ inputs.distro-slug }} || true + + - name: Upload Code Coverage Test Run Artifacts + if: always() && inputs.skip-code-coverage == false && steps.download-artifacts-from-vm.outcome == 'success' && job.status != 'cancelled' + uses: actions/upload-artifact@v3 + with: + name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }} + path: | + artifacts/coverage/ + + - name: Upload JUnit XML Test Run Artifacts + if: always() && steps.download-artifacts-from-vm.outcome == 'success' + uses: actions/upload-artifact@v3 + with: + name: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }} + path: | + artifacts/xml-unittests-output/ + + - name: Upload Test Run Log Artifacts + if: always() && steps.download-artifacts-from-vm.outcome == 'success' + uses: actions/upload-artifact@v3 + with: + name: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }} + path: | + artifacts/logs + + - name: Publish Test Report + uses: mikepenz/action-junit-report@v3 + # always run even if the previous steps fails + if: always() && inputs.skip-junit-reports == false && job.status != 'cancelled' + with: + check_name: Test Results(${{ inputs.distro-slug }}, transport=${{ matrix.transport }}, tests-chunk=${{ matrix.tests-chunk }}, group=${{ matrix.test-group || '1' }}) + report_paths: 'artifacts/xml-unittests-output/*.xml' + annotate_only: true + + + report: + name: Test Reports + if: always() && inputs.skip-code-coverage == false && needs.test.result != 'cancelled' && needs.test.result != 'skipped' + runs-on: + - self-hosted + - linux + - x86_64 + needs: + - test + + steps: + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Download Code Coverage Test Run Artifacts + uses: actions/download-artifact@v3 + if: ${{ inputs.skip-code-coverage == false }} + id: download-coverage-artifacts + with: + name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }} + path: artifacts/coverage/ + + - name: Show Downloaded Test Run Artifacts + run: | + tree -a artifacts + + - name: Install Nox + run: | + python3 -m pip install 'nox==${{ inputs.nox-version }}' + + - name: Create XML Coverage Reports + if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' && job.status != 'cancelled' + run: | + nox --force-color -e create-xml-coverage-reports + mv artifacts/coverage/salt.xml artifacts/coverage/salt..${{ inputs.distro-slug }}..${{ inputs.nox-session }}.xml + mv artifacts/coverage/tests.xml artifacts/coverage/tests..${{ inputs.distro-slug }}..${{ inputs.nox-session }}.xml + + - name: Report Salt Code Coverage + if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' + continue-on-error: true + run: | + nox --force-color -e report-coverage -- salt + + - name: Report Combined Code Coverage + if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' + continue-on-error: true + run: | + nox --force-color -e report-coverage + + - name: Rename Code Coverage DB + if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' + continue-on-error: true + run: | + mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ inputs.distro-slug }}.${{ inputs.nox-session }} + + - name: Upload Code Coverage DB + if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' + uses: actions/upload-artifact@v3 + with: + name: all-testrun-coverage-artifacts + path: artifacts/coverage diff --git a/.github/workflows/test-package-downloads-action.yml b/.github/workflows/test-package-downloads-action.yml index 6bed0c6a01c3..c6661849724c 100644 --- a/.github/workflows/test-package-downloads-action.yml +++ b/.github/workflows/test-package-downloads-action.yml @@ -68,66 +68,30 @@ jobs: - distro-slug: almalinux-8 arch: x86_64 pkg-type: package - - distro-slug: almalinux-8-arm64 - arch: aarch64 - pkg-type: package - - distro-slug: almalinux-8-arm64 - arch: arm64 - pkg-type: package - distro-slug: almalinux-9 arch: x86_64 pkg-type: package - - distro-slug: almalinux-9-arm64 - arch: aarch64 - pkg-type: package - - distro-slug: almalinux-9-arm64 - arch: arm64 - pkg-type: package - distro-slug: amazonlinux-2 arch: x86_64 pkg-type: package - - distro-slug: amazonlinux-2-arm64 - arch: aarch64 - pkg-type: package - distro-slug: amazonlinux-2-arm64 arch: arm64 pkg-type: package - distro-slug: amazonlinux-2023 arch: x86_64 pkg-type: package - - distro-slug: amazonlinux-2023-arm64 - arch: aarch64 - pkg-type: package - distro-slug: amazonlinux-2023-arm64 arch: arm64 pkg-type: package - distro-slug: centos-7 arch: x86_64 pkg-type: package - - distro-slug: centos-7-arm64 - arch: aarch64 - pkg-type: package - - distro-slug: centos-7-arm64 - arch: arm64 - pkg-type: package - distro-slug: centosstream-8 arch: x86_64 pkg-type: package - - distro-slug: centosstream-8-arm64 - arch: aarch64 - pkg-type: package - - distro-slug: centosstream-8-arm64 - arch: arm64 - pkg-type: package - distro-slug: centosstream-9 arch: x86_64 pkg-type: package - - distro-slug: centosstream-9-arm64 - arch: aarch64 - pkg-type: package - - distro-slug: centosstream-9-arm64 - arch: arm64 - pkg-type: package - distro-slug: debian-10 arch: x86_64 pkg-type: package @@ -135,56 +99,35 @@ jobs: arch: x86_64 pkg-type: package - distro-slug: debian-11-arm64 - arch: aarch64 + arch: arm64 pkg-type: package - distro-slug: debian-12 arch: x86_64 pkg-type: package - distro-slug: debian-12-arm64 - arch: aarch64 + arch: arm64 pkg-type: package - distro-slug: fedora-37 arch: x86_64 pkg-type: package - - distro-slug: fedora-37-arm64 - arch: aarch64 - pkg-type: package - - distro-slug: fedora-37-arm64 - arch: arm64 - pkg-type: package - distro-slug: fedora-38 arch: x86_64 pkg-type: package - - distro-slug: fedora-38-arm64 - arch: aarch64 - pkg-type: package - - distro-slug: fedora-38-arm64 - arch: arm64 - pkg-type: package - distro-slug: photonos-3 arch: x86_64 pkg-type: package - - distro-slug: photonos-3-arm64 - arch: aarch64 - pkg-type: package - distro-slug: photonos-3-arm64 arch: arm64 pkg-type: package - distro-slug: photonos-4 arch: x86_64 pkg-type: package - - distro-slug: photonos-4-arm64 - arch: aarch64 - pkg-type: package - distro-slug: photonos-4-arm64 arch: arm64 pkg-type: package - distro-slug: photonos-5 arch: x86_64 pkg-type: package - - distro-slug: photonos-5-arm64 - arch: aarch64 - pkg-type: package - distro-slug: photonos-5-arm64 arch: arm64 pkg-type: package @@ -192,19 +135,19 @@ jobs: arch: x86_64 pkg-type: package - distro-slug: ubuntu-20.04-arm64 - arch: aarch64 + arch: arm64 pkg-type: package - distro-slug: ubuntu-22.04 arch: x86_64 pkg-type: package - distro-slug: ubuntu-22.04-arm64 - arch: aarch64 + arch: arm64 pkg-type: package - distro-slug: ubuntu-22.04 arch: x86_64 pkg-type: onedir - distro-slug: ubuntu-22.04-arm64 - arch: aarch64 + arch: arm64 pkg-type: onedir steps: @@ -230,11 +173,11 @@ jobs: cd artifacts tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}.tar.xz - - name: Download cached nox.${{ matrix.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Download cached nox.linux.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3.3.1 with: - path: nox.${{ matrix.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}|${{ matrix.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ + path: nox.linux.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }} # If we get a cache miss here it means the dependencies step failed to save the cache @@ -445,7 +388,7 @@ jobs: arch: arm64 pkg-type: package - distro-slug: macos-13-xlarge - arch: aarch64 + arch: arm64 pkg-type: onedir steps: @@ -485,11 +428,11 @@ jobs: run: | python3 -m pip install 'nox==${{ inputs.nox-version }}' - - name: Download cached nox.${{ matrix.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Download cached nox.macos.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3.3.1 with: - path: nox.${{ matrix.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}|${{ matrix.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ + path: nox.macos.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }} # If we get a cache miss here it means the dependencies step failed to save the cache @@ -497,7 +440,7 @@ jobs: - name: Decompress .nox Directory run: | - nox --force-color -e decompress-dependencies -- ${{ matrix.distro-slug }} + nox --force-color -e decompress-dependencies -- macos ${{ matrix.arch }} - name: Show System Info & Test Plan env: @@ -692,11 +635,11 @@ jobs: cd artifacts tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.tar.xz - - name: Download cached nox.${{ matrix.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Download cached nox.windows.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3.3.1 with: - path: nox.${{ matrix.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|${{ matrix.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ + path: nox.windows.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }} # If we get a cache miss here it means the dependencies step failed to save the cache diff --git a/.github/workflows/test-packages-action.yml b/.github/workflows/test-packages-action-linux.yml similarity index 97% rename from .github/workflows/test-packages-action.yml rename to .github/workflows/test-packages-action-linux.yml index fb77b855693c..7b25c097e008 100644 --- a/.github/workflows/test-packages-action.yml +++ b/.github/workflows/test-packages-action-linux.yml @@ -152,11 +152,11 @@ jobs: run: | tree artifacts/pkg/ - - name: Download cached nox.${{ inputs.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Download cached nox.linux.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3.3.1 with: - path: nox.${{ inputs.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ + path: nox.linux.${{ inputs.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }} # If we get a cache miss here it means the dependencies step failed to save the cache diff --git a/.github/workflows/test-packages-action-macos.yml b/.github/workflows/test-packages-action-macos.yml index d3f1f2a3dd4b..48d65e638e3c 100644 --- a/.github/workflows/test-packages-action-macos.yml +++ b/.github/workflows/test-packages-action-macos.yml @@ -154,11 +154,11 @@ jobs: run: | python3 -m pip install 'nox==${{ inputs.nox-version }}' - - name: Download cached nox.${{ inputs.distro-slug }}.tar.* for session ${{ inputs.nox-session }} + - name: Download cached nox.macos.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3.3.1 with: - path: nox.${{ inputs.distro-slug }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ + path: nox.macos.${{ inputs.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }} # If we get a cache miss here it means the dependencies step failed to save the cache @@ -166,7 +166,7 @@ jobs: - name: Decompress .nox Directory run: | - nox --force-color -e decompress-dependencies -- ${{ inputs.distro-slug }} + nox --force-color -e decompress-dependencies -- macos ${{ inputs.arch }} - name: Show System Info & Test Plan env: diff --git a/.github/workflows/test-packages-action-windows.yml b/.github/workflows/test-packages-action-windows.yml new file mode 100644 index 000000000000..9e84c8906f15 --- /dev/null +++ b/.github/workflows/test-packages-action-windows.yml @@ -0,0 +1,275 @@ +name: Test Artifact + +on: + workflow_call: + inputs: + distro-slug: + required: true + type: string + description: The OS slug to run tests against + platform: + required: true + type: string + description: The platform being tested + arch: + required: true + type: string + description: The platform arch being tested + pkg-type: + required: true + type: string + description: The platform arch being tested + salt-version: + type: string + required: true + description: The Salt version of the packages to install and test + cache-prefix: + required: true + type: string + description: Seed used to invalidate caches + testing-releases: + required: true + type: string + description: A JSON list of releases to test upgrades against + nox-version: + required: true + type: string + description: The nox version to install + python-version: + required: false + type: string + description: The python version to run tests with + default: "3.10" + fips: + required: false + type: boolean + default: false + description: Test run with FIPS enabled + package-name: + required: false + type: string + description: The onedir package name to use + default: salt + nox-session: + required: false + type: string + description: The nox session to run + default: ci-test-onedir + skip-code-coverage: + required: false + type: boolean + description: Skip code coverage + default: false + skip-junit-reports: + required: false + type: boolean + description: Skip Publishing JUnit Reports + default: false + +env: + COLUMNS: 190 + AWS_MAX_ATTEMPTS: "10" + AWS_RETRY_MODE: "adaptive" + PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ + PIP_EXTRA_INDEX_URL: https://pypi.org/simple + +jobs: + + generate-matrix: + name: Generate Matrix + runs-on: + - self-hosted + - linux + - x86_64 + outputs: + pkg-matrix-include: ${{ steps.generate-pkg-matrix.outputs.matrix }} + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }} + + - name: Generate Package Test Matrix + id: generate-pkg-matrix + run: | + tools ci pkg-matrix ${{ inputs.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \ + ${{ inputs.pkg-type }} --testing-releases ${{ join(fromJSON(inputs.testing-releases), ' ') }} + + + test: + name: Test + runs-on: + - self-hosted + - linux + - bastion + timeout-minutes: 120 # 2 Hours - More than this and something is wrong + needs: + - generate-matrix + strategy: + fail-fast: false + matrix: + include: ${{ fromJSON(needs.generate-matrix.outputs.pkg-matrix-include) }} + + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Download Packages + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-${{ inputs.arch }}-${{ inputs.pkg-type }} + path: artifacts/pkg/ + + - name: Download Onedir Tarball as an Artifact + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz + path: artifacts/ + + - name: Decompress Onedir Tarball + shell: bash + run: | + python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" + cd artifacts + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz + + - name: List Packages + run: | + tree artifacts/pkg/ + + - name: Download cached nox.windows.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }} + uses: actions/cache@v3.3.1 + with: + path: nox.windows.${{ inputs.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ + hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') + }} + # If we get a cache miss here it means the dependencies step failed to save the cache + fail-on-cache-miss: true + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }} + + - name: Get Salt Project GitHub Actions Bot Environment + run: | + TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30") + SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/tags/instance/spb:environment) + echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV" + + - name: Start VM + id: spin-up-vm + run: | + tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ inputs.distro-slug }} + + - name: List Free Space + run: | + tools --timestamps vm ssh ${{ inputs.distro-slug }} -- df -h || true + + - name: Upload Checkout To VM + run: | + tools --timestamps vm rsync ${{ inputs.distro-slug }} + + - name: Decompress .nox Directory + run: | + tools --timestamps vm decompress-dependencies ${{ inputs.distro-slug }} + + - name: Downgrade importlib-metadata + if: ${{ contains(fromJSON('["amazonlinux-2", "centos-7", "debian-10"]'), inputs.distro-slug) && contains(fromJSON('["upgrade-classic", "downgrade-classic"]'), matrix.tests-chunk) }} + run: | + # This step can go away once we stop testing classic packages upgrade/downgrades to/from 3005.x + tools --timestamps vm ssh ${{ inputs.distro-slug }} -- "sudo python3 -m pip install -U 'importlib-metadata<=4.13.0' 'virtualenv<=20.21.1'" + + - name: Show System Info & Test Plan + run: | + tools --timestamps --timeout-secs=1800 vm testplan --skip-requirements-install \ + --nox-session=${{ inputs.nox-session }}-pkgs ${{ inputs.distro-slug }} -- ${{ matrix.tests-chunk }} \ + ${{ matrix.version && format('--prev-version {0}', matrix.version) || ''}} + + - name: Run Package Tests + run: | + tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install ${{ matrix.fips && '--fips ' || '' }}\ + --nox-session=${{ inputs.nox-session }}-pkgs --rerun-failures ${{ inputs.distro-slug }} -- ${{ matrix.tests-chunk }} \ + ${{ matrix.version && format('--prev-version {0}', matrix.version) || ''}} + + - name: Download Test Run Artifacts + id: download-artifacts-from-vm + if: always() && steps.spin-up-vm.outcome == 'success' + run: | + tools --timestamps vm download-artifacts ${{ inputs.distro-slug }} + # Delete the salt onedir, we won't need it anymore and it will prevent + # from it showing in the tree command below + rm -rf artifacts/salt* + tree -a artifacts + + - name: Destroy VM + if: always() + run: | + tools --timestamps vm destroy --no-wait ${{ inputs.distro-slug }} || true + + - name: Upload Test Run Artifacts + if: always() && steps.download-artifacts-from-vm.outcome == 'success' + uses: actions/upload-artifact@v3 + with: + name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ matrix.tests-chunk }} + path: | + artifacts + !artifacts/pkg/* + !artifacts/salt/* + !artifacts/salt-*.tar.* + + report: + name: Report + runs-on: + - self-hosted + - linux + - x86_64 + if: always() && (inputs.skip-code-coverage == false || inputs.skip-junit-reports == false) && needs.test.result != 'cancelled' && needs.test.result != 'skipped' + needs: + - test + - generate-matrix + strategy: + fail-fast: false + matrix: + include: ${{ fromJSON(needs.generate-matrix.outputs.pkg-matrix-include) }} + + steps: + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Download Test Run Artifacts + id: download-test-run-artifacts + uses: actions/download-artifact@v3 + with: + name: pkg-testrun-artifacts-${{ inputs.distro-slug }}-${{ matrix.tests-chunk }} + path: artifacts + + - name: Show Test Run Artifacts + if: always() && steps.download-test-run-artifacts.outcome == 'success' + run: | + tree -a artifacts + + - name: Publish Test Report + uses: mikepenz/action-junit-report@v3 + # always run even if the previous steps fails + if: always() && inputs.skip-junit-reports == false && steps.download-test-run-artifacts.outcome == 'success' + with: + check_name: Overall Test Results(${{ inputs.distro-slug }} ${{ matrix.tests-chunk }}) + report_paths: 'artifacts/xml-unittests-output/*.xml' + annotate_only: true diff --git a/noxfile.py b/noxfile.py index 0baf4cc537ae..e9e5c6fdc736 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1223,14 +1223,29 @@ def coverage_report(session): def decompress_dependencies(session): if not session.posargs: session.error( - "Please pass the distro-slug to run tests against. " - "Check cicd/images.yml for what's available." + "The 'decompress-dependencies' session target needs " + "two arguments, ' '." ) - distro_slug = session.posargs.pop(0) - if "windows" in distro_slug: - nox_dependencies_tarball = f"nox.{distro_slug}.tar.gz" + try: + platform = session.posargs.pop(0) + arch = session.posargs.pop(0) + if session.posargs: + session.error( + "The 'decompress-dependencies' session target only accepts " + "two arguments, ' '." + ) + except IndexError: + session.error( + "The 'decompress-dependencies' session target needs " + "two arguments, ' '." + ) + if platform == "windows": + extension = "tar.gz" + scripts_dir_name = "Scripts" else: - nox_dependencies_tarball = f"nox.{distro_slug}.tar.xz" + extension = "tar.xz" + scripts_dir_name = "bin" + nox_dependencies_tarball = f"nox.{platform}.{arch}.{extension}" nox_dependencies_tarball_path = REPO_ROOT / nox_dependencies_tarball if not nox_dependencies_tarball_path.exists(): session.error( @@ -1244,10 +1259,7 @@ def decompress_dependencies(session): session.log("Finding broken 'python' symlinks under '.nox/' ...") for dirname in os.scandir(REPO_ROOT / ".nox"): - if "windows" not in distro_slug: - scan_path = REPO_ROOT.joinpath(".nox", dirname, "bin") - else: - scan_path = REPO_ROOT.joinpath(".nox", dirname, "Scripts") + scan_path = REPO_ROOT.joinpath(".nox", dirname, scripts_dir_name) script_paths = {str(p): p for p in os.scandir(scan_path)} fixed_shebang = f"#!{scan_path / 'python'}" for key in sorted(script_paths): @@ -1278,7 +1290,7 @@ def decompress_dependencies(session): continue if not path.is_file(): continue - if "windows" not in distro_slug: + if platform != "windows": # Let's try to fix shebang's try: fpath = pathlib.Path(path) @@ -1301,14 +1313,27 @@ def decompress_dependencies(session): def compress_dependencies(session): if not session.posargs: session.error( - "Please pass the distro-slug to run tests against. " - "Check cicd/images.yml for what's available." + "The 'compress-dependencies' session target needs " + "two arguments, ' '." ) - distro_slug = session.posargs.pop(0) - if IS_WINDOWS: - nox_dependencies_tarball = f"nox.{distro_slug}.tar.gz" + try: + platform = session.posargs.pop(0) + arch = session.posargs.pop(0) + if session.posargs: + session.error( + "The 'compress-dependencies' session target only accepts " + "two arguments, ' '." + ) + except IndexError: + session.error( + "The 'compress-dependencies' session target needs " + "two arguments, ' '." + ) + if platform == "windows": + extension = "tar.gz" else: - nox_dependencies_tarball = f"nox.{distro_slug}.tar.xz" + extension = "tar.xz" + nox_dependencies_tarball = f"nox.{platform}.{arch}.{extension}" nox_dependencies_tarball_path = REPO_ROOT / nox_dependencies_tarball if nox_dependencies_tarball_path.exists(): session_warn( diff --git a/tools/precommit/workflows.py b/tools/precommit/workflows.py index 4a75dba21483..45251ad1617e 100644 --- a/tools/precommit/workflows.py +++ b/tools/precommit/workflows.py @@ -88,41 +88,41 @@ def generate_workflows(ctx: Context): "template": "test-package-downloads-action.yml", }, } - test_salt_listing = { + test_salt_listing: dict[str, list[tuple[str, ...]]] = { "linux": [ ("almalinux-8", "Alma Linux 8", "x86_64", "no-fips"), ("almalinux-9", "Alma Linux 9", "x86_64", "no-fips"), ("amazonlinux-2", "Amazon Linux 2", "x86_64", "no-fips"), - ("amazonlinux-2-arm64", "Amazon Linux 2 Arm64", "aarch64", "no-fips"), + ("amazonlinux-2-arm64", "Amazon Linux 2 Arm64", "arm64", "no-fips"), ("amazonlinux-2023", "Amazon Linux 2023", "x86_64", "no-fips"), - ("amazonlinux-2023-arm64", "Amazon Linux 2023 Arm64", "aarch64", "no-fips"), + ("amazonlinux-2023-arm64", "Amazon Linux 2023 Arm64", "arm64", "no-fips"), ("archlinux-lts", "Arch Linux LTS", "x86_64", "no-fips"), ("centos-7", "CentOS 7", "x86_64", "no-fips"), ("centosstream-8", "CentOS Stream 8", "x86_64", "no-fips"), ("centosstream-9", "CentOS Stream 9", "x86_64", "no-fips"), ("debian-10", "Debian 10", "x86_64", "no-fips"), ("debian-11", "Debian 11", "x86_64", "no-fips"), - ("debian-11-arm64", "Debian 11 Arm64", "aarch64", "no-fips"), + ("debian-11-arm64", "Debian 11 Arm64", "arm64", "no-fips"), ("debian-12", "Debian 12", "x86_64", "no-fips"), - ("debian-12-arm64", "Debian 12 Arm64", "aarch64", "no-fips"), + ("debian-12-arm64", "Debian 12 Arm64", "arm64", "no-fips"), ("fedora-37", "Fedora 37", "x86_64", "no-fips"), ("fedora-38", "Fedora 38", "x86_64", "no-fips"), ("opensuse-15", "Opensuse 15", "x86_64", "no-fips"), ("photonos-3", "Photon OS 3", "x86_64", "no-fips"), - ("photonos-3-arm64", "Photon OS 3 Arm64", "aarch64", "no-fips"), + ("photonos-3-arm64", "Photon OS 3 Arm64", "arm64", "no-fips"), ("photonos-4", "Photon OS 4", "x86_64", "fips"), - ("photonos-4-arm64", "Photon OS 4 Arm64", "aarch64", "fips"), + ("photonos-4-arm64", "Photon OS 4 Arm64", "arm64", "fips"), ("photonos-5", "Photon OS 5", "x86_64", "fips"), - ("photonos-5-arm64", "Photon OS 5 Arm64", "aarch64", "fips"), + ("photonos-5-arm64", "Photon OS 5 Arm64", "arm64", "fips"), ("ubuntu-20.04", "Ubuntu 20.04", "x86_64", "no-fips"), - ("ubuntu-20.04-arm64", "Ubuntu 20.04 Arm64", "aarch64", "no-fips"), + ("ubuntu-20.04-arm64", "Ubuntu 20.04 Arm64", "arm64", "no-fips"), ("ubuntu-22.04", "Ubuntu 22.04", "x86_64", "no-fips"), - ("ubuntu-22.04-arm64", "Ubuntu 22.04 Arm64", "aarch64", "no-fips"), + ("ubuntu-22.04-arm64", "Ubuntu 22.04 Arm64", "arm64", "no-fips"), ], "macos": [ ("macos-12", "macOS 12", "x86_64"), ("macos-13", "macOS 13", "x86_64"), - ("macos-13-xlarge", "macOS 13 Arm64", "aarch64"), + ("macos-13-xlarge", "macOS 13 Arm64", "arm64"), ], "windows": [ ("windows-2016", "Windows 2016", "amd64"), @@ -137,7 +137,7 @@ def generate_workflows(ctx: Context): ( "amazonlinux-2-arm64", "Amazon Linux 2 Arm64", - "aarch64", + "arm64", "rpm", "no-fips", ), @@ -145,7 +145,7 @@ def generate_workflows(ctx: Context): ( "amazonlinux-2023-arm64", "Amazon Linux 2023 Arm64", - "aarch64", + "arm64", "rpm", "no-fips", ), @@ -155,30 +155,30 @@ def generate_workflows(ctx: Context): ( "centosstream-9-arm64", "CentOS Stream 9 Arm64", - "aarch64", + "arm64", "rpm", "no-fips", ), ("debian-10", "Debian 10", "x86_64", "deb", "no-fips"), ("debian-11", "Debian 11", "x86_64", "deb", "no-fips"), - ("debian-11-arm64", "Debian 11 Arm64", "aarch64", "deb", "no-fips"), + ("debian-11-arm64", "Debian 11 Arm64", "arm64", "deb", "no-fips"), ("debian-12", "Debian 12", "x86_64", "deb", "no-fips"), - ("debian-12-arm64", "Debian 12 Arm64", "aarch64", "deb", "no-fips"), + ("debian-12-arm64", "Debian 12 Arm64", "arm64", "deb", "no-fips"), ("photonos-3", "Photon OS 3", "x86_64", "rpm", "no-fips"), - ("photonos-3-arm64", "Photon OS 3 Arm64", "aarch64", "rpm", "no-fips"), + ("photonos-3-arm64", "Photon OS 3 Arm64", "arm64", "rpm", "no-fips"), ("photonos-4", "Photon OS 4", "x86_64", "rpm", "fips"), - ("photonos-4-arm64", "Photon OS 4 Arm64", "aarch64", "rpm", "fips"), + ("photonos-4-arm64", "Photon OS 4 Arm64", "arm64", "rpm", "fips"), ("photonos-5", "Photon OS 5", "x86_64", "rpm", "fips"), - ("photonos-5-arm64", "Photon OS 5 Arm64", "aarch64", "rpm", "fips"), + ("photonos-5-arm64", "Photon OS 5 Arm64", "arm64", "rpm", "fips"), ("ubuntu-20.04", "Ubuntu 20.04", "x86_64", "deb", "no-fips"), - ("ubuntu-20.04-arm64", "Ubuntu 20.04 Arm64", "aarch64", "deb", "no-fips"), + ("ubuntu-20.04-arm64", "Ubuntu 20.04 Arm64", "arm64", "deb", "no-fips"), ("ubuntu-22.04", "Ubuntu 22.04", "x86_64", "deb", "no-fips"), - ("ubuntu-22.04-arm64", "Ubuntu 22.04 Arm64", "aarch64", "deb", "no-fips"), + ("ubuntu-22.04-arm64", "Ubuntu 22.04 Arm64", "arm64", "deb", "no-fips"), ], "macos": [ ("macos-12", "macOS 12", "x86_64"), ("macos-13", "macOS 13", "x86_64"), - ("macos-13-xlarge", "macOS 13 Arm64", "aarch64"), + ("macos-13-xlarge", "macOS 13 Arm64", "arm64"), ], "windows": [ ("windows-2016", "Windows 2016", "amd64"), @@ -189,51 +189,15 @@ def generate_workflows(ctx: Context): build_ci_deps_listing = { "linux": [ - ("almalinux-8", "Alma Linux 8", "x86_64"), - ("almalinux-8-arm64", "Alma Linux 8 Arm64", "aarch64"), - ("almalinux-9", "Alma Linux 9", "x86_64"), - ("almalinux-9-arm64", "Alma Linux 9 Arm64", "aarch64"), - ("amazonlinux-2", "Amazon Linux 2", "x86_64"), - ("amazonlinux-2-arm64", "Amazon Linux 2 Arm64", "aarch64"), - ("amazonlinux-2023", "Amazon Linux 2023", "x86_64"), - ("amazonlinux-2023-arm64", "Amazon Linux 2023 Arm64", "aarch64"), - ("archlinux-lts", "Arch Linux LTS", "x86_64"), - ("centos-7", "CentOS 7", "x86_64"), - ("centos-7-arm64", "CentOS 7 Arm64", "aarch64"), - ("centosstream-8", "CentOS Stream 8", "x86_64"), - ("centosstream-8-arm64", "CentOS Stream 8 Arm64", "aarch64"), - ("centosstream-9", "CentOS Stream 9", "x86_64"), - ("centosstream-9-arm64", "CentOS Stream 9 Arm64", "aarch64"), - ("debian-10", "Debian 10", "x86_64"), - ("debian-11", "Debian 11", "x86_64"), - ("debian-11-arm64", "Debian 11 Arm64", "aarch64"), - ("debian-12", "Debian 12", "x86_64"), - ("debian-12-arm64", "Debian 12 Arm64", "aarch64"), - ("fedora-37", "Fedora 37", "x86_64"), - ("fedora-37-arm64", "Fedora 37 Arm64", "aarch64"), - ("fedora-38", "Fedora 38", "x86_64"), - ("fedora-38-arm64", "Fedora 38 Arm64", "aarch64"), - ("opensuse-15", "Opensuse 15", "x86_64"), - ("photonos-3", "Photon OS 3", "x86_64"), - ("photonos-3-arm64", "Photon OS 3 Arm64", "aarch64"), - ("photonos-4", "Photon OS 4", "x86_64"), - ("photonos-4-arm64", "Photon OS 4 Arm64", "aarch64"), - ("photonos-5", "Photon OS 5", "x86_64"), - ("photonos-5-arm64", "Photon OS 5 Arm64", "aarch64"), - ("ubuntu-20.04", "Ubuntu 20.04", "x86_64"), - ("ubuntu-20.04-arm64", "Ubuntu 20.04 Arm64", "aarch64"), - ("ubuntu-22.04", "Ubuntu 22.04", "x86_64"), - ("ubuntu-22.04-arm64", "Ubuntu 22.04 Arm64", "aarch64"), + ("x86_64", "centos-7"), + ("arm64", "centos-7-arm64"), ], "macos": [ - ("macos-12", "macOS 12", "x86_64"), - ("macos-13", "macOS 13", "x86_64"), - ("macos-13-xlarge", "macOS 13 Arm64", "aarch64"), + ("x86_64", "macos-12"), + ("arm64", "macos-13-xlarge"), ], "windows": [ - ("windows-2016", "Windows 2016", "amd64"), - ("windows-2019", "Windows 2019", "amd64"), - ("windows-2022", "Windows 2022", "amd64"), + ("amd64", "windows-2022"), ], } test_salt_pkg_downloads_listing: dict[str, list[tuple[str, str, str]]] = { @@ -249,36 +213,26 @@ def generate_workflows(ctx: Context): "fedora", "photon", ] - for slug, display_name, arch in build_ci_deps_listing["linux"]: + for slug, display_name, arch, fips in test_salt_listing["linux"]: if slug in ("archlinux-lts", "opensuse-15"): continue test_salt_pkg_downloads_listing["linux"].append((slug, arch, "package")) - # Account for old arm64 repo paths - if arch == "aarch64": - for test_slug in rpm_slugs: - if slug.startswith(test_slug): - test_salt_pkg_downloads_listing["linux"].append( - (slug, "arm64", "package") - ) - break - for slug, display_name, arch in build_ci_deps_listing["linux"][-2:]: + for slug, display_name, arch, fips in test_salt_listing["linux"][-2:]: if slug in ("archlinux-lts", "opensuse-15"): continue test_salt_pkg_downloads_listing["linux"].append((slug, arch, "onedir")) - for slug, display_name, arch in build_ci_deps_listing["macos"]: - if arch == "aarch64": - arch = "arm64" + for slug, display_name, arch in test_salt_listing["macos"]: test_salt_pkg_downloads_listing["macos"].append((slug, arch, "package")) - for slug, display_name, arch in build_ci_deps_listing["macos"][-1:]: + for slug, display_name, arch in test_salt_listing["macos"][-1:]: test_salt_pkg_downloads_listing["macos"].append((slug, arch, "onedir")) - for slug, display_name, arch in build_ci_deps_listing["windows"][-1:]: + for slug, display_name, arch in test_salt_listing["windows"][-1:]: for pkg_type in ("nsis", "msi", "onedir"): test_salt_pkg_downloads_listing["windows"].append((slug, arch, pkg_type)) test_salt_pkg_downloads_needs_slugs = set() for platform in test_salt_pkg_downloads_listing: - for slug, _, _ in test_salt_pkg_downloads_listing[platform]: - test_salt_pkg_downloads_needs_slugs.add(f"{slug.replace('.', '')}-ci-deps") + for _, arch, _ in test_salt_pkg_downloads_listing[platform]: + test_salt_pkg_downloads_needs_slugs.add(f"{platform}-{arch}-ci-deps") env = Environment( block_start_string="<%", diff --git a/tools/utils/__init__.py b/tools/utils/__init__.py index bebc9c98eb34..78913a43754b 100644 --- a/tools/utils/__init__.py +++ b/tools/utils/__init__.py @@ -259,3 +259,24 @@ def download_file( if chunk: f.write(chunk) return dest + + +def get_platform_and_arch_from_slug(slug: str) -> tuple[str, str]: + if "windows" in slug: + platform = "windows" + arch = "amd64" + elif "macos" in slug: + platform = "macos" + if "macos-13" in slug and "xlarge" in slug: + arch = "arm64" + else: + arch = "x86_64" + else: + platform = "linux" + if "arm64" in slug: + arch = "arm64" + elif "aarch64" in slug: + arch = "arm64" + else: + arch = "x86_64" + return platform, arch diff --git a/tools/vm.py b/tools/vm.py index 11eed3f99189..83493c3b04df 100644 --- a/tools/vm.py +++ b/tools/vm.py @@ -1468,15 +1468,17 @@ def compress_dependencies(self): """ Compress .nox/ into nox..tar.* in the VM """ - return self.run_nox("compress-dependencies", session_args=[self.name]) + platform, arch = tools.utils.get_platform_and_arch_from_slug(self.name) + return self.run_nox("compress-dependencies", session_args=[platform, arch]) def decompress_dependencies(self): """ Decompress nox..tar.* if it exists in the VM """ env = {"DELETE_NOX_ARCHIVE": "1"} + platform, arch = tools.utils.get_platform_and_arch_from_slug(self.name) return self.run_nox( - "decompress-dependencies", session_args=[self.name], env=env + "decompress-dependencies", session_args=[platform, arch], env=env ) def download_dependencies(self): @@ -1484,9 +1486,11 @@ def download_dependencies(self): Download nox..tar.* from VM """ if self.is_windows: - dependencies_filename = f"nox.{self.name}.tar.gz" + extension = "tar.gz" else: - dependencies_filename = f"nox.{self.name}.tar.xz" + extension = "tar.xz" + platform, arch = tools.utils.get_platform_and_arch_from_slug(self.name) + dependencies_filename = f"nox.{platform}.{arch}.{extension}" remote_path = self.upload_path.joinpath(dependencies_filename).as_posix() if self.is_windows: for drive in ("c:", "C:"): From 66b91ca316a8db0b14fa245358ceb7244e6db16e Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 2 Jan 2024 10:44:25 +0000 Subject: [PATCH 47/60] Reduce the number of workflows referenced Signed-off-by: Pedro Algarvio --- .github/workflows/build-deb-packages.yml | 132 ----- .../workflows/build-deps-ci-action-linux.yml | 160 ------ .../workflows/build-deps-ci-action-macos.yml | 135 ----- .../build-deps-ci-action-windows.yml | 160 ------ .github/workflows/build-deps-ci-action.yml | 358 +++++++++++++ .github/workflows/build-deps-onedir-linux.yml | 83 --- .github/workflows/build-deps-onedir-macos.yml | 88 ---- .../workflows/build-deps-onedir-windows.yml | 86 --- .github/workflows/build-deps-onedir.yml | 181 +++++++ .github/workflows/build-macos-packages.yml | 158 ------ .github/workflows/build-packages.yml | 461 ++++++++++++++++ .github/workflows/build-rpm-packages.yml | 114 ---- .github/workflows/build-salt-onedir-linux.yml | 90 ---- .github/workflows/build-salt-onedir-macos.yml | 93 ---- .../workflows/build-salt-onedir-windows.yml | 93 ---- .github/workflows/build-salt-onedir.yml | 200 +++++++ .github/workflows/build-windows-packages.yml | 164 ------ .github/workflows/ci.yml | 467 +++++----------- .github/workflows/nightly.yml | 493 +++++------------ .github/workflows/release.yml | 86 +-- .github/workflows/scheduled.yml | 467 +++++----------- .github/workflows/staging.yml | 497 +++++------------- .../templates/build-ci-deps.yml.jinja | 75 +-- .../templates/build-deps-ci-action.yml.jinja | 360 +++++++++++++ .../templates/build-packages.yml.jinja | 25 +- .../workflows/templates/build-repos.yml.jinja | 6 +- .github/workflows/templates/ci.yml.jinja | 20 +- .../test-salt-pkg-repo-downloads.yml.jinja | 4 +- .../templates/test-salt-pkg.yml.jinja | 12 +- .../workflows/templates/test-salt.yml.jinja | 6 +- tools/precommit/workflows.py | 5 +- 31 files changed, 2093 insertions(+), 3186 deletions(-) delete mode 100644 .github/workflows/build-deb-packages.yml delete mode 100644 .github/workflows/build-deps-ci-action-linux.yml delete mode 100644 .github/workflows/build-deps-ci-action-macos.yml delete mode 100644 .github/workflows/build-deps-ci-action-windows.yml create mode 100644 .github/workflows/build-deps-ci-action.yml delete mode 100644 .github/workflows/build-deps-onedir-linux.yml delete mode 100644 .github/workflows/build-deps-onedir-macos.yml delete mode 100644 .github/workflows/build-deps-onedir-windows.yml create mode 100644 .github/workflows/build-deps-onedir.yml delete mode 100644 .github/workflows/build-macos-packages.yml create mode 100644 .github/workflows/build-packages.yml delete mode 100644 .github/workflows/build-rpm-packages.yml delete mode 100644 .github/workflows/build-salt-onedir-linux.yml delete mode 100644 .github/workflows/build-salt-onedir-macos.yml delete mode 100644 .github/workflows/build-salt-onedir-windows.yml create mode 100644 .github/workflows/build-salt-onedir.yml delete mode 100644 .github/workflows/build-windows-packages.yml create mode 100644 .github/workflows/templates/build-deps-ci-action.yml.jinja diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml deleted file mode 100644 index 4d7bbdcc8241..000000000000 --- a/.github/workflows/build-deb-packages.yml +++ /dev/null @@ -1,132 +0,0 @@ ---- -name: Build DEB Packages - -on: - workflow_call: - inputs: - salt-version: - type: string - required: true - description: The Salt version to set prior to building packages. - relenv-version: - type: string - required: true - description: The relenv version to set prior to building packages. - python-version: - required: true - type: string - description: The version of python to use with relenv - source: - required: true - type: string - description: The backend to build the packages with - cache-prefix: - required: true - type: string - description: Seed used to invalidate caches - -env: - COLUMNS: 190 - AWS_MAX_ATTEMPTS: "10" - AWS_RETRY_MODE: "adaptive" - PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ - PIP_EXTRA_INDEX_URL: https://pypi.org/simple - -jobs: - build: - name: DEB - runs-on: - - self-hosted - - linux - - ${{ matrix.arch }} - strategy: - fail-fast: false - matrix: - arch: - - x86_64 - - aarch64 - source: - - ${{ inputs.source }} - - container: - image: ghcr.io/saltstack/salt-ci-containers/packaging:debian-12 - - steps: - # Checkout here so we can easily use custom actions - - uses: actions/checkout@v4 - - # Checkout here for the build process - - name: Checkout in build directory - uses: actions/checkout@v4 - with: - path: - pkgs/checkout/ - - - name: Download Onedir Tarball as an Artifact - uses: actions/download-artifact@v3 - with: - name: salt-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz - path: pkgs/checkout/artifacts/ - - - name: Download Release Patch - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - uses: actions/download-artifact@v3 - with: - name: salt-${{ inputs.salt-version }}.patch - path: pkgs/checkout/ - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cwd: pkgs/checkout/ - cache-prefix: ${{ inputs.cache-prefix }} - - - name: Setup Salt Version - id: setup-salt-version - uses: ./.github/actions/setup-salt-version - with: - salt-version: "${{ inputs.salt-version }}" - cwd: pkgs/checkout/ - - - name: Configure Git - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - working-directory: pkgs/checkout/ - run: | - tools pkg configure-git - - - name: Apply release patch - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - working-directory: pkgs/checkout/ - run: | - tools pkg apply-release-patch salt-${{ inputs.salt-version }}.patch --delete - - - name: Build Deb - working-directory: pkgs/checkout/ - run: | - tools pkg build deb --relenv-version=${{ inputs.relenv-version }} --python-version=${{ inputs.python-version }} ${{ - inputs.source == 'onedir' && - format('--onedir=salt-{0}-onedir-linux-{1}.tar.xz', inputs.salt-version, matrix.arch) - || - format('--arch={0}', matrix.arch) - }} - - - name: Cleanup - run: | - rm -rf pkgs/checkout/ - - - name: Set Artifact Name - id: set-artifact-name - run: | - if [ "${{ inputs.source }}" != "src" ]; then - echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-deb" >> "$GITHUB_OUTPUT" - else - echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-deb-from-src" >> "$GITHUB_OUTPUT" - fi - - - name: Upload DEBs - uses: actions/upload-artifact@v3 - with: - name: ${{ steps.set-artifact-name.outputs.artifact-name }} - path: ${{ github.workspace }}/pkgs/* - retention-days: 7 - if-no-files-found: error diff --git a/.github/workflows/build-deps-ci-action-linux.yml b/.github/workflows/build-deps-ci-action-linux.yml deleted file mode 100644 index a20c08a56ff9..000000000000 --- a/.github/workflows/build-deps-ci-action-linux.yml +++ /dev/null @@ -1,160 +0,0 @@ ---- -name: Install Test Dependencies - -on: - workflow_call: - inputs: - distro-slug: - required: true - type: string - description: The OS slug to run tests against - nox-session: - required: true - type: string - description: The nox session to run - salt-version: - type: string - required: true - description: The Salt version to set prior to running tests. - cache-prefix: - required: true - type: string - description: Seed used to invalidate caches - platform: - required: true - type: string - description: The platform being tested - arch: - required: true - type: string - description: The platform arch being tested - nox-version: - required: true - type: string - description: The nox version to install - python-version: - required: false - type: string - description: The python version to run tests with - default: "3.10" - package-name: - required: false - type: string - description: The onedir package name to use - default: salt - - -env: - COLUMNS: 190 - AWS_MAX_ATTEMPTS: "10" - AWS_RETRY_MODE: "adaptive" - PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ - PIP_EXTRA_INDEX_URL: https://pypi.org/simple - -jobs: - - dependencies: - name: Install - runs-on: - - self-hosted - - linux - - bastion - timeout-minutes: 90 - steps: - - - name: "Throttle Builds" - shell: bash - run: | - t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" - - - name: Checkout Source Code - uses: actions/checkout@v4 - - - name: Cache nox.linux.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }} - id: nox-dependencies-cache - uses: actions/cache@v3.3.1 - with: - path: nox.linux.${{ inputs.arch }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} - - - name: Download Onedir Tarball as an Artifact - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - uses: actions/download-artifact@v3 - with: - name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz - path: artifacts/ - - - name: Decompress Onedir Tarball - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - shell: bash - run: | - python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" - cd artifacts - tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz - - - name: PyPi Proxy - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - sed -i '7s;^;--index-url=https://pypi-proxy.saltstack.net/root/local/+simple/ --extra-index-url=https://pypi.org/simple\n;' requirements/static/ci/*/*.txt - - - name: Setup Python Tools Scripts - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ inputs.cache-prefix }}-build-deps-ci - - - name: Get Salt Project GitHub Actions Bot Environment - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30") - SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/tags/instance/spb:environment) - echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV" - - - name: Start VM - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - id: spin-up-vm - run: | - tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ inputs.distro-slug }} - - - name: List Free Space - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm ssh ${{ inputs.distro-slug }} -- df -h || true - - - name: Upload Checkout To VM - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm rsync ${{ inputs.distro-slug }} - - - name: Install Dependencies - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm install-dependencies --nox-session=${{ inputs.nox-session }} ${{ inputs.distro-slug }} - - - name: Cleanup .nox Directory - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm pre-archive-cleanup ${{ inputs.distro-slug }} - - - name: Compress .nox Directory - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm compress-dependencies ${{ inputs.distro-slug }} - - - name: Download Compressed .nox Directory - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm download-dependencies ${{ inputs.distro-slug }} - - - name: Destroy VM - if: always() && steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm destroy --no-wait ${{ inputs.distro-slug }} - - - name: Upload Nox Requirements Tarball - uses: actions/upload-artifact@v3 - with: - name: nox-linux-${{ inputs.arch }}-${{ inputs.nox-session }} - path: nox.linux.${{ inputs.arch }}.tar.* diff --git a/.github/workflows/build-deps-ci-action-macos.yml b/.github/workflows/build-deps-ci-action-macos.yml deleted file mode 100644 index fec65ad6bcb9..000000000000 --- a/.github/workflows/build-deps-ci-action-macos.yml +++ /dev/null @@ -1,135 +0,0 @@ ---- -name: Install Test Dependencies - -on: - workflow_call: - inputs: - distro-slug: - required: true - type: string - description: The OS slug to run tests against - nox-session: - required: true - type: string - description: The nox session to run - salt-version: - type: string - required: true - description: The Salt version to set prior to running tests. - cache-prefix: - required: true - type: string - description: Seed used to invalidate caches - platform: - required: true - type: string - description: The platform being tested - arch: - required: true - type: string - description: The platform arch being tested - nox-version: - required: true - type: string - description: The nox version to install - python-version: - required: false - type: string - description: The python version to run tests with - default: "3.10" - package-name: - required: false - type: string - description: The onedir package name to use - default: salt - - -env: - COLUMNS: 190 - PIP_INDEX_URL: "https://pypi-proxy.saltstack.net/root/local/+simple/" - PIP_EXTRA_INDEX_URL: "https://pypi.org/simple" - GITHUB_ACTIONS_PIPELINE: "1" - -jobs: - - dependencies: - name: Install - runs-on: ${{ inputs.distro-slug }} - timeout-minutes: 90 - steps: - - - name: "Throttle Builds" - shell: bash - run: | - t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" - - - name: Checkout Source Code - uses: actions/checkout@v4 - - - name: Cache nox.macos.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }} - id: nox-dependencies-cache - uses: actions/cache@v3.3.1 - with: - path: nox.macos.${{ inputs.arch }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} - - - name: Download Onedir Tarball as an Artifact - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - uses: actions/download-artifact@v3 - with: - name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz - path: artifacts/ - - - name: Decompress Onedir Tarball - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - shell: bash - run: | - python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" - cd artifacts - tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz - - - name: Set up Python ${{ inputs.python-version }} - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - uses: actions/setup-python@v4 - with: - python-version: "${{ inputs.python-version }}" - - - name: Install System Dependencies - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - brew install openssl@3 - - - name: Install Nox - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - python3 -m pip install 'nox==${{ inputs.nox-version }}' - - - name: Install Dependencies - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - env: - PRINT_TEST_SELECTION: "0" - PRINT_SYSTEM_INFO: "0" - run: | - export PYCURL_SSL_LIBRARY=openssl - export LDFLAGS="-L/usr/local/opt/openssl@3/lib" - export CPPFLAGS="-I/usr/local/opt/openssl@3/include" - export PKG_CONFIG_PATH="/usr/local/opt/openssl@3/lib/pkgconfig" - nox --install-only -e ${{ inputs.nox-session }} - - - name: Cleanup .nox Directory - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - nox --force-color -e "pre-archive-cleanup(pkg=False)" - - - name: Compress .nox Directory - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - nox --force-color -e compress-dependencies -- macos ${{ inputs.arch }} - - - name: Upload Nox Requirements Tarball - uses: actions/upload-artifact@v3 - with: - name: nox-macos-${{ inputs.arch }}-${{ inputs.nox-session }} - path: nox.macos.${{ inputs.arch }}.tar.* diff --git a/.github/workflows/build-deps-ci-action-windows.yml b/.github/workflows/build-deps-ci-action-windows.yml deleted file mode 100644 index 5bff2d825ce2..000000000000 --- a/.github/workflows/build-deps-ci-action-windows.yml +++ /dev/null @@ -1,160 +0,0 @@ ---- -name: Install Test Dependencies - -on: - workflow_call: - inputs: - distro-slug: - required: true - type: string - description: The OS slug to run tests against - nox-session: - required: true - type: string - description: The nox session to run - salt-version: - type: string - required: true - description: The Salt version to set prior to running tests. - cache-prefix: - required: true - type: string - description: Seed used to invalidate caches - platform: - required: true - type: string - description: The platform being tested - arch: - required: true - type: string - description: The platform arch being tested - nox-version: - required: true - type: string - description: The nox version to install - python-version: - required: false - type: string - description: The python version to run tests with - default: "3.10" - package-name: - required: false - type: string - description: The onedir package name to use - default: salt - - -env: - COLUMNS: 190 - AWS_MAX_ATTEMPTS: "10" - AWS_RETRY_MODE: "adaptive" - PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ - PIP_EXTRA_INDEX_URL: https://pypi.org/simple - -jobs: - - dependencies: - name: Install - runs-on: - - self-hosted - - linux - - bastion - timeout-minutes: 90 - steps: - - - name: "Throttle Builds" - shell: bash - run: | - t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" - - - name: Checkout Source Code - uses: actions/checkout@v4 - - - name: Cache nox.windows.${{ inputs.arch }}.tar.* for session ${{ inputs.nox-session }} - id: nox-dependencies-cache - uses: actions/cache@v3.3.1 - with: - path: nox.windows.${{ inputs.arch }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} - - - name: Download Onedir Tarball as an Artifact - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - uses: actions/download-artifact@v3 - with: - name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz - path: artifacts/ - - - name: Decompress Onedir Tarball - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - shell: bash - run: | - python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" - cd artifacts - tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz - - - name: PyPi Proxy - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - sed -i '7s;^;--index-url=https://pypi-proxy.saltstack.net/root/local/+simple/ --extra-index-url=https://pypi.org/simple\n;' requirements/static/ci/*/*.txt - - - name: Setup Python Tools Scripts - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ inputs.cache-prefix }}-build-deps-ci - - - name: Get Salt Project GitHub Actions Bot Environment - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30") - SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/tags/instance/spb:environment) - echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV" - - - name: Start VM - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - id: spin-up-vm - run: | - tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ inputs.distro-slug }} - - - name: List Free Space - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm ssh ${{ inputs.distro-slug }} -- df -h || true - - - name: Upload Checkout To VM - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm rsync ${{ inputs.distro-slug }} - - - name: Install Dependencies - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm install-dependencies --nox-session=${{ inputs.nox-session }} ${{ inputs.distro-slug }} - - - name: Cleanup .nox Directory - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm pre-archive-cleanup ${{ inputs.distro-slug }} - - - name: Compress .nox Directory - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm compress-dependencies ${{ inputs.distro-slug }} - - - name: Download Compressed .nox Directory - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm download-dependencies ${{ inputs.distro-slug }} - - - name: Destroy VM - if: always() && steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm destroy --no-wait ${{ inputs.distro-slug }} - - - name: Upload Nox Requirements Tarball - uses: actions/upload-artifact@v3 - with: - name: nox-windows-${{ inputs.arch }}-${{ inputs.nox-session }} - path: nox.windows.${{ inputs.arch }}.tar.* diff --git a/.github/workflows/build-deps-ci-action.yml b/.github/workflows/build-deps-ci-action.yml new file mode 100644 index 000000000000..5e6ef722af4a --- /dev/null +++ b/.github/workflows/build-deps-ci-action.yml @@ -0,0 +1,358 @@ +--- +name: Install Test Dependencies + +on: + workflow_call: + inputs: + nox-session: + required: true + type: string + description: The nox session to run + salt-version: + type: string + required: true + description: The Salt version to set prior to running tests. + cache-prefix: + required: true + type: string + description: Seed used to invalidate caches + nox-version: + required: true + type: string + description: The nox version to install + python-version: + required: false + type: string + description: The python version to run tests with + default: "3.10" + package-name: + required: false + type: string + description: The onedir package name to use + default: salt + + +env: + COLUMNS: 190 + AWS_MAX_ATTEMPTS: "10" + AWS_RETRY_MODE: "adaptive" + PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ + PIP_EXTRA_INDEX_URL: https://pypi.org/simple + +jobs: + + linux-dependencies: + name: Linux + runs-on: + - self-hosted + - linux + - bastion + timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + include: + - distro-slug: centos-7 + arch: x86_64 + - distro-slug: centos-7-arm64 + arch: arm64 + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Cache nox.linux.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} + id: nox-dependencies-cache + uses: actions/cache@v3.3.1 + with: + path: nox.linux.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ + hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') + }} + + - name: Download Onedir Tarball as an Artifact + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz + path: artifacts/ + + - name: Decompress Onedir Tarball + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + shell: bash + run: | + python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" + cd artifacts + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz + + - name: PyPi Proxy + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + sed -i '7s;^;--index-url=https://pypi-proxy.saltstack.net/root/local/+simple/ --extra-index-url=https://pypi.org/simple\n;' requirements/static/ci/*/*.txt + + - name: Setup Python Tools Scripts + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }}-build-deps-ci + + - name: Get Salt Project GitHub Actions Bot Environment + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30") + SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/tags/instance/spb:environment) + echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV" + + - name: Start VM + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + id: spin-up-vm + run: | + tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ matrix.distro-slug }} + + - name: List Free Space + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm ssh ${{ matrix.distro-slug }} -- df -h || true + + - name: Upload Checkout To VM + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm rsync ${{ matrix.distro-slug }} + + - name: Install Dependencies + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm install-dependencies --nox-session=${{ inputs.nox-session }} ${{ matrix.distro-slug }} + + - name: Cleanup .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm pre-archive-cleanup ${{ matrix.distro-slug }} + + - name: Compress .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm compress-dependencies ${{ matrix.distro-slug }} + + - name: Download Compressed .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm download-dependencies ${{ matrix.distro-slug }} + + - name: Destroy VM + if: always() && steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm destroy --no-wait ${{ matrix.distro-slug }} + + - name: Upload Nox Requirements Tarball + uses: actions/upload-artifact@v3 + with: + name: nox-linux-${{ matrix.arch }}-${{ inputs.nox-session }} + path: nox.linux.${{ matrix.arch }}.tar.* + + macos-dependencies: + name: MacOS + runs-on: ${{ matrix.distro-slug }} + timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + include: + - distro-slug: macos-12 + arch: x86_64 + - distro-slug: macos-13-xlarge + arch: arm64 + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Cache nox.macos.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} + id: nox-dependencies-cache + uses: actions/cache@v3.3.1 + with: + path: nox.macos.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ + hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') + }} + + - name: Download Onedir Tarball as an Artifact + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch }}.tar.xz + path: artifacts/ + + - name: Decompress Onedir Tarball + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + shell: bash + run: | + python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" + cd artifacts + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch }}.tar.xz + + - name: Set up Python ${{ inputs.python-version }} + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: actions/setup-python@v4 + with: + python-version: "${{ inputs.python-version }}" + + - name: Install System Dependencies + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + brew install openssl@3 + + - name: Install Nox + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + python3 -m pip install 'nox==${{ inputs.nox-version }}' + + - name: Install Dependencies + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + env: + PRINT_TEST_SELECTION: "0" + PRINT_SYSTEM_INFO: "0" + run: | + export PYCURL_SSL_LIBRARY=openssl + export LDFLAGS="-L/usr/local/opt/openssl@3/lib" + export CPPFLAGS="-I/usr/local/opt/openssl@3/include" + export PKG_CONFIG_PATH="/usr/local/opt/openssl@3/lib/pkgconfig" + nox --install-only -e ${{ inputs.nox-session }} + + - name: Cleanup .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + nox --force-color -e "pre-archive-cleanup(pkg=False)" + + - name: Compress .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + nox --force-color -e compress-dependencies -- macos ${{ matrix.arch }} + + - name: Upload Nox Requirements Tarball + uses: actions/upload-artifact@v3 + with: + name: nox-macos-${{ matrix.arch }}-${{ inputs.nox-session }} + path: nox.macos.${{ matrix.arch }}.tar.* + + windows-dependencies: + name: Windows + runs-on: + - self-hosted + - linux + - bastion + timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + include: + - distro-slug: windows-2022 + arch: amd64 + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Cache nox.windows.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} + id: nox-dependencies-cache + uses: actions/cache@v3.3.1 + with: + path: nox.windows.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ + hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') + }} + + - name: Download Onedir Tarball as an Artifact + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.tar.xz + path: artifacts/ + + - name: Decompress Onedir Tarball + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + shell: bash + run: | + python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" + cd artifacts + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.tar.xz + + - name: PyPi Proxy + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + sed -i '7s;^;--index-url=https://pypi-proxy.saltstack.net/root/local/+simple/ --extra-index-url=https://pypi.org/simple\n;' requirements/static/ci/*/*.txt + + - name: Setup Python Tools Scripts + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }}-build-deps-ci + + - name: Get Salt Project GitHub Actions Bot Environment + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30") + SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/tags/instance/spb:environment) + echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV" + + - name: Start VM + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + id: spin-up-vm + run: | + tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ matrix.distro-slug }} + + - name: List Free Space + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm ssh ${{ matrix.distro-slug }} -- df -h || true + + - name: Upload Checkout To VM + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm rsync ${{ matrix.distro-slug }} + + - name: Install Dependencies + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm install-dependencies --nox-session=${{ inputs.nox-session }} ${{ matrix.distro-slug }} + + - name: Cleanup .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm pre-archive-cleanup ${{ matrix.distro-slug }} + + - name: Compress .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm compress-dependencies ${{ matrix.distro-slug }} + + - name: Download Compressed .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm download-dependencies ${{ matrix.distro-slug }} + + - name: Destroy VM + if: always() && steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm destroy --no-wait ${{ matrix.distro-slug }} + + - name: Upload Nox Requirements Tarball + uses: actions/upload-artifact@v3 + with: + name: nox-windows-${{ matrix.arch }}-${{ inputs.nox-session }} + path: nox.windows.${{ matrix.arch }}.tar.* diff --git a/.github/workflows/build-deps-onedir-linux.yml b/.github/workflows/build-deps-onedir-linux.yml deleted file mode 100644 index 8d149c462611..000000000000 --- a/.github/workflows/build-deps-onedir-linux.yml +++ /dev/null @@ -1,83 +0,0 @@ ---- -name: Build Packaging Dependencies Onedir - -on: - workflow_call: - inputs: - salt-version: - type: string - required: true - description: The Salt version to set prior to building packages. - github-hosted-runners: - type: boolean - required: true - self-hosted-runners: - type: boolean - required: true - cache-seed: - required: true - type: string - description: Seed used to invalidate caches - relenv-version: - required: true - type: string - description: The version of relenv to use - python-version: - required: true - type: string - description: The version of python to use with relenv - -env: - RELENV_DATA: "${{ github.workspace }}/.relenv" - COLUMNS: 190 - AWS_MAX_ATTEMPTS: "10" - AWS_RETRY_MODE: "adaptive" - PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ - PIP_EXTRA_INDEX_URL: https://pypi.org/simple - -jobs: - - build-deps-linux: - name: Linux - if: ${{ inputs.self-hosted-runners }} - strategy: - fail-fast: false - matrix: - arch: - - x86_64 - - aarch64 - runs-on: - - self-hosted - - linux - - ${{ matrix.arch }} - steps: - - - name: "Throttle Builds" - shell: bash - run: | - t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" - - - uses: actions/checkout@v4 - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ inputs.cache-seed }}-build-deps-linux-${{ matrix.arch }} - - - name: Setup Relenv - id: setup-relenv - uses: ./.github/actions/setup-relenv - with: - platform: linux - arch: ${{ matrix.arch }} - version: ${{ inputs.relenv-version }} - cache-seed: ${{ inputs.cache-seed }} - python-version: ${{ inputs.python-version }} - - - name: Install Salt Packaging Dependencies into Relenv Onedir - uses: ./.github/actions/build-onedir-deps - with: - platform: linux - arch: ${{ matrix.arch }} - python-version: "${{ inputs.python-version }}" - cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} diff --git a/.github/workflows/build-deps-onedir-macos.yml b/.github/workflows/build-deps-onedir-macos.yml deleted file mode 100644 index 2886c3f993d1..000000000000 --- a/.github/workflows/build-deps-onedir-macos.yml +++ /dev/null @@ -1,88 +0,0 @@ ---- -name: Build Packaging Dependencies Onedir - -on: - workflow_call: - inputs: - salt-version: - type: string - required: true - description: The Salt version to set prior to building packages. - github-hosted-runners: - type: boolean - required: true - self-hosted-runners: - type: boolean - required: true - cache-seed: - required: true - type: string - description: Seed used to invalidate caches - relenv-version: - required: true - type: string - description: The version of relenv to use - python-version: - required: true - type: string - description: The version of python to use with relenv - -env: - RELENV_DATA: "${{ github.workspace }}/.relenv" - COLUMNS: 190 - AWS_MAX_ATTEMPTS: "10" - AWS_RETRY_MODE: "adaptive" - PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ - PIP_EXTRA_INDEX_URL: https://pypi.org/simple - -jobs: - - build-deps-macos: - name: macOS - if: ${{ inputs.github-hosted-runners }} - strategy: - fail-fast: false - max-parallel: 2 - matrix: - arch: - - x86_64 - - aarch64 - runs-on: - - ${{ matrix.arch == 'aarch64' && 'macos-13-xlarge' || 'macos-12' }} - - steps: - - - name: "Throttle Builds" - shell: bash - run: | - t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" - - - uses: actions/checkout@v4 - - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ inputs.cache-seed }}-build-deps-macos - - - name: Setup Relenv - id: setup-relenv - uses: ./.github/actions/setup-relenv - with: - platform: darwin - arch: ${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }} - version: ${{ inputs.relenv-version }} - cache-seed: ${{ inputs.cache-seed }} - python-version: ${{ inputs.python-version }} - - - name: Install Salt Packaging Dependencies into Relenv Onedir - uses: ./.github/actions/build-onedir-deps - with: - platform: darwin - arch: ${{ matrix.arch }} - python-version: "${{ inputs.python-version }}" - cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} diff --git a/.github/workflows/build-deps-onedir-windows.yml b/.github/workflows/build-deps-onedir-windows.yml deleted file mode 100644 index af741e062242..000000000000 --- a/.github/workflows/build-deps-onedir-windows.yml +++ /dev/null @@ -1,86 +0,0 @@ ---- -name: Build Packaging Dependencies Onedir - -on: - workflow_call: - inputs: - salt-version: - type: string - required: true - description: The Salt version to set prior to building packages. - github-hosted-runners: - type: boolean - required: true - self-hosted-runners: - type: boolean - required: true - cache-seed: - required: true - type: string - description: Seed used to invalidate caches - relenv-version: - required: true - type: string - description: The version of relenv to use - python-version: - required: true - type: string - description: The version of python to use with relenv - -env: - RELENV_DATA: "${{ github.workspace }}/.relenv" - COLUMNS: 190 - AWS_MAX_ATTEMPTS: "10" - AWS_RETRY_MODE: "adaptive" - PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ - PIP_EXTRA_INDEX_URL: https://pypi.org/simple - -jobs: - - build-deps-windows: - name: Windows - if: ${{ inputs.github-hosted-runners }} - strategy: - fail-fast: false - max-parallel: 2 - matrix: - arch: - - x86 - - amd64 - runs-on: windows-latest - steps: - - - name: "Throttle Builds" - shell: bash - run: | - t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" - - - uses: actions/checkout@v4 - - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ inputs.cache-seed }}-build-deps-windows-${{ matrix.arch }} - - - name: Setup Relenv - id: setup-relenv - uses: ./.github/actions/setup-relenv - with: - platform: windows - arch: ${{ matrix.arch }} - version: ${{ inputs.relenv-version }} - cache-seed: ${{ inputs.cache-seed }} - python-version: ${{ inputs.python-version }} - - - name: Install Salt Packaging Dependencies into Relenv Onedir - uses: ./.github/actions/build-onedir-deps - with: - platform: windows - arch: ${{ matrix.arch }} - python-version: "${{ inputs.python-version }}" - cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} diff --git a/.github/workflows/build-deps-onedir.yml b/.github/workflows/build-deps-onedir.yml new file mode 100644 index 000000000000..438ab3c6ae92 --- /dev/null +++ b/.github/workflows/build-deps-onedir.yml @@ -0,0 +1,181 @@ +--- +name: Build Packaging Dependencies Onedir + +on: + workflow_call: + inputs: + salt-version: + type: string + required: true + description: The Salt version to set prior to building packages. + github-hosted-runners: + type: boolean + required: true + self-hosted-runners: + type: boolean + required: true + cache-seed: + required: true + type: string + description: Seed used to invalidate caches + relenv-version: + required: true + type: string + description: The version of relenv to use + python-version: + required: true + type: string + description: The version of python to use with relenv + +env: + RELENV_DATA: "${{ github.workspace }}/.relenv" + COLUMNS: 190 + AWS_MAX_ATTEMPTS: "10" + AWS_RETRY_MODE: "adaptive" + PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ + PIP_EXTRA_INDEX_URL: https://pypi.org/simple + +jobs: + + build-deps-linux: + name: Linux + if: ${{ inputs.self-hosted-runners }} + strategy: + fail-fast: false + matrix: + arch: + - x86_64 + - aarch64 + runs-on: + - self-hosted + - linux + - ${{ matrix.arch }} + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" + + - uses: actions/checkout@v4 + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-seed }}-build-deps-linux-${{ matrix.arch }} + + - name: Setup Relenv + id: setup-relenv + uses: ./.github/actions/setup-relenv + with: + platform: linux + arch: ${{ matrix.arch }} + version: ${{ inputs.relenv-version }} + cache-seed: ${{ inputs.cache-seed }} + python-version: ${{ inputs.python-version }} + + - name: Install Salt Packaging Dependencies into Relenv Onedir + uses: ./.github/actions/build-onedir-deps + with: + platform: linux + arch: ${{ matrix.arch }} + python-version: "${{ inputs.python-version }}" + cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} + + build-deps-macos: + name: macOS + if: ${{ inputs.github-hosted-runners }} + strategy: + fail-fast: false + max-parallel: 2 + matrix: + arch: + - x86_64 + - aarch64 + runs-on: + - ${{ matrix.arch == 'aarch64' && 'macos-13-xlarge' || 'macos-12' }} + + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" + + - uses: actions/checkout@v4 + + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-seed }}-build-deps-macos + + - name: Setup Relenv + id: setup-relenv + uses: ./.github/actions/setup-relenv + with: + platform: darwin + arch: ${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }} + version: ${{ inputs.relenv-version }} + cache-seed: ${{ inputs.cache-seed }} + python-version: ${{ inputs.python-version }} + + - name: Install Salt Packaging Dependencies into Relenv Onedir + uses: ./.github/actions/build-onedir-deps + with: + platform: darwin + arch: ${{ matrix.arch }} + python-version: "${{ inputs.python-version }}" + cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} + + build-deps-windows: + name: Windows + if: ${{ inputs.github-hosted-runners }} + strategy: + fail-fast: false + max-parallel: 2 + matrix: + arch: + - x86 + - amd64 + runs-on: windows-latest + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" + + - uses: actions/checkout@v4 + + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-seed }}-build-deps-windows-${{ matrix.arch }} + + - name: Setup Relenv + id: setup-relenv + uses: ./.github/actions/setup-relenv + with: + platform: windows + arch: ${{ matrix.arch }} + version: ${{ inputs.relenv-version }} + cache-seed: ${{ inputs.cache-seed }} + python-version: ${{ inputs.python-version }} + + - name: Install Salt Packaging Dependencies into Relenv Onedir + uses: ./.github/actions/build-onedir-deps + with: + platform: windows + arch: ${{ matrix.arch }} + python-version: "${{ inputs.python-version }}" + cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} diff --git a/.github/workflows/build-macos-packages.yml b/.github/workflows/build-macos-packages.yml deleted file mode 100644 index 9b3324893abd..000000000000 --- a/.github/workflows/build-macos-packages.yml +++ /dev/null @@ -1,158 +0,0 @@ ---- -name: Build macOS Packages - -on: - workflow_call: - inputs: - salt-version: - type: string - required: true - description: The Salt version to set prior to building packages. - relenv-version: - type: string - required: true - description: The relenv version to set prior to building packages. - python-version: - required: true - type: string - description: The version of python to use with relenv - sign-packages: - type: boolean - default: false - description: Sign Packages - environment: - type: string - description: The GitHub Environment where this workflow should run - default: ci - source: - required: true - type: string - description: The backend to build the packages with - cache-prefix: - required: true - type: string - description: Seed used to invalidate caches - -env: - COLUMNS: 190 - PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ - PIP_EXTRA_INDEX_URL: https://pypi.org/simple - -jobs: - - build-pkgs: - name: macOS - environment: ${{ inputs.environment }} - strategy: - fail-fast: false - matrix: - arch: - - x86_64 - - aarch64 - source: - - ${{ inputs.source }} - - runs-on: - - ${{ matrix.arch == 'aarch64' && 'macos-13-xlarge' || 'macos-12' }} - - steps: - - name: Check Package Signing Enabled - shell: bash - id: check-pkg-sign - run: | - if [ "${{ inputs.sign-packages }}" == "true" ]; then - if [ "${{ (secrets.MAC_SIGN_APPLE_ACCT != '' && contains(fromJSON('["nightly", "staging"]'), inputs.environment)) && 'true' || 'false' }}" != "true" ]; then - MSG="Secrets for signing packages are not available. The packages created will NOT be signed." - echo "${MSG}" - echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" - echo "sign-pkgs=false" >> "$GITHUB_OUTPUT" - else - MSG="The packages created WILL be signed." - echo "${MSG}" - echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" - echo "sign-pkgs=true" >> "$GITHUB_OUTPUT" - fi - else - MSG="The sign-packages input is false. The packages created will NOT be signed." - echo "${MSG}" - echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" - echo "sign-pkgs=false" >> "$GITHUB_OUTPUT" - fi - - - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 - with: - python-version: 3.11 - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ inputs.cache-prefix }} - - - name: Setup Salt Version - id: setup-salt-version - uses: ./.github/actions/setup-salt-version - with: - salt-version: "${{ inputs.salt-version }}" - - - name: Download Onedir Tarball as an Artifact - uses: actions/download-artifact@v3 - with: - name: salt-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch }}.tar.xz - path: artifacts/ - - - name: Prepare Package Signing - if: ${{ steps.check-pkg-sign.outputs.sign-pkgs == 'true' }} - run: | - echo ${{ secrets.MAC_SIGN_DEV_APP_CERT_B64 }} | base64 --decode > app-cert.p12 - echo ${{ secrets.MAC_SIGN_DEV_INSTALL_CERT_B64 }} | base64 --decode > install-cert.p12 - # Create SaltSigning keychain. This will contain the certificates for signing - security create-keychain -p "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" - # Append SaltSigning keychain to the search list - security list-keychains -d user -s "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" "$(security list-keychains -d user | sed s/\"//g)" - # Unlock the keychain so we can import certs - security unlock-keychain -p "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" - # Developer Application Certificate - security import "app-cert.p12" -t agg -k "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" -P "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" -A - rm app-cert.p12 - # Developer Installer Certificate - security import "install-cert.p12" -t agg -k "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" -P "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" -A - rm install-cert.p12 - security set-key-partition-list -S apple-tool:,apple: -k "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" &> /dev/null - - - name: Build MacOS Package - env: - DEV_APP_CERT: "${{ secrets.MAC_SIGN_DEV_APP_CERT }}" - DEV_INSTALL_CERT: "${{ secrets.MAC_SIGN_DEV_INSTALL_CERT }}" - APPLE_ACCT: "${{ secrets.MAC_SIGN_APPLE_ACCT }}" - APPLE_TEAM_ID: "${{ secrets.MAC_SIGN_APPLE_TEAM_ID }}" - APP_SPEC_PWD: "${{ secrets.MAC_SIGN_APP_SPEC_PWD }}" - run: | - tools pkg build macos --relenv-version=${{ inputs.relenv-version }} --python-version=${{ inputs.python-version }} ${{ - inputs.source == 'onedir' && - format( - '--onedir salt-{0}-onedir-darwin-{1}.tar.xz --salt-version {0} {2}', - inputs.salt-version, - matrix.arch, - steps.check-pkg-sign.outputs.sign-pkgs == 'true' && '--sign' || '' - ) - || - format('--salt-version {0}', inputs.salt-version) - }} - - - name: Set Artifact Name - id: set-artifact-name - run: | - if [ "${{ inputs.source }}" != "src" ]; then - echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-macos" >> "$GITHUB_OUTPUT" - else - echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-macos-from-src" >> "$GITHUB_OUTPUT" - fi - - - name: Upload ${{ matrix.arch }} Package - uses: actions/upload-artifact@v3 - with: - name: ${{ steps.set-artifact-name.outputs.artifact-name }} - path: pkg/macos/salt-${{ inputs.salt-version }}-py3-*.pkg - retention-days: 7 - if-no-files-found: error diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml new file mode 100644 index 000000000000..7a7f13871e45 --- /dev/null +++ b/.github/workflows/build-packages.yml @@ -0,0 +1,461 @@ +--- +name: Build Packages + +on: + workflow_call: + inputs: + salt-version: + type: string + required: true + description: The Salt version to set prior to building packages. + relenv-version: + type: string + required: true + description: The relenv version to set prior to building packages. + python-version: + required: true + type: string + description: The version of python to use with relenv + sign-macos-packages: + type: boolean + default: false + description: Sign MacOS Packages + sign-windows-packages: + type: boolean + default: false + description: Sign Windows Packages + environment: + type: string + description: The GitHub Environment where this workflow should run + default: ci + source: + required: true + type: string + description: The backend to build the packages with + cache-prefix: + required: true + type: string + description: Seed used to invalidate caches + +env: + COLUMNS: 190 + PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ + PIP_EXTRA_INDEX_URL: https://pypi.org/simple + +jobs: + + build-macos-pkgs: + name: macOS + environment: ${{ inputs.environment }} + strategy: + fail-fast: false + matrix: + arch: + - x86_64 + - aarch64 + source: + - ${{ inputs.source }} + + runs-on: + - ${{ matrix.arch == 'aarch64' && 'macos-13-xlarge' || 'macos-12' }} + + steps: + - name: Check Package Signing Enabled + shell: bash + id: check-pkg-sign + run: | + if [ "${{ inputs.sign-macos-packages }}" == "true" ]; then + if [ "${{ (secrets.MAC_SIGN_APPLE_ACCT != '' && contains(fromJSON('["nightly", "staging"]'), inputs.environment)) && 'true' || 'false' }}" != "true" ]; then + MSG="Secrets for signing packages are not available. The packages created will NOT be signed." + echo "${MSG}" + echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" + echo "sign-pkgs=false" >> "$GITHUB_OUTPUT" + else + MSG="The packages created WILL be signed." + echo "${MSG}" + echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" + echo "sign-pkgs=true" >> "$GITHUB_OUTPUT" + fi + else + MSG="The sign-macos-packages input is false. The packages created will NOT be signed." + echo "${MSG}" + echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" + echo "sign-pkgs=false" >> "$GITHUB_OUTPUT" + fi + + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: 3.11 + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }} + + - name: Setup Salt Version + id: setup-salt-version + uses: ./.github/actions/setup-salt-version + with: + salt-version: "${{ inputs.salt-version }}" + + - name: Download Onedir Tarball as an Artifact + uses: actions/download-artifact@v3 + with: + name: salt-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch }}.tar.xz + path: artifacts/ + + - name: Prepare Package Signing + if: ${{ steps.check-pkg-sign.outputs.sign-pkgs == 'true' }} + run: | + echo ${{ secrets.MAC_SIGN_DEV_APP_CERT_B64 }} | base64 --decode > app-cert.p12 + echo ${{ secrets.MAC_SIGN_DEV_INSTALL_CERT_B64 }} | base64 --decode > install-cert.p12 + # Create SaltSigning keychain. This will contain the certificates for signing + security create-keychain -p "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" + # Append SaltSigning keychain to the search list + security list-keychains -d user -s "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" "$(security list-keychains -d user | sed s/\"//g)" + # Unlock the keychain so we can import certs + security unlock-keychain -p "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" + # Developer Application Certificate + security import "app-cert.p12" -t agg -k "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" -P "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" -A + rm app-cert.p12 + # Developer Installer Certificate + security import "install-cert.p12" -t agg -k "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" -P "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" -A + rm install-cert.p12 + security set-key-partition-list -S apple-tool:,apple: -k "${{ secrets.MAC_SIGN_DEV_PASSWORD }}" "${{ secrets.MAC_SIGN_DEV_KEYCHAIN }}" &> /dev/null + + - name: Build MacOS Package + env: + DEV_APP_CERT: "${{ secrets.MAC_SIGN_DEV_APP_CERT }}" + DEV_INSTALL_CERT: "${{ secrets.MAC_SIGN_DEV_INSTALL_CERT }}" + APPLE_ACCT: "${{ secrets.MAC_SIGN_APPLE_ACCT }}" + APPLE_TEAM_ID: "${{ secrets.MAC_SIGN_APPLE_TEAM_ID }}" + APP_SPEC_PWD: "${{ secrets.MAC_SIGN_APP_SPEC_PWD }}" + run: | + tools pkg build macos --relenv-version=${{ inputs.relenv-version }} --python-version=${{ inputs.python-version }} ${{ + inputs.source == 'onedir' && + format( + '--onedir salt-{0}-onedir-darwin-{1}.tar.xz --salt-version {0} {2}', + inputs.salt-version, + matrix.arch, + steps.check-pkg-sign.outputs.sign-pkgs == 'true' && '--sign' || '' + ) + || + format('--salt-version {0}', inputs.salt-version) + }} + + - name: Set Artifact Name + id: set-artifact-name + run: | + if [ "${{ inputs.source }}" != "src" ]; then + echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-macos" >> "$GITHUB_OUTPUT" + else + echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-macos-from-src" >> "$GITHUB_OUTPUT" + fi + + - name: Upload ${{ matrix.arch }} Package + uses: actions/upload-artifact@v3 + with: + name: ${{ steps.set-artifact-name.outputs.artifact-name }} + path: pkg/macos/salt-${{ inputs.salt-version }}-py3-*.pkg + retention-days: 7 + if-no-files-found: error + + build-deb-packages: + name: DEB + runs-on: + - self-hosted + - linux + - ${{ matrix.arch }} + strategy: + fail-fast: false + matrix: + arch: + - x86_64 + - aarch64 + source: + - ${{ inputs.source }} + + container: + image: ghcr.io/saltstack/salt-ci-containers/packaging:debian-12 + + steps: + # Checkout here so we can easily use custom actions + - uses: actions/checkout@v4 + + # Checkout here for the build process + - name: Checkout in build directory + uses: actions/checkout@v4 + with: + path: + pkgs/checkout/ + + - name: Download Onedir Tarball as an Artifact + uses: actions/download-artifact@v3 + with: + name: salt-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz + path: pkgs/checkout/artifacts/ + + - name: Download Release Patch + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + uses: actions/download-artifact@v3 + with: + name: salt-${{ inputs.salt-version }}.patch + path: pkgs/checkout/ + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cwd: pkgs/checkout/ + cache-prefix: ${{ inputs.cache-prefix }} + + - name: Setup Salt Version + id: setup-salt-version + uses: ./.github/actions/setup-salt-version + with: + salt-version: "${{ inputs.salt-version }}" + cwd: pkgs/checkout/ + + - name: Configure Git + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + working-directory: pkgs/checkout/ + run: | + tools pkg configure-git + + - name: Apply release patch + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + working-directory: pkgs/checkout/ + run: | + tools pkg apply-release-patch salt-${{ inputs.salt-version }}.patch --delete + + - name: Build Deb + working-directory: pkgs/checkout/ + run: | + tools pkg build deb --relenv-version=${{ inputs.relenv-version }} --python-version=${{ inputs.python-version }} ${{ + inputs.source == 'onedir' && + format('--onedir=salt-{0}-onedir-linux-{1}.tar.xz', inputs.salt-version, matrix.arch) + || + format('--arch={0}', matrix.arch) + }} + + - name: Cleanup + run: | + rm -rf pkgs/checkout/ + + - name: Set Artifact Name + id: set-artifact-name + run: | + if [ "${{ inputs.source }}" != "src" ]; then + echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-deb" >> "$GITHUB_OUTPUT" + else + echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-deb-from-src" >> "$GITHUB_OUTPUT" + fi + + - name: Upload DEBs + uses: actions/upload-artifact@v3 + with: + name: ${{ steps.set-artifact-name.outputs.artifact-name }} + path: ${{ github.workspace }}/pkgs/* + retention-days: 7 + if-no-files-found: error + + build-rpm-packages: + name: RPM + runs-on: + - self-hosted + - linux + - ${{ matrix.arch }} + strategy: + fail-fast: false + matrix: + arch: + - x86_64 + - aarch64 + source: + - ${{ inputs.source }} + + container: + image: ghcr.io/saltstack/salt-ci-containers/packaging:centosstream-9 + + steps: + - uses: actions/checkout@v4 + + - name: Download Onedir Tarball as an Artifact + uses: actions/download-artifact@v3 + with: + name: salt-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz + path: artifacts/ + + - name: Download Release Patch + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + uses: actions/download-artifact@v3 + with: + name: salt-${{ inputs.salt-version }}.patch + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }} + + - name: Setup Salt Version + id: setup-salt-version + uses: ./.github/actions/setup-salt-version + with: + salt-version: "${{ inputs.salt-version }}" + + - name: Configure Git + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + run: | + tools pkg configure-git + + - name: Apply release patch + if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} + run: | + tools pkg apply-release-patch salt-${{ inputs.salt-version }}.patch --delete + + - name: Build RPM + run: | + tools pkg build rpm --relenv-version=${{ inputs.relenv-version }} --python-version=${{ inputs.python-version }} ${{ + inputs.source == 'onedir' && + format('--onedir=salt-{0}-onedir-linux-{1}.tar.xz', inputs.salt-version, matrix.arch) + || + format('--arch={0}', matrix.arch) + }} + + - name: Set Artifact Name + id: set-artifact-name + run: | + if [ "${{ inputs.source }}" != "src" ]; then + echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-rpm" >> "$GITHUB_OUTPUT" + else + echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-rpm-from-src" >> "$GITHUB_OUTPUT" + fi + + - name: Upload RPMs + uses: actions/upload-artifact@v3 + with: + name: ${{ steps.set-artifact-name.outputs.artifact-name }} + path: ~/rpmbuild/RPMS/${{ matrix.arch }}/*.rpm + retention-days: 7 + if-no-files-found: error + + build-windows-pkgs: + name: Windows + environment: ${{ inputs.environment }} + strategy: + fail-fast: false + max-parallel: 2 + matrix: + arch: + - x86 + - amd64 + source: + - ${{ inputs.source }} + + runs-on: + - windows-latest + env: + SM_HOST: "${{ secrets.WIN_SIGN_HOST_PROD }}" + SM_API_KEY: "${{ secrets.WIN_SIGN_API_KEY }}" + SM_CLIENT_CERT_FILE: "D:\\Certificate_pkcs12.p12" + SM_CLIENT_CERT_PASSWORD: "${{ secrets.WIN_SIGN_CERT_PASSWORD }}" + SM_CLIENT_CERT_FILE_B64: "${{ secrets.WIN_SIGN_CERT_FILE_B64 }}" + WIN_SIGN_CERT_SHA1_HASH: "${{ secrets.WIN_SIGN_CERT_SHA1_HASH }}" + + steps: + - name: Check Package Signing Enabled + shell: bash + id: check-pkg-sign + run: | + if [ "${{ inputs.sign-windows-packages }}" == "true" ]; then + if [ "${{ (secrets.WIN_SIGN_API_KEY != '' && env.SM_HOST != '' && inputs.environment == 'staging') && 'true' || 'false' }}" != "true" ]; then + MSG="Secrets for signing packages are not available. The packages created will NOT be signed." + echo "${MSG}" + echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" + echo "sign-pkgs=false" >> "$GITHUB_OUTPUT" + else + MSG="The packages created WILL be signed." + echo "${MSG}" + echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" + echo "sign-pkgs=true" >> "$GITHUB_OUTPUT" + fi + else + MSG="The sign-windows-packages input is false. The packages created will NOT be signed." + echo "${MSG}" + echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" + echo "sign-pkgs=false" >> "$GITHUB_OUTPUT" + fi + + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: 3.11 + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }} + + - name: Setup Salt Version + id: setup-salt-version + uses: ./.github/actions/setup-salt-version + with: + salt-version: "${{ inputs.salt-version }}" + + - name: Download Onedir Tarball as an Artifact + uses: actions/download-artifact@v3 + with: + name: salt-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.zip + path: artifacts/ + + - name: Code signing with Software Trust Manager + if: ${{ steps.check-pkg-sign.outputs.sign-pkgs == 'true' }} + uses: digicert/ssm-code-signing@v0.0.2 + + - name: Setup Certificate + if: ${{ steps.check-pkg-sign.outputs.sign-pkgs == 'true' }} + shell: bash + run: | + echo "${{ secrets.WIN_SIGN_CERT_FILE_B64 }}" | base64 --decode > /d/Certificate_pkcs12.p12 + + - name: Build Windows Packages + run: | + tools pkg build windows --relenv-version=${{ inputs.relenv-version }} --python-version=${{ inputs.python-version }} ${{ + inputs.source == 'onedir' && + format( + '--onedir salt-{0}-onedir-windows-{1}.zip --salt-version {0} --arch {1} {2}', + inputs.salt-version, + matrix.arch, + steps.check-pkg-sign.outputs.sign-pkgs == 'true' && '--sign' || '' + ) + || + format('--salt-version {0} --arch {1}', inputs.salt-version, matrix.arch) + }} + + - name: Set Artifact Name + id: set-artifact-name + shell: bash + run: | + if [ "${{ inputs.source }}" != "src" ]; then + echo "artifact-name-nsis=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-NSIS" >> "$GITHUB_OUTPUT" + echo "artifact-name-msi=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-MSI" >> "$GITHUB_OUTPUT" + else + echo "artifact-name-nsis=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-NSIS-from-src" >> "$GITHUB_OUTPUT" + echo "artifact-name-msi=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-MSI-from-src" >> "$GITHUB_OUTPUT" + fi + + - name: Upload ${{ matrix.arch }} NSIS Packages + uses: actions/upload-artifact@v3 + with: + name: ${{ steps.set-artifact-name.outputs.artifact-name-nsis }} + path: pkg/windows/build/Salt-*.exe + retention-days: 7 + if-no-files-found: error + + - name: Upload ${{ matrix.arch }} MSI Package + uses: actions/upload-artifact@v3 + with: + name: ${{ steps.set-artifact-name.outputs.artifact-name-msi }} + path: pkg/windows/build/Salt-*.msi + retention-days: 7 + if-no-files-found: error diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml deleted file mode 100644 index 1b2103700c94..000000000000 --- a/.github/workflows/build-rpm-packages.yml +++ /dev/null @@ -1,114 +0,0 @@ ---- -name: Build RPM Packages - -on: - workflow_call: - inputs: - salt-version: - type: string - required: true - description: The Salt version to set prior to building packages. - relenv-version: - type: string - required: true - description: The relenv version to set prior to building packages. - python-version: - required: true - type: string - description: The version of python to use with relenv - source: - required: true - type: string - description: The backend to build the packages with - cache-prefix: - required: true - type: string - description: Seed used to invalidate caches - -env: - COLUMNS: 190 - AWS_MAX_ATTEMPTS: "10" - AWS_RETRY_MODE: "adaptive" - PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ - PIP_EXTRA_INDEX_URL: https://pypi.org/simple - -jobs: - build: - name: RPM - runs-on: - - self-hosted - - linux - - ${{ matrix.arch }} - strategy: - fail-fast: false - matrix: - arch: - - x86_64 - - aarch64 - source: - - ${{ inputs.source }} - - container: - image: ghcr.io/saltstack/salt-ci-containers/packaging:centosstream-9 - - steps: - - uses: actions/checkout@v4 - - - name: Download Onedir Tarball as an Artifact - uses: actions/download-artifact@v3 - with: - name: salt-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz - path: artifacts/ - - - name: Download Release Patch - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - uses: actions/download-artifact@v3 - with: - name: salt-${{ inputs.salt-version }}.patch - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ inputs.cache-prefix }} - - - name: Setup Salt Version - id: setup-salt-version - uses: ./.github/actions/setup-salt-version - with: - salt-version: "${{ inputs.salt-version }}" - - - name: Configure Git - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - run: | - tools pkg configure-git - - - name: Apply release patch - if: ${{ startsWith(github.event.ref, 'refs/tags') == false }} - run: | - tools pkg apply-release-patch salt-${{ inputs.salt-version }}.patch --delete - - - name: Build RPM - run: | - tools pkg build rpm --relenv-version=${{ inputs.relenv-version }} --python-version=${{ inputs.python-version }} ${{ - inputs.source == 'onedir' && - format('--onedir=salt-{0}-onedir-linux-{1}.tar.xz', inputs.salt-version, matrix.arch) - || - format('--arch={0}', matrix.arch) - }} - - - name: Set Artifact Name - id: set-artifact-name - run: | - if [ "${{ inputs.source }}" != "src" ]; then - echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-rpm" >> "$GITHUB_OUTPUT" - else - echo "artifact-name=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-rpm-from-src" >> "$GITHUB_OUTPUT" - fi - - - name: Upload RPMs - uses: actions/upload-artifact@v3 - with: - name: ${{ steps.set-artifact-name.outputs.artifact-name }} - path: ~/rpmbuild/RPMS/${{ matrix.arch }}/*.rpm - retention-days: 7 - if-no-files-found: error diff --git a/.github/workflows/build-salt-onedir-linux.yml b/.github/workflows/build-salt-onedir-linux.yml deleted file mode 100644 index a7e197b760c0..000000000000 --- a/.github/workflows/build-salt-onedir-linux.yml +++ /dev/null @@ -1,90 +0,0 @@ ---- -name: Build Salt Onedir - -on: - workflow_call: - inputs: - salt-version: - type: string - required: true - description: The Salt version to set prior to building packages. - github-hosted-runners: - type: boolean - required: true - self-hosted-runners: - type: boolean - required: true - cache-seed: - required: true - type: string - description: Seed used to invalidate caches - relenv-version: - required: true - type: string - description: The version of relenv to use - python-version: - required: true - type: string - description: The version of python to use with relenv - -env: - RELENV_DATA: "${{ github.workspace }}/.relenv" - COLUMNS: 190 - AWS_MAX_ATTEMPTS: "10" - AWS_RETRY_MODE: "adaptive" - PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ - PIP_EXTRA_INDEX_URL: https://pypi.org/simple - -jobs: - - build-salt-linux: - name: Linux - if: ${{ inputs.self-hosted-runners }} - strategy: - fail-fast: false - matrix: - arch: - - x86_64 - - aarch64 - runs-on: - - self-hosted - - linux - - ${{ matrix.arch }} - steps: - - - name: "Throttle Builds" - shell: bash - run: | - t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" - - - uses: actions/checkout@v4 - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ inputs.cache-seed }}-build-salt-onedir-windows - - - name: Setup Salt Version - id: setup-salt-version - uses: ./.github/actions/setup-salt-version - with: - salt-version: "${{ inputs.salt-version }}" - - - name: Setup Relenv - uses: ./.github/actions/setup-relenv - id: setup-relenv - with: - platform: linux - arch: ${{ matrix.arch }} - version: ${{ inputs.relenv-version }} - cache-seed: ${{ inputs.cache-seed }} - python-version: ${{ inputs.python-version }} - - - name: Install Salt into Relenv Onedir - uses: ./.github/actions/build-onedir-salt - with: - platform: linux - arch: ${{ matrix.arch }} - salt-version: "${{ inputs.salt-version }}" - python-version: "${{ inputs.python-version }}" - cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} diff --git a/.github/workflows/build-salt-onedir-macos.yml b/.github/workflows/build-salt-onedir-macos.yml deleted file mode 100644 index 3697e51e3f09..000000000000 --- a/.github/workflows/build-salt-onedir-macos.yml +++ /dev/null @@ -1,93 +0,0 @@ ---- -name: Build Salt Onedir - -on: - workflow_call: - inputs: - salt-version: - type: string - required: true - description: The Salt version to set prior to building packages. - github-hosted-runners: - type: boolean - required: true - self-hosted-runners: - type: boolean - required: true - cache-seed: - required: true - type: string - description: Seed used to invalidate caches - relenv-version: - required: true - type: string - description: The version of relenv to use - python-version: - required: true - type: string - description: The version of python to use with relenv - -env: - RELENV_DATA: "${{ github.workspace }}/.relenv" - COLUMNS: 190 - AWS_MAX_ATTEMPTS: "10" - AWS_RETRY_MODE: "adaptive" - PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ - PIP_EXTRA_INDEX_URL: https://pypi.org/simple - -jobs: - - build-salt-macos: - name: macOS - if: ${{ inputs.github-hosted-runners }} - strategy: - fail-fast: false - max-parallel: 2 - matrix: - arch: - - x86_64 - - aarch64 - runs-on: - - ${{ matrix.arch == 'aarch64' && 'macos-13-xlarge' || 'macos-12' }} - - steps: - - name: "Throttle Builds" - shell: bash - run: | - t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" - - - uses: actions/checkout@v4 - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Setup Relenv - id: setup-relenv - uses: ./.github/actions/setup-relenv - with: - platform: darwin - arch: ${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }} - version: ${{ inputs.relenv-version }} - cache-seed: ${{ inputs.cache-seed }} - python-version: ${{ inputs.python-version }} - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ inputs.cache-seed }}-build-salt-onedir-macos - - - name: Setup Salt Version - id: setup-salt-version - uses: ./.github/actions/setup-salt-version - with: - salt-version: "${{ inputs.salt-version }}" - - - name: Install Salt into Relenv Onedir - uses: ./.github/actions/build-onedir-salt - with: - platform: darwin - arch: ${{ matrix.arch }} - salt-version: "${{ inputs.salt-version }}" - python-version: "${{ inputs.python-version }}" - cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} diff --git a/.github/workflows/build-salt-onedir-windows.yml b/.github/workflows/build-salt-onedir-windows.yml deleted file mode 100644 index aba0b4245530..000000000000 --- a/.github/workflows/build-salt-onedir-windows.yml +++ /dev/null @@ -1,93 +0,0 @@ ---- -name: Build Salt Onedir - -on: - workflow_call: - inputs: - salt-version: - type: string - required: true - description: The Salt version to set prior to building packages. - github-hosted-runners: - type: boolean - required: true - self-hosted-runners: - type: boolean - required: true - cache-seed: - required: true - type: string - description: Seed used to invalidate caches - relenv-version: - required: true - type: string - description: The version of relenv to use - python-version: - required: true - type: string - description: The version of python to use with relenv - -env: - RELENV_DATA: "${{ github.workspace }}/.relenv" - COLUMNS: 190 - AWS_MAX_ATTEMPTS: "10" - AWS_RETRY_MODE: "adaptive" - PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ - PIP_EXTRA_INDEX_URL: https://pypi.org/simple - -jobs: - - build-salt-windows: - name: Windows - if: ${{ inputs.github-hosted-runners }} - strategy: - fail-fast: false - max-parallel: 2 - matrix: - arch: - - x86 - - amd64 - runs-on: windows-latest - steps: - - - name: "Throttle Builds" - shell: bash - run: | - t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" - - - uses: actions/checkout@v4 - - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: Setup Relenv - id: setup-relenv - uses: ./.github/actions/setup-relenv - with: - platform: windows - arch: ${{ matrix.arch }} - version: ${{ inputs.relenv-version }} - cache-seed: ${{ inputs.cache-seed }} - python-version: ${{ inputs.python-version }} - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ inputs.cache-seed }}-build-salt-onedir-macos - - - name: Setup Salt Version - id: setup-salt-version - uses: ./.github/actions/setup-salt-version - with: - salt-version: "${{ inputs.salt-version }}" - - - name: Install Salt into Relenv Onedir - uses: ./.github/actions/build-onedir-salt - with: - platform: windows - arch: ${{ matrix.arch }} - salt-version: "${{ inputs.salt-version }}" - python-version: "${{ inputs.python-version }}" - cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} diff --git a/.github/workflows/build-salt-onedir.yml b/.github/workflows/build-salt-onedir.yml new file mode 100644 index 000000000000..b95381ae3884 --- /dev/null +++ b/.github/workflows/build-salt-onedir.yml @@ -0,0 +1,200 @@ +--- +name: Build Salt Onedir + +on: + workflow_call: + inputs: + salt-version: + type: string + required: true + description: The Salt version to set prior to building packages. + github-hosted-runners: + type: boolean + required: true + self-hosted-runners: + type: boolean + required: true + cache-seed: + required: true + type: string + description: Seed used to invalidate caches + relenv-version: + required: true + type: string + description: The version of relenv to use + python-version: + required: true + type: string + description: The version of python to use with relenv + +env: + RELENV_DATA: "${{ github.workspace }}/.relenv" + COLUMNS: 190 + AWS_MAX_ATTEMPTS: "10" + AWS_RETRY_MODE: "adaptive" + PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ + PIP_EXTRA_INDEX_URL: https://pypi.org/simple + +jobs: + + build-salt-linux: + name: Linux + if: ${{ inputs.self-hosted-runners }} + strategy: + fail-fast: false + matrix: + arch: + - x86_64 + - aarch64 + runs-on: + - self-hosted + - linux + - ${{ matrix.arch }} + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" + + - uses: actions/checkout@v4 + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-seed }}-build-salt-onedir-windows + + - name: Setup Salt Version + id: setup-salt-version + uses: ./.github/actions/setup-salt-version + with: + salt-version: "${{ inputs.salt-version }}" + + - name: Setup Relenv + uses: ./.github/actions/setup-relenv + id: setup-relenv + with: + platform: linux + arch: ${{ matrix.arch }} + version: ${{ inputs.relenv-version }} + cache-seed: ${{ inputs.cache-seed }} + python-version: ${{ inputs.python-version }} + + - name: Install Salt into Relenv Onedir + uses: ./.github/actions/build-onedir-salt + with: + platform: linux + arch: ${{ matrix.arch }} + salt-version: "${{ inputs.salt-version }}" + python-version: "${{ inputs.python-version }}" + cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} + + build-salt-macos: + name: macOS + if: ${{ inputs.github-hosted-runners }} + strategy: + fail-fast: false + max-parallel: 2 + matrix: + arch: + - x86_64 + - aarch64 + runs-on: + - ${{ matrix.arch == 'aarch64' && 'macos-13-xlarge' || 'macos-12' }} + + steps: + - name: "Throttle Builds" + shell: bash + run: | + t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" + + - uses: actions/checkout@v4 + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Setup Relenv + id: setup-relenv + uses: ./.github/actions/setup-relenv + with: + platform: darwin + arch: ${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }} + version: ${{ inputs.relenv-version }} + cache-seed: ${{ inputs.cache-seed }} + python-version: ${{ inputs.python-version }} + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-seed }}-build-salt-onedir-macos + + - name: Setup Salt Version + id: setup-salt-version + uses: ./.github/actions/setup-salt-version + with: + salt-version: "${{ inputs.salt-version }}" + + - name: Install Salt into Relenv Onedir + uses: ./.github/actions/build-onedir-salt + with: + platform: darwin + arch: ${{ matrix.arch }} + salt-version: "${{ inputs.salt-version }}" + python-version: "${{ inputs.python-version }}" + cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} + + build-salt-windows: + name: Windows + if: ${{ inputs.github-hosted-runners }} + strategy: + fail-fast: false + max-parallel: 2 + matrix: + arch: + - x86 + - amd64 + runs-on: windows-latest + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" + + - uses: actions/checkout@v4 + + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Setup Relenv + id: setup-relenv + uses: ./.github/actions/setup-relenv + with: + platform: windows + arch: ${{ matrix.arch }} + version: ${{ inputs.relenv-version }} + cache-seed: ${{ inputs.cache-seed }} + python-version: ${{ inputs.python-version }} + + - name: Setup Python Tools Scripts + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-seed }}-build-salt-onedir-macos + + - name: Setup Salt Version + id: setup-salt-version + uses: ./.github/actions/setup-salt-version + with: + salt-version: "${{ inputs.salt-version }}" + + - name: Install Salt into Relenv Onedir + uses: ./.github/actions/build-onedir-salt + with: + platform: windows + arch: ${{ matrix.arch }} + salt-version: "${{ inputs.salt-version }}" + python-version: "${{ inputs.python-version }}" + cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} diff --git a/.github/workflows/build-windows-packages.yml b/.github/workflows/build-windows-packages.yml deleted file mode 100644 index 5e8e46635259..000000000000 --- a/.github/workflows/build-windows-packages.yml +++ /dev/null @@ -1,164 +0,0 @@ ---- -name: Build Windows Packages - -on: - workflow_call: - inputs: - salt-version: - type: string - required: true - description: The Salt version to set prior to building packages - relenv-version: - type: string - required: true - description: The relenv version to set prior to building packages. - python-version: - required: true - type: string - description: The version of python to use with relenv - sign-packages: - type: boolean - default: false - description: Sign Packages - environment: - type: string - description: The GitHub Environment where this workflow should run - default: ci - source: - required: true - type: string - description: The backend to build the packages with - cache-prefix: - required: true - type: string - description: Seed used to invalidate caches - -env: - COLUMNS: 190 - AWS_MAX_ATTEMPTS: "10" - AWS_RETRY_MODE: "adaptive" - PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ - PIP_EXTRA_INDEX_URL: https://pypi.org/simple - -jobs: - - build-pkgs: - name: Windows - environment: ${{ inputs.environment }} - strategy: - fail-fast: false - max-parallel: 2 - matrix: - arch: - - x86 - - amd64 - source: - - ${{ inputs.source }} - - runs-on: - - windows-latest - env: - SM_HOST: "${{ secrets.WIN_SIGN_HOST_PROD }}" - SM_API_KEY: "${{ secrets.WIN_SIGN_API_KEY }}" - SM_CLIENT_CERT_FILE: "D:\\Certificate_pkcs12.p12" - SM_CLIENT_CERT_PASSWORD: "${{ secrets.WIN_SIGN_CERT_PASSWORD }}" - SM_CLIENT_CERT_FILE_B64: "${{ secrets.WIN_SIGN_CERT_FILE_B64 }}" - WIN_SIGN_CERT_SHA1_HASH: "${{ secrets.WIN_SIGN_CERT_SHA1_HASH }}" - - steps: - - name: Check Package Signing Enabled - shell: bash - id: check-pkg-sign - run: | - if [ "${{ inputs.sign-packages }}" == "true" ]; then - if [ "${{ (secrets.WIN_SIGN_API_KEY != '' && env.SM_HOST != '' && inputs.environment == 'staging') && 'true' || 'false' }}" != "true" ]; then - MSG="Secrets for signing packages are not available. The packages created will NOT be signed." - echo "${MSG}" - echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" - echo "sign-pkgs=false" >> "$GITHUB_OUTPUT" - else - MSG="The packages created WILL be signed." - echo "${MSG}" - echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" - echo "sign-pkgs=true" >> "$GITHUB_OUTPUT" - fi - else - MSG="The sign-packages input is false. The packages created will NOT be signed." - echo "${MSG}" - echo "${MSG}" >> "${GITHUB_STEP_SUMMARY}" - echo "sign-pkgs=false" >> "$GITHUB_OUTPUT" - fi - - - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 - with: - python-version: 3.11 - - - name: Setup Python Tools Scripts - uses: ./.github/actions/setup-python-tools-scripts - with: - cache-prefix: ${{ inputs.cache-prefix }} - - - name: Setup Salt Version - id: setup-salt-version - uses: ./.github/actions/setup-salt-version - with: - salt-version: "${{ inputs.salt-version }}" - - - name: Download Onedir Tarball as an Artifact - uses: actions/download-artifact@v3 - with: - name: salt-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.zip - path: artifacts/ - - - name: Code signing with Software Trust Manager - if: ${{ steps.check-pkg-sign.outputs.sign-pkgs == 'true' }} - uses: digicert/ssm-code-signing@v0.0.2 - - - name: Setup Certificate - if: ${{ steps.check-pkg-sign.outputs.sign-pkgs == 'true' }} - shell: bash - run: | - echo "${{ secrets.WIN_SIGN_CERT_FILE_B64 }}" | base64 --decode > /d/Certificate_pkcs12.p12 - - - name: Build Windows Packages - run: | - tools pkg build windows --relenv-version=${{ inputs.relenv-version }} --python-version=${{ inputs.python-version }} ${{ - inputs.source == 'onedir' && - format( - '--onedir salt-{0}-onedir-windows-{1}.zip --salt-version {0} --arch {1} {2}', - inputs.salt-version, - matrix.arch, - steps.check-pkg-sign.outputs.sign-pkgs == 'true' && '--sign' || '' - ) - || - format('--salt-version {0} --arch {1}', inputs.salt-version, matrix.arch) - }} - - - name: Set Artifact Name - id: set-artifact-name - shell: bash - run: | - if [ "${{ inputs.source }}" != "src" ]; then - echo "artifact-name-nsis=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-NSIS" >> "$GITHUB_OUTPUT" - echo "artifact-name-msi=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-MSI" >> "$GITHUB_OUTPUT" - else - echo "artifact-name-nsis=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-NSIS-from-src" >> "$GITHUB_OUTPUT" - echo "artifact-name-msi=salt-${{ inputs.salt-version }}-${{ matrix.arch }}-MSI-from-src" >> "$GITHUB_OUTPUT" - fi - - - name: Upload ${{ matrix.arch }} NSIS Packages - uses: actions/upload-artifact@v3 - with: - name: ${{ steps.set-artifact-name.outputs.artifact-name-nsis }} - path: pkg/windows/build/Salt-*.exe - retention-days: 7 - if-no-files-found: error - - - name: Upload ${{ matrix.arch }} MSI Package - uses: actions/upload-artifact@v3 - with: - name: ${{ steps.set-artifact-name.outputs.artifact-name-msi }} - path: pkg/windows/build/Salt-*.msi - retention-days: 7 - if-no-files-found: error diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf6a7ad51179..823166cfe1f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -413,12 +413,12 @@ jobs: with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - build-deps-onedir-linux: + build-deps-onedir: name: Build Dependencies Onedir if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-linux.yml + uses: ./.github/workflows/build-deps-onedir.yml with: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -427,42 +427,14 @@ jobs: relenv-version: "0.14.2" python-version: "3.10.13" - build-deps-onedir-windows: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-windows.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-deps-onedir-macos: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-macos.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-salt-onedir-linux: + build-salt-onedir: name: Build Salt Onedir if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} needs: - prepare-workflow - - build-deps-onedir-linux + - build-deps-onedir - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-linux.yml + uses: ./.github/workflows/build-salt-onedir.yml with: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -471,45 +443,13 @@ jobs: relenv-version: "0.14.2" python-version: "3.10.13" - build-salt-onedir-windows: - name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} - needs: - - prepare-workflow - - build-deps-onedir-windows - - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-windows.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-salt-onedir-macos: - name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} - needs: - - prepare-workflow - - build-deps-onedir-macos - - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-macos.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-rpm-pkgs-onedir: + build-pkgs-onedir: name: Build Packages if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-rpm-packages.yml + - build-salt-onedir + uses: ./.github/workflows/build-packages.yml with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} @@ -517,184 +457,28 @@ jobs: python-version: "3.10.13" source: "onedir" - build-rpm-pkgs-src: + build-pkgs-src: name: Build Packages if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-rpm-packages.yml + - build-salt-onedir + uses: ./.github/workflows/build-packages.yml with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} relenv-version: "0.14.2" python-version: "3.10.13" source: "src" - - build-deb-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deb-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - - build-deb-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deb-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - - build-windows-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-windows-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - - build-windows-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-windows-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - - build-macos-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-macos-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - - build-macos-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-macos-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - - windows-amd64-ci-deps: - name: Windows amd64 CI Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action-windows.yml - with: - distro-slug: windows-2022 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-x86_64-ci-deps: - name: MacOS x86_64 CI Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-12 - nox-session: ci-test-onedir - platform: darwin - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-arm64-ci-deps: - name: MacOS arm64 CI Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-13-xlarge - nox-session: ci-test-onedir - platform: darwin - arch: arm64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - linux-x86_64-ci-deps: - name: Linux x86_64 CI Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action-linux.yml - with: - distro-slug: centos-7 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - linux-arm64-ci-deps: - name: Linux arm64 CI Deps + build-ci-deps: + name: CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action-linux.yml + - build-salt-onedir + uses: ./.github/workflows/build-deps-ci-action.yml with: - distro-slug: centos-7-arm64 nox-session: ci-test-onedir - platform: linux - arch: arm64 nox-version: 2022.8.7 python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -705,8 +489,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2 @@ -727,8 +511,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2-arm64 @@ -749,8 +533,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023 @@ -771,8 +555,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 @@ -793,8 +577,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centos-7 @@ -815,8 +599,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-8 @@ -837,8 +621,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9 @@ -859,8 +643,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9-arm64 @@ -881,8 +665,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-10 @@ -903,8 +687,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11 @@ -925,8 +709,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11-arm64 @@ -947,8 +731,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12 @@ -969,8 +753,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12-arm64 @@ -991,8 +775,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3 @@ -1013,8 +797,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3-arm64 @@ -1035,8 +819,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4 @@ -1058,8 +842,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4-arm64 @@ -1081,8 +865,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5 @@ -1104,8 +888,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5-arm64 @@ -1127,8 +911,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04 @@ -1149,8 +933,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 @@ -1171,8 +955,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04 @@ -1193,8 +977,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 @@ -1215,8 +999,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-12 @@ -1237,8 +1021,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13 @@ -1259,8 +1043,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13-xlarge @@ -1281,8 +1065,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 @@ -1303,8 +1087,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 @@ -1325,8 +1109,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 @@ -1347,8 +1131,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 @@ -1369,8 +1153,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 @@ -1391,8 +1175,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 @@ -1413,7 +1197,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-amd64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2016 @@ -1435,7 +1219,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-amd64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2019 @@ -1457,7 +1241,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-amd64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2022 @@ -1479,7 +1263,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-12 @@ -1501,7 +1285,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13 @@ -1523,7 +1307,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13-xlarge @@ -1545,7 +1329,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-8 @@ -1567,7 +1351,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-9 @@ -1589,7 +1373,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2 @@ -1611,7 +1395,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2-arm64 @@ -1633,7 +1417,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023 @@ -1655,7 +1439,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 @@ -1677,7 +1461,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: archlinux-lts @@ -1699,7 +1483,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centos-7 @@ -1721,7 +1505,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-8 @@ -1743,7 +1527,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-9 @@ -1765,7 +1549,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-10 @@ -1787,7 +1571,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11 @@ -1809,7 +1593,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11-arm64 @@ -1831,7 +1615,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12 @@ -1853,7 +1637,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12-arm64 @@ -1875,7 +1659,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-37 @@ -1897,7 +1681,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-38 @@ -1919,7 +1703,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: opensuse-15 @@ -1941,7 +1725,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3 @@ -1963,7 +1747,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3-arm64 @@ -1985,7 +1769,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4 @@ -2008,7 +1792,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4-arm64 @@ -2031,7 +1815,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5 @@ -2054,7 +1838,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5-arm64 @@ -2077,7 +1861,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04 @@ -2099,7 +1883,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 @@ -2121,7 +1905,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04 @@ -2143,7 +1927,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 @@ -2166,11 +1950,7 @@ jobs: runs-on: ubuntu-latest needs: - prepare-workflow - - windows-amd64-ci-deps - - macos-x86_64-ci-deps - - macos-arm64-ci-deps - - linux-x86_64-ci-deps - - linux-arm64-ci-deps + - build-ci-deps - windows-2016 - windows-2019 - windows-2022 @@ -2320,22 +2100,11 @@ jobs: - pre-commit - lint - build-docs - - build-deps-onedir-linux - - build-deps-onedir-windows - - build-deps-onedir-macos - - build-salt-onedir-linux - - build-salt-onedir-windows - - build-salt-onedir-macos - - build-rpm-pkgs-src - - build-deb-pkgs-src - - build-windows-pkgs-src - - build-macos-pkgs-src + - build-deps-onedir + - build-salt-onedir + - build-pkgs-src - combine-all-code-coverage - - windows-amd64-ci-deps - - macos-x86_64-ci-deps - - macos-arm64-ci-deps - - linux-x86_64-ci-deps - - linux-arm64-ci-deps + - build-ci-deps - windows-2016 - windows-2019 - windows-2022 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 77de8acad97b..41383fb40621 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -462,12 +462,12 @@ jobs: with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - build-deps-onedir-linux: + build-deps-onedir: name: Build Dependencies Onedir if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-linux.yml + uses: ./.github/workflows/build-deps-onedir.yml with: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -476,74 +476,14 @@ jobs: relenv-version: "0.14.2" python-version: "3.10.13" - build-deps-onedir-windows: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-windows.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-deps-onedir-macos: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-macos.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-salt-onedir-linux: - name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} - needs: - - prepare-workflow - - build-deps-onedir-linux - - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-linux.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-salt-onedir-windows: - name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} - needs: - - prepare-workflow - - build-deps-onedir-windows - - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-windows.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-salt-onedir-macos: + build-salt-onedir: name: Build Salt Onedir if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} needs: - prepare-workflow - - build-deps-onedir-macos + - build-deps-onedir - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-macos.yml + uses: ./.github/workflows/build-salt-onedir.yml with: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -552,120 +492,31 @@ jobs: relenv-version: "0.14.2" python-version: "3.10.13" - build-rpm-pkgs-onedir: + build-pkgs-onedir: name: Build Packages if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-rpm-packages.yml + - build-salt-onedir + uses: ./.github/workflows/build-packages.yml with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} relenv-version: "0.14.2" python-version: "3.10.13" source: "onedir" - - build-rpm-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-rpm-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - - build-deb-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deb-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - - build-deb-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deb-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - - build-windows-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-windows-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - environment: nightly - sign-packages: false - secrets: inherit - - build-windows-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-windows-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" environment: nightly - sign-packages: false + sign-macos-packages: true + sign-windows-packages: false secrets: inherit - build-macos-pkgs-onedir: + build-pkgs-src: name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-macos-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - environment: nightly - sign-packages: true - secrets: inherit - - build-macos-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-macos-packages.yml + - build-salt-onedir + uses: ./.github/workflows/build-packages.yml with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} @@ -673,89 +524,18 @@ jobs: python-version: "3.10.13" source: "src" environment: nightly - sign-packages: true + sign-macos-packages: true + sign-windows-packages: false secrets: inherit - - windows-amd64-ci-deps: - name: Windows amd64 CI Deps + build-ci-deps: + name: CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action-windows.yml + - build-salt-onedir + uses: ./.github/workflows/build-deps-ci-action.yml with: - distro-slug: windows-2022 nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-x86_64-ci-deps: - name: MacOS x86_64 CI Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-12 - nox-session: ci-test-onedir - platform: darwin - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-arm64-ci-deps: - name: MacOS arm64 CI Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-13-xlarge - nox-session: ci-test-onedir - platform: darwin - arch: arm64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - linux-x86_64-ci-deps: - name: Linux x86_64 CI Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action-linux.yml - with: - distro-slug: centos-7 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - linux-arm64-ci-deps: - name: Linux arm64 CI Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action-linux.yml - with: - distro-slug: centos-7-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 nox-version: 2022.8.7 python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -766,8 +546,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2 @@ -788,8 +568,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2-arm64 @@ -810,8 +590,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023 @@ -832,8 +612,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 @@ -854,8 +634,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centos-7 @@ -876,8 +656,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-8 @@ -898,8 +678,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9 @@ -920,8 +700,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9-arm64 @@ -942,8 +722,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-10 @@ -964,8 +744,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11 @@ -986,8 +766,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11-arm64 @@ -1008,8 +788,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12 @@ -1030,8 +810,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12-arm64 @@ -1052,8 +832,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3 @@ -1074,8 +854,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3-arm64 @@ -1096,8 +876,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4 @@ -1119,8 +899,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4-arm64 @@ -1142,8 +922,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5 @@ -1165,8 +945,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5-arm64 @@ -1188,8 +968,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04 @@ -1210,8 +990,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 @@ -1232,8 +1012,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04 @@ -1254,8 +1034,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 @@ -1276,8 +1056,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-12 @@ -1298,8 +1078,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13 @@ -1320,8 +1100,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13-xlarge @@ -1342,8 +1122,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 @@ -1364,8 +1144,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 @@ -1386,8 +1166,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 @@ -1408,8 +1188,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 @@ -1430,8 +1210,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 @@ -1452,8 +1232,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 @@ -1474,7 +1254,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-amd64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2016 @@ -1496,7 +1276,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-amd64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2019 @@ -1518,7 +1298,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-amd64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2022 @@ -1540,7 +1320,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-12 @@ -1562,7 +1342,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13 @@ -1584,7 +1364,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13-xlarge @@ -1606,7 +1386,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-8 @@ -1628,7 +1408,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-9 @@ -1650,7 +1430,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2 @@ -1672,7 +1452,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2-arm64 @@ -1694,7 +1474,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023 @@ -1716,7 +1496,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 @@ -1738,7 +1518,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: archlinux-lts @@ -1760,7 +1540,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centos-7 @@ -1782,7 +1562,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-8 @@ -1804,7 +1584,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-9 @@ -1826,7 +1606,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-10 @@ -1848,7 +1628,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11 @@ -1870,7 +1650,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11-arm64 @@ -1892,7 +1672,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12 @@ -1914,7 +1694,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12-arm64 @@ -1936,7 +1716,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-37 @@ -1958,7 +1738,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-38 @@ -1980,7 +1760,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: opensuse-15 @@ -2002,7 +1782,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3 @@ -2024,7 +1804,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3-arm64 @@ -2046,7 +1826,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4 @@ -2069,7 +1849,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4-arm64 @@ -2092,7 +1872,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5 @@ -2115,7 +1895,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5-arm64 @@ -2138,7 +1918,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04 @@ -2160,7 +1940,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 @@ -2182,7 +1962,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04 @@ -2204,7 +1984,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 @@ -2227,11 +2007,7 @@ jobs: runs-on: ubuntu-latest needs: - prepare-workflow - - windows-amd64-ci-deps - - macos-x86_64-ci-deps - - macos-arm64-ci-deps - - linux-x86_64-ci-deps - - linux-arm64-ci-deps + - build-ci-deps - windows-2016 - windows-2019 - windows-2022 @@ -2479,7 +2255,7 @@ jobs: - repo-nightly needs: - prepare-workflow - - build-deb-pkgs-onedir + - build-pkgs-onedir strategy: fail-fast: false matrix: @@ -2608,7 +2384,7 @@ jobs: - repo-nightly needs: - prepare-workflow - - build-rpm-pkgs-onedir + - build-pkgs-onedir strategy: fail-fast: false matrix: @@ -2832,7 +2608,7 @@ jobs: - repo-nightly needs: - prepare-workflow - - build-windows-pkgs-onedir + - build-pkgs-onedir strategy: fail-fast: false matrix: @@ -2934,7 +2710,7 @@ jobs: - repo-nightly needs: - prepare-workflow - - build-macos-pkgs-onedir + - build-pkgs-onedir strategy: fail-fast: false matrix: @@ -3024,9 +2800,7 @@ jobs: - repo-nightly needs: - prepare-workflow - - build-salt-onedir-linux - - build-salt-onedir-macos - - build-salt-onedir-windows + - build-salt-onedir strategy: fail-fast: false matrix: @@ -3159,11 +2933,7 @@ jobs: - build-windows-repo - build-macos-repo - build-onedir-repo - - windows-amd64-ci-deps - - macos-x86_64-ci-deps - - macos-arm64-ci-deps - - linux-x86_64-ci-deps - - linux-arm64-ci-deps + - build-ci-deps - windows-2016 - windows-2019 - windows-2022 @@ -3249,16 +3019,9 @@ jobs: - pre-commit - lint - build-docs - - build-deps-onedir-linux - - build-deps-onedir-windows - - build-deps-onedir-macos - - build-salt-onedir-linux - - build-salt-onedir-windows - - build-salt-onedir-macos - - build-rpm-pkgs-src - - build-deb-pkgs-src - - build-windows-pkgs-src - - build-macos-pkgs-src + - build-deps-onedir + - build-salt-onedir + - build-pkgs-src - combine-all-code-coverage - publish-repositories - amazonlinux-2-pkg-tests diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bc0a5732ebcf..4d6c8ef4d702 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -166,82 +166,14 @@ jobs: path: artifacts/salt-${{ inputs.salt-version }}-onedir-${{ matrix.platform }}-${{ matrix.arch }}.tar.xz* retention-days: 7 if-no-files-found: error - - windows-amd64-ci-deps: - name: Windows amd64 CI Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action-windows.yml - with: - distro-slug: windows-2022 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-x86_64-ci-deps: - name: MacOS x86_64 CI Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-12 - nox-session: ci-test-onedir - platform: darwin - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-arm64-ci-deps: - name: MacOS arm64 CI Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-13-xlarge - nox-session: ci-test-onedir - platform: darwin - arch: arm64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - linux-x86_64-ci-deps: - name: Linux x86_64 CI Deps - needs: - - prepare-workflow - - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action-linux.yml - with: - distro-slug: centos-7 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - linux-arm64-ci-deps: - name: Linux arm64 CI Deps + build-ci-deps: + name: CI Deps needs: - prepare-workflow - download-onedir-artifact - uses: ./.github/workflows/build-deps-ci-action-linux.yml + uses: ./.github/workflows/build-deps-ci-action.yml with: - distro-slug: centos-7-arm64 nox-session: ci-test-onedir - platform: linux - arch: arm64 nox-version: 2022.8.7 python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -318,11 +250,7 @@ jobs: needs: - prepare-workflow - publish-repositories - - linux-arm64-ci-deps - - linux-x86_64-ci-deps - - macos-arm64-ci-deps - - macos-x86_64-ci-deps - - windows-amd64-ci-deps + - build-ci-deps - download-onedir-artifact uses: ./.github/workflows/test-package-downloads-action.yml with: @@ -514,11 +442,7 @@ jobs: - pkg-download-tests - release - publish-pypi - - windows-amd64-ci-deps - - macos-x86_64-ci-deps - - macos-arm64-ci-deps - - linux-x86_64-ci-deps - - linux-arm64-ci-deps + - build-ci-deps steps: - name: Get workflow information id: get-workflow-info diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 59bd58d986e4..b9da44c7f0e4 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -447,12 +447,12 @@ jobs: with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - build-deps-onedir-linux: + build-deps-onedir: name: Build Dependencies Onedir if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-linux.yml + uses: ./.github/workflows/build-deps-onedir.yml with: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -461,42 +461,14 @@ jobs: relenv-version: "0.14.2" python-version: "3.10.13" - build-deps-onedir-windows: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-windows.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-deps-onedir-macos: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-macos.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-salt-onedir-linux: + build-salt-onedir: name: Build Salt Onedir if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} needs: - prepare-workflow - - build-deps-onedir-linux + - build-deps-onedir - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-linux.yml + uses: ./.github/workflows/build-salt-onedir.yml with: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -505,45 +477,13 @@ jobs: relenv-version: "0.14.2" python-version: "3.10.13" - build-salt-onedir-windows: - name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} - needs: - - prepare-workflow - - build-deps-onedir-windows - - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-windows.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-salt-onedir-macos: - name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} - needs: - - prepare-workflow - - build-deps-onedir-macos - - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-macos.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-rpm-pkgs-onedir: + build-pkgs-onedir: name: Build Packages if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-rpm-packages.yml + - build-salt-onedir + uses: ./.github/workflows/build-packages.yml with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} @@ -551,184 +491,28 @@ jobs: python-version: "3.10.13" source: "onedir" - build-rpm-pkgs-src: + build-pkgs-src: name: Build Packages if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-rpm-packages.yml + - build-salt-onedir + uses: ./.github/workflows/build-packages.yml with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} relenv-version: "0.14.2" python-version: "3.10.13" source: "src" - - build-deb-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deb-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - - build-deb-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deb-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - - build-windows-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-windows-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - - build-windows-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-windows-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - - build-macos-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-macos-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - - build-macos-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-macos-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - - windows-amd64-ci-deps: - name: Windows amd64 CI Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action-windows.yml - with: - distro-slug: windows-2022 - nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-x86_64-ci-deps: - name: MacOS x86_64 CI Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-12 - nox-session: ci-test-onedir - platform: darwin - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-arm64-ci-deps: - name: MacOS arm64 CI Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-13-xlarge - nox-session: ci-test-onedir - platform: darwin - arch: arm64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - linux-x86_64-ci-deps: - name: Linux x86_64 CI Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action-linux.yml - with: - distro-slug: centos-7 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - linux-arm64-ci-deps: - name: Linux arm64 CI Deps + build-ci-deps: + name: CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action-linux.yml + - build-salt-onedir + uses: ./.github/workflows/build-deps-ci-action.yml with: - distro-slug: centos-7-arm64 nox-session: ci-test-onedir - platform: linux - arch: arm64 nox-version: 2022.8.7 python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -739,8 +523,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2 @@ -761,8 +545,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2-arm64 @@ -783,8 +567,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023 @@ -805,8 +589,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 @@ -827,8 +611,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centos-7 @@ -849,8 +633,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-8 @@ -871,8 +655,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9 @@ -893,8 +677,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9-arm64 @@ -915,8 +699,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-10 @@ -937,8 +721,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11 @@ -959,8 +743,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11-arm64 @@ -981,8 +765,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12 @@ -1003,8 +787,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12-arm64 @@ -1025,8 +809,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3 @@ -1047,8 +831,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3-arm64 @@ -1069,8 +853,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4 @@ -1092,8 +876,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4-arm64 @@ -1115,8 +899,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5 @@ -1138,8 +922,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5-arm64 @@ -1161,8 +945,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04 @@ -1183,8 +967,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 @@ -1205,8 +989,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04 @@ -1227,8 +1011,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 @@ -1249,8 +1033,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-12 @@ -1271,8 +1055,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13 @@ -1293,8 +1077,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13-xlarge @@ -1315,8 +1099,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 @@ -1337,8 +1121,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 @@ -1359,8 +1143,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 @@ -1381,8 +1165,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 @@ -1403,8 +1187,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 @@ -1425,8 +1209,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 @@ -1447,7 +1231,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-amd64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2016 @@ -1469,7 +1253,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-amd64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2019 @@ -1491,7 +1275,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-amd64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2022 @@ -1513,7 +1297,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-12 @@ -1535,7 +1319,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13 @@ -1557,7 +1341,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13-xlarge @@ -1579,7 +1363,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-8 @@ -1601,7 +1385,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-9 @@ -1623,7 +1407,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2 @@ -1645,7 +1429,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2-arm64 @@ -1667,7 +1451,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023 @@ -1689,7 +1473,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 @@ -1711,7 +1495,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: archlinux-lts @@ -1733,7 +1517,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centos-7 @@ -1755,7 +1539,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-8 @@ -1777,7 +1561,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-9 @@ -1799,7 +1583,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-10 @@ -1821,7 +1605,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11 @@ -1843,7 +1627,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11-arm64 @@ -1865,7 +1649,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12 @@ -1887,7 +1671,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12-arm64 @@ -1909,7 +1693,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-37 @@ -1931,7 +1715,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-38 @@ -1953,7 +1737,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: opensuse-15 @@ -1975,7 +1759,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3 @@ -1997,7 +1781,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3-arm64 @@ -2019,7 +1803,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4 @@ -2042,7 +1826,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4-arm64 @@ -2065,7 +1849,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5 @@ -2088,7 +1872,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5-arm64 @@ -2111,7 +1895,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04 @@ -2133,7 +1917,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 @@ -2155,7 +1939,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04 @@ -2177,7 +1961,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 @@ -2200,11 +1984,7 @@ jobs: runs-on: ubuntu-latest needs: - prepare-workflow - - windows-amd64-ci-deps - - macos-x86_64-ci-deps - - macos-arm64-ci-deps - - linux-x86_64-ci-deps - - linux-arm64-ci-deps + - build-ci-deps - windows-2016 - windows-2019 - windows-2022 @@ -2356,22 +2136,11 @@ jobs: - pre-commit - lint - build-docs - - build-deps-onedir-linux - - build-deps-onedir-windows - - build-deps-onedir-macos - - build-salt-onedir-linux - - build-salt-onedir-windows - - build-salt-onedir-macos - - build-rpm-pkgs-src - - build-deb-pkgs-src - - build-windows-pkgs-src - - build-macos-pkgs-src + - build-deps-onedir + - build-salt-onedir + - build-pkgs-src - combine-all-code-coverage - - windows-amd64-ci-deps - - macos-x86_64-ci-deps - - macos-arm64-ci-deps - - linux-x86_64-ci-deps - - linux-arm64-ci-deps + - build-ci-deps - windows-2016 - windows-2019 - windows-2022 diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index b39ba8635ae0..cef642db2d8a 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -452,12 +452,12 @@ jobs: with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - build-deps-onedir-linux: + build-deps-onedir: name: Build Dependencies Onedir if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-linux.yml + uses: ./.github/workflows/build-deps-onedir.yml with: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -466,74 +466,14 @@ jobs: relenv-version: "0.14.2" python-version: "3.10.13" - build-deps-onedir-windows: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-windows.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-deps-onedir-macos: - name: Build Dependencies Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-onedir'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-macos.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-salt-onedir-linux: - name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} - needs: - - prepare-workflow - - build-deps-onedir-linux - - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-linux.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-salt-onedir-windows: - name: Build Salt Onedir - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} - needs: - - prepare-workflow - - build-deps-onedir-windows - - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-windows.yml - with: - cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - self-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - github-hosted-runners: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - relenv-version: "0.14.2" - python-version: "3.10.13" - - build-salt-onedir-macos: + build-salt-onedir: name: Build Salt Onedir if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-salt-onedir'] }} needs: - prepare-workflow - - build-deps-onedir-macos + - build-deps-onedir - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-macos.yml + uses: ./.github/workflows/build-salt-onedir.yml with: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -542,120 +482,31 @@ jobs: relenv-version: "0.14.2" python-version: "3.10.13" - build-rpm-pkgs-onedir: + build-pkgs-onedir: name: Build Packages if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-rpm-packages.yml + - build-salt-onedir + uses: ./.github/workflows/build-packages.yml with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} relenv-version: "0.14.2" python-version: "3.10.13" source: "onedir" - - build-rpm-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-rpm-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - - build-deb-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deb-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - - build-deb-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deb-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" - - build-windows-pkgs-onedir: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-windows-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - environment: staging - sign-packages: ${{ inputs.sign-windows-packages }} - secrets: inherit - - build-windows-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-windows-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "src" environment: staging - sign-packages: ${{ inputs.sign-windows-packages }} + sign-macos-packages: true + sign-windows-packages: ${{ inputs.sign-windows-packages }} secrets: inherit - build-macos-pkgs-onedir: + build-pkgs-src: name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-macos-packages.yml - with: - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} - relenv-version: "0.14.2" - python-version: "3.10.13" - source: "onedir" - environment: staging - sign-packages: true - secrets: inherit - - build-macos-pkgs-src: - name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-macos-packages.yml + - build-salt-onedir + uses: ./.github/workflows/build-packages.yml with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} @@ -663,89 +514,18 @@ jobs: python-version: "3.10.13" source: "src" environment: staging - sign-packages: true + sign-macos-packages: true + sign-windows-packages: ${{ inputs.sign-windows-packages }} secrets: inherit - - windows-amd64-ci-deps: - name: Windows amd64 CI Deps + build-ci-deps: + name: CI Deps if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-windows - uses: ./.github/workflows/build-deps-ci-action-windows.yml + - build-salt-onedir + uses: ./.github/workflows/build-deps-ci-action.yml with: - distro-slug: windows-2022 nox-session: ci-test-onedir - platform: windows - arch: amd64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-x86_64-ci-deps: - name: MacOS x86_64 CI Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-12 - nox-session: ci-test-onedir - platform: darwin - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - macos-arm64-ci-deps: - name: MacOS arm64 CI Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-macos - uses: ./.github/workflows/build-deps-ci-action-macos.yml - with: - distro-slug: macos-13-xlarge - nox-session: ci-test-onedir - platform: darwin - arch: arm64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - linux-x86_64-ci-deps: - name: Linux x86_64 CI Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action-linux.yml - with: - distro-slug: centos-7 - nox-session: ci-test-onedir - platform: linux - arch: x86_64 - nox-version: 2022.8.7 - python-version: "3.10" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 - - linux-arm64-ci-deps: - name: Linux arm64 CI Deps - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - needs: - - prepare-workflow - - build-salt-onedir-linux - uses: ./.github/workflows/build-deps-ci-action-linux.yml - with: - distro-slug: centos-7-arm64 - nox-session: ci-test-onedir - platform: linux - arch: arm64 nox-version: 2022.8.7 python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -756,8 +536,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2 @@ -778,8 +558,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2-arm64 @@ -800,8 +580,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023 @@ -822,8 +602,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 @@ -844,8 +624,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centos-7 @@ -866,8 +646,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-8 @@ -888,8 +668,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9 @@ -910,8 +690,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: centosstream-9-arm64 @@ -932,8 +712,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-10 @@ -954,8 +734,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11 @@ -976,8 +756,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-11-arm64 @@ -998,8 +778,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12 @@ -1020,8 +800,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: debian-12-arm64 @@ -1042,8 +822,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3 @@ -1064,8 +844,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-3-arm64 @@ -1086,8 +866,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4 @@ -1109,8 +889,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-4-arm64 @@ -1132,8 +912,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5 @@ -1155,8 +935,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-rpm-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: photonos-5-arm64 @@ -1178,8 +958,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04 @@ -1200,8 +980,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 @@ -1222,8 +1002,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04 @@ -1244,8 +1024,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-deb-pkgs-onedir - - linux-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 @@ -1266,8 +1046,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-12 @@ -1288,8 +1068,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-x86_64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13 @@ -1310,8 +1090,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-arm64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: macos-13-xlarge @@ -1332,8 +1112,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 @@ -1354,8 +1134,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2016 @@ -1376,8 +1156,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 @@ -1398,8 +1178,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2019 @@ -1420,8 +1200,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 @@ -1442,8 +1222,8 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-amd64-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: windows-2022 @@ -1464,7 +1244,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-amd64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2016 @@ -1486,7 +1266,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-amd64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2019 @@ -1508,7 +1288,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-amd64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-windows.yml with: distro-slug: windows-2022 @@ -1530,7 +1310,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-12 @@ -1552,7 +1332,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13 @@ -1574,7 +1354,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: macos-13-xlarge @@ -1596,7 +1376,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-8 @@ -1618,7 +1398,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: almalinux-9 @@ -1640,7 +1420,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2 @@ -1662,7 +1442,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2-arm64 @@ -1684,7 +1464,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023 @@ -1706,7 +1486,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: amazonlinux-2023-arm64 @@ -1728,7 +1508,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: archlinux-lts @@ -1750,7 +1530,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centos-7 @@ -1772,7 +1552,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-8 @@ -1794,7 +1574,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: centosstream-9 @@ -1816,7 +1596,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-10 @@ -1838,7 +1618,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11 @@ -1860,7 +1640,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-11-arm64 @@ -1882,7 +1662,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12 @@ -1904,7 +1684,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: debian-12-arm64 @@ -1926,7 +1706,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-37 @@ -1948,7 +1728,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: fedora-38 @@ -1970,7 +1750,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: opensuse-15 @@ -1992,7 +1772,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3 @@ -2014,7 +1794,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-3-arm64 @@ -2036,7 +1816,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4 @@ -2059,7 +1839,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-4-arm64 @@ -2082,7 +1862,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5 @@ -2105,7 +1885,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: photonos-5-arm64 @@ -2128,7 +1908,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04 @@ -2150,7 +1930,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-20.04-arm64 @@ -2172,7 +1952,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-x86_64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04 @@ -2194,7 +1974,7 @@ jobs: if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-arm64-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: ubuntu-22.04-arm64 @@ -2320,7 +2100,7 @@ jobs: - repo-staging needs: - prepare-workflow - - build-deb-pkgs-onedir + - build-pkgs-onedir strategy: fail-fast: false matrix: @@ -2449,7 +2229,7 @@ jobs: - repo-staging needs: - prepare-workflow - - build-rpm-pkgs-onedir + - build-pkgs-onedir strategy: fail-fast: false matrix: @@ -2675,7 +2455,7 @@ jobs: - repo-staging needs: - prepare-workflow - - build-windows-pkgs-onedir + - build-pkgs-onedir strategy: fail-fast: false matrix: @@ -2777,7 +2557,7 @@ jobs: - repo-staging needs: - prepare-workflow - - build-macos-pkgs-onedir + - build-pkgs-onedir strategy: fail-fast: false matrix: @@ -2867,9 +2647,7 @@ jobs: - repo-staging needs: - prepare-workflow - - build-salt-onedir-linux - - build-salt-onedir-macos - - build-salt-onedir-windows + - build-salt-onedir strategy: fail-fast: false matrix: @@ -3112,14 +2890,8 @@ jobs: needs: - prepare-workflow - publish-repositories - - linux-arm64-ci-deps - - linux-x86_64-ci-deps - - macos-arm64-ci-deps - - macos-x86_64-ci-deps - - windows-amd64-ci-deps - - build-salt-onedir-linux - - build-salt-onedir-macos - - build-salt-onedir-windows + - build-ci-deps + - build-salt-onedir uses: ./.github/workflows/test-package-downloads-action.yml with: nox-session: ci-test-onedir @@ -3138,11 +2910,7 @@ jobs: needs: - prepare-workflow - upload-release-artifacts - - windows-amd64-ci-deps - - macos-x86_64-ci-deps - - macos-arm64-ci-deps - - linux-x86_64-ci-deps - - linux-arm64-ci-deps + - build-ci-deps - windows-2016 - windows-2019 - windows-2022 @@ -3271,16 +3039,9 @@ jobs: - pre-commit - lint - build-docs - - build-deps-onedir-linux - - build-deps-onedir-windows - - build-deps-onedir-macos - - build-salt-onedir-linux - - build-salt-onedir-windows - - build-salt-onedir-macos - - build-rpm-pkgs-src - - build-deb-pkgs-src - - build-windows-pkgs-src - - build-macos-pkgs-src + - build-deps-onedir + - build-salt-onedir + - build-pkgs-src - publish-repositories - upload-release-artifacts - pkg-download-tests diff --git a/.github/workflows/templates/build-ci-deps.yml.jinja b/.github/workflows/templates/build-ci-deps.yml.jinja index fa5a0bc971f5..bd933864dfa4 100644 --- a/.github/workflows/templates/build-ci-deps.yml.jinja +++ b/.github/workflows/templates/build-ci-deps.yml.jinja @@ -1,86 +1,21 @@ - <%- for arch, build_distro_slug in build_ci_deps_listing["windows"] %> - - windows-<{ arch }>-ci-deps: - <%- do test_salt_needs.append("windows-" + arch + "-ci-deps") %> - name: Windows <{ arch }> CI Deps + build-ci-deps: + <%- do test_salt_needs.append("build-ci-deps") %> + name: CI Deps <%- if workflow_slug != 'release' %> if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} <%- endif %> needs: - prepare-workflow <%- if workflow_slug != 'release' %> - - build-salt-onedir-windows - <%- else %> - - download-onedir-artifact - <%- endif %> - uses: ./.github/workflows/build-deps-ci-action-windows.yml - with: - distro-slug: <{ build_distro_slug }> - nox-session: ci-test-onedir - platform: windows - arch: <{ arch }> - nox-version: <{ nox_version }> - python-version: "<{ gh_actions_workflows_python_version }>" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }> - - <%- endfor %> - - - <%- for arch, build_distro_slug in build_ci_deps_listing["macos"] %> - - macos-<{ arch }>-ci-deps: - <%- do test_salt_needs.append("macos-" + arch + "-ci-deps") %> - name: MacOS <{ arch }> CI Deps - <%- if workflow_slug != 'release' %> - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} - <%- endif %> - needs: - - prepare-workflow - <%- if workflow_slug != 'release' %> - - build-salt-onedir-macos + - build-salt-onedir <%- else %> - download-onedir-artifact <%- endif %> - uses: ./.github/workflows/build-deps-ci-action-macos.yml + uses: ./.github/workflows/build-deps-ci-action.yml with: - distro-slug: <{ build_distro_slug }> nox-session: ci-test-onedir - platform: darwin - arch: <{ arch }> nox-version: <{ nox_version }> python-version: "<{ gh_actions_workflows_python_version }>" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }> - - <%- endfor %> - - - <%- for arch, build_distro_slug in build_ci_deps_listing["linux"] %> - - linux-<{ arch }>-ci-deps: - <%- do test_salt_needs.append("linux-" + arch + "-ci-deps") %> - name: Linux <{ arch }> CI Deps - <%- if workflow_slug != 'release' %> - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-deps-ci'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} - <%- endif %> - needs: - - prepare-workflow - <%- if workflow_slug != 'release' %> - - build-salt-onedir-linux - <%- else %> - - download-onedir-artifact - <%- endif %> - uses: ./.github/workflows/build-deps-ci-action-linux.yml - with: - distro-slug: <{ build_distro_slug }> - nox-session: ci-test-onedir - platform: linux - arch: <{ arch }> - nox-version: <{ nox_version }> - python-version: "<{ gh_actions_workflows_python_version }>" - salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" - cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }> - - <%- endfor %> diff --git a/.github/workflows/templates/build-deps-ci-action.yml.jinja b/.github/workflows/templates/build-deps-ci-action.yml.jinja new file mode 100644 index 000000000000..7be48b3dd9b6 --- /dev/null +++ b/.github/workflows/templates/build-deps-ci-action.yml.jinja @@ -0,0 +1,360 @@ +--- +name: Install Test Dependencies + +on: + workflow_call: + inputs: + nox-session: + required: true + type: string + description: The nox session to run + salt-version: + type: string + required: true + description: The Salt version to set prior to running tests. + cache-prefix: + required: true + type: string + description: Seed used to invalidate caches + nox-version: + required: true + type: string + description: The nox version to install + python-version: + required: false + type: string + description: The python version to run tests with + default: "3.10" + package-name: + required: false + type: string + description: The onedir package name to use + default: salt + + +env: + COLUMNS: 190 + AWS_MAX_ATTEMPTS: "10" + AWS_RETRY_MODE: "adaptive" + PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/ + PIP_EXTRA_INDEX_URL: https://pypi.org/simple + +jobs: + + linux-dependencies: + name: Linux + runs-on: + - self-hosted + - linux + - bastion + timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + include: + <%- for arch, build_distro_slug in build_ci_deps_listing["linux"] %> + - distro-slug: <{ build_distro_slug }> + arch: <{ arch }> + <%- endfor %> + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Cache nox.linux.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} + id: nox-dependencies-cache + uses: actions/cache@v3.3.1 + with: + path: nox.linux.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ + hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') + }} + + - name: Download Onedir Tarball as an Artifact + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz + path: artifacts/ + + - name: Decompress Onedir Tarball + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + shell: bash + run: | + python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" + cd artifacts + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz + + - name: PyPi Proxy + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + sed -i '7s;^;--index-url=https://pypi-proxy.saltstack.net/root/local/+simple/ --extra-index-url=https://pypi.org/simple\n;' requirements/static/ci/*/*.txt + + - name: Setup Python Tools Scripts + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }}-build-deps-ci + + - name: Get Salt Project GitHub Actions Bot Environment + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30") + SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/tags/instance/spb:environment) + echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV" + + - name: Start VM + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + id: spin-up-vm + run: | + tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ matrix.distro-slug }} + + - name: List Free Space + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm ssh ${{ matrix.distro-slug }} -- df -h || true + + - name: Upload Checkout To VM + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm rsync ${{ matrix.distro-slug }} + + - name: Install Dependencies + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm install-dependencies --nox-session=${{ inputs.nox-session }} ${{ matrix.distro-slug }} + + - name: Cleanup .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm pre-archive-cleanup ${{ matrix.distro-slug }} + + - name: Compress .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm compress-dependencies ${{ matrix.distro-slug }} + + - name: Download Compressed .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm download-dependencies ${{ matrix.distro-slug }} + + - name: Destroy VM + if: always() && steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm destroy --no-wait ${{ matrix.distro-slug }} + + - name: Upload Nox Requirements Tarball + uses: actions/upload-artifact@v3 + with: + name: nox-linux-${{ matrix.arch }}-${{ inputs.nox-session }} + path: nox.linux.${{ matrix.arch }}.tar.* + + macos-dependencies: + name: MacOS + runs-on: ${{ matrix.distro-slug }} + timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + include: + <%- for arch, build_distro_slug in build_ci_deps_listing["macos"] %> + - distro-slug: <{ build_distro_slug }> + arch: <{ arch }> + <%- endfor %> + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Cache nox.macos.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} + id: nox-dependencies-cache + uses: actions/cache@v3.3.1 + with: + path: nox.macos.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ + hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') + }} + + - name: Download Onedir Tarball as an Artifact + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch }}.tar.xz + path: artifacts/ + + - name: Decompress Onedir Tarball + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + shell: bash + run: | + python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" + cd artifacts + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch }}.tar.xz + + - name: Set up Python ${{ inputs.python-version }} + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: actions/setup-python@v4 + with: + python-version: "${{ inputs.python-version }}" + + - name: Install System Dependencies + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + brew install openssl@3 + + - name: Install Nox + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + python3 -m pip install 'nox==${{ inputs.nox-version }}' + + - name: Install Dependencies + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + env: + PRINT_TEST_SELECTION: "0" + PRINT_SYSTEM_INFO: "0" + run: | + export PYCURL_SSL_LIBRARY=openssl + export LDFLAGS="-L/usr/local/opt/openssl@3/lib" + export CPPFLAGS="-I/usr/local/opt/openssl@3/include" + export PKG_CONFIG_PATH="/usr/local/opt/openssl@3/lib/pkgconfig" + nox --install-only -e ${{ inputs.nox-session }} + + - name: Cleanup .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + nox --force-color -e "pre-archive-cleanup(pkg=False)" + + - name: Compress .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + nox --force-color -e compress-dependencies -- macos ${{ matrix.arch }} + + - name: Upload Nox Requirements Tarball + uses: actions/upload-artifact@v3 + with: + name: nox-macos-${{ matrix.arch }}-${{ inputs.nox-session }} + path: nox.macos.${{ matrix.arch }}.tar.* + + windows-dependencies: + name: Windows + runs-on: + - self-hosted + - linux + - bastion + timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + include: + <%- for arch, build_distro_slug in build_ci_deps_listing["windows"] %> + - distro-slug: <{ build_distro_slug }> + arch: <{ arch }> + <%- endfor %> + steps: + + - name: "Throttle Builds" + shell: bash + run: | + t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" + + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Cache nox.windows.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} + id: nox-dependencies-cache + uses: actions/cache@v3.3.1 + with: + path: nox.windows.${{ matrix.arch }}.tar.* + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ + hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') + }} + + - name: Download Onedir Tarball as an Artifact + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.tar.xz + path: artifacts/ + + - name: Decompress Onedir Tarball + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + shell: bash + run: | + python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" + cd artifacts + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.tar.xz + + - name: PyPi Proxy + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + sed -i '7s;^;--index-url=https://pypi-proxy.saltstack.net/root/local/+simple/ --extra-index-url=https://pypi.org/simple\n;' requirements/static/ci/*/*.txt + + - name: Setup Python Tools Scripts + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: ./.github/actions/setup-python-tools-scripts + with: + cache-prefix: ${{ inputs.cache-prefix }}-build-deps-ci + + - name: Get Salt Project GitHub Actions Bot Environment + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30") + SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/tags/instance/spb:environment) + echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV" + + - name: Start VM + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + id: spin-up-vm + run: | + tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ matrix.distro-slug }} + + - name: List Free Space + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm ssh ${{ matrix.distro-slug }} -- df -h || true + + - name: Upload Checkout To VM + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm rsync ${{ matrix.distro-slug }} + + - name: Install Dependencies + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm install-dependencies --nox-session=${{ inputs.nox-session }} ${{ matrix.distro-slug }} + + - name: Cleanup .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm pre-archive-cleanup ${{ matrix.distro-slug }} + + - name: Compress .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm compress-dependencies ${{ matrix.distro-slug }} + + - name: Download Compressed .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm download-dependencies ${{ matrix.distro-slug }} + + - name: Destroy VM + if: always() && steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm destroy --no-wait ${{ matrix.distro-slug }} + + - name: Upload Nox Requirements Tarball + uses: actions/upload-artifact@v3 + with: + name: nox-windows-${{ matrix.arch }}-${{ inputs.nox-session }} + path: nox.windows.${{ matrix.arch }}.tar.* diff --git a/.github/workflows/templates/build-packages.yml.jinja b/.github/workflows/templates/build-packages.yml.jinja index b5086a75e583..91adfb1c6e66 100644 --- a/.github/workflows/templates/build-packages.yml.jinja +++ b/.github/workflows/templates/build-packages.yml.jinja @@ -1,38 +1,27 @@ -<%- for platform, pkg_type, display_name, runner_type in ( - ("linux", "rpm", "RPM", "self-hosted"), - ("linux", "deb", "DEB", "self-hosted"), - ("windows", "windows", "Windows", "github-hosted"), - ("macos", "macos", "macOS", "github-hosted"), - ) %> - <%- for backend in ("onedir", "src") %> - <%- set job_name = "build-{}-pkgs-{}".format(pkg_type, backend) %> + <%- set job_name = "build-pkgs-{}".format(backend) %> <%- if backend == "src" %> <%- do conclusion_needs.append(job_name) %> <%- endif %> <{ job_name }>: name: Build Packages - if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['<{ runner_type }>'] }} + if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['build-pkgs'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-salt-onedir-<{ platform }> - uses: ./.github/workflows/build-<{ pkg_type }>-packages.yml + - build-salt-onedir + uses: ./.github/workflows/build-packages.yml with: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }} relenv-version: "<{ relenv_version }>" python-version: "<{ python_version }>" source: "<{ backend }>" - <%- if pkg_type in ("macos", "windows") and gh_environment %> + <%- if gh_environment %> environment: <{ gh_environment }> - <%- if pkg_type == "macos" %> - sign-packages: true - <%- else %> - sign-packages: <% if gh_environment == 'nightly' -%> false <%- else -%> ${{ inputs.sign-windows-packages }} <%- endif %> - <%- endif %> + sign-macos-packages: true + sign-windows-packages: <% if gh_environment == 'nightly' -%> false <%- else -%> ${{ inputs.sign-windows-packages }} <%- endif %> secrets: inherit <%- endif %> <%- endfor %> -<%- endfor %> diff --git a/.github/workflows/templates/build-repos.yml.jinja b/.github/workflows/templates/build-repos.yml.jinja index 58c413cf5473..6b8177498df1 100644 --- a/.github/workflows/templates/build-repos.yml.jinja +++ b/.github/workflows/templates/build-repos.yml.jinja @@ -20,11 +20,9 @@ needs: - prepare-workflow <%- if type not in ("src", "onedir") %> - - build-<{ type }>-pkgs-onedir + - build-pkgs-onedir <%- elif type == 'onedir' %> - - build-salt-onedir-linux - - build-salt-onedir-macos - - build-salt-onedir-windows + - build-salt-onedir <%- elif type == 'src' %> - build-source-tarball <%- endif %> diff --git a/.github/workflows/templates/ci.yml.jinja b/.github/workflows/templates/ci.yml.jinja index 9538746fd112..8e71b9764766 100644 --- a/.github/workflows/templates/ci.yml.jinja +++ b/.github/workflows/templates/ci.yml.jinja @@ -235,16 +235,14 @@ <%- set job_name = "build-deps-onedir" %> <%- if includes.get(job_name, True) %> - <%- for platform in ("linux", "windows", "macos") %> - <%- set platform_job_name = "{}-{}".format(job_name, platform) %> - <{ platform_job_name }>: - <%- do conclusion_needs.append(platform_job_name) %> + <{ job_name }>: + <%- do conclusion_needs.append(job_name) %> name: Build Dependencies Onedir if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['<{ job_name }>'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - uses: ./.github/workflows/build-deps-onedir-<{ platform }>.yml + uses: ./.github/workflows/build-deps-onedir.yml with: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -253,24 +251,21 @@ relenv-version: "<{ relenv_version }>" python-version: "<{ python_version }>" - <%- endfor %> <%- endif %> <%- set job_name = "build-salt-onedir" %> <%- if includes.get(job_name, True) %> - <%- for platform in ("linux", "windows", "macos") %> - <%- set platform_job_name = "{}-{}".format(job_name, platform) %> - <{ platform_job_name }>: - <%- do conclusion_needs.append(platform_job_name) %> + <{ job_name }>: + <%- do conclusion_needs.append(job_name) %> name: Build Salt Onedir if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['<{ job_name }>'] }} needs: - prepare-workflow - - build-deps-onedir-<{ platform }> + - build-deps-onedir - build-source-tarball - uses: ./.github/workflows/build-salt-onedir-<{ platform }>.yml + uses: ./.github/workflows/build-salt-onedir.yml with: cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" @@ -279,7 +274,6 @@ relenv-version: "<{ relenv_version }>" python-version: "<{ python_version }>" - <%- endfor %> <%- endif %> diff --git a/.github/workflows/templates/test-salt-pkg-repo-downloads.yml.jinja b/.github/workflows/templates/test-salt-pkg-repo-downloads.yml.jinja index 005c5272ac31..d28614620db2 100644 --- a/.github/workflows/templates/test-salt-pkg-repo-downloads.yml.jinja +++ b/.github/workflows/templates/test-salt-pkg-repo-downloads.yml.jinja @@ -19,9 +19,7 @@ <%- if gh_environment == "release" %> - download-onedir-artifact <%- else %> - - build-salt-onedir-linux - - build-salt-onedir-macos - - build-salt-onedir-windows + - build-salt-onedir <%- endif %> uses: ./.github/workflows/test-package-downloads-action.yml with: diff --git a/.github/workflows/templates/test-salt-pkg.yml.jinja b/.github/workflows/templates/test-salt-pkg.yml.jinja index 935dbe1cd386..b41f1f37a5a2 100644 --- a/.github/workflows/templates/test-salt-pkg.yml.jinja +++ b/.github/workflows/templates/test-salt-pkg.yml.jinja @@ -7,8 +7,8 @@ if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-<{ pkg_type }>-pkgs-onedir - - linux-<{ arch }>-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-linux.yml with: distro-slug: <{ slug }> @@ -40,8 +40,8 @@ if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - build-macos-pkgs-onedir - - macos-<{ arch }>-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-macos.yml with: distro-slug: <{ slug }> @@ -70,8 +70,8 @@ if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - build-windows-pkgs-onedir - - windows-<{ arch }>-ci-deps + - build-pkgs-onedir + - build-ci-deps uses: ./.github/workflows/test-packages-action-windows.yml with: distro-slug: <{ slug }> diff --git a/.github/workflows/templates/test-salt.yml.jinja b/.github/workflows/templates/test-salt.yml.jinja index 5d9e0355f976..1be2d2995acb 100644 --- a/.github/workflows/templates/test-salt.yml.jinja +++ b/.github/workflows/templates/test-salt.yml.jinja @@ -12,7 +12,7 @@ if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - windows-<{ arch }>-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-windows.yml with: distro-slug: <{ slug }> @@ -40,7 +40,7 @@ if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }} needs: - prepare-workflow - - macos-<{ arch }>-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-macos.yml with: distro-slug: <{ slug }> @@ -67,7 +67,7 @@ if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }} needs: - prepare-workflow - - linux-<{ arch }>-ci-deps + - build-ci-deps uses: ./.github/workflows/test-action-linux.yml with: distro-slug: <{ slug }> diff --git a/tools/precommit/workflows.py b/tools/precommit/workflows.py index 45251ad1617e..88920f48c68a 100644 --- a/tools/precommit/workflows.py +++ b/tools/precommit/workflows.py @@ -87,6 +87,9 @@ def generate_workflows(ctx: Context): "Test Package Downloads": { "template": "test-package-downloads-action.yml", }, + "Build CI Deps": { + "template": "build-deps-ci-action.yml", + }, } test_salt_listing: dict[str, list[tuple[str, ...]]] = { "linux": [ @@ -232,7 +235,7 @@ def generate_workflows(ctx: Context): test_salt_pkg_downloads_needs_slugs = set() for platform in test_salt_pkg_downloads_listing: for _, arch, _ in test_salt_pkg_downloads_listing[platform]: - test_salt_pkg_downloads_needs_slugs.add(f"{platform}-{arch}-ci-deps") + test_salt_pkg_downloads_needs_slugs.add("build-ci-deps") env = Environment( block_start_string="<%", From cb6e589c98fa5d01dbf7af7c2eda177c62277d84 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 2 Jan 2024 11:02:09 +0000 Subject: [PATCH 48/60] Stop using `aarch64` Signed-off-by: Pedro Algarvio --- .github/workflows/build-deps-onedir.yml | 10 +++++----- .github/workflows/build-packages.yml | 10 +++++----- .github/workflows/build-salt-onedir.yml | 10 +++++----- .github/workflows/nightly.yml | 20 +++++++++---------- .github/workflows/release.yml | 4 ++-- .github/workflows/staging.yml | 20 +++++++++---------- .../templates/build-deb-repo.yml.jinja | 10 +++++----- .../templates/build-macos-repo.yml.jinja | 2 +- .../templates/build-onedir-repo.yml.jinja | 6 +++--- .../templates/build-rpm-repo.yml.jinja | 2 +- .github/workflows/templates/release.yml.jinja | 4 ++-- .../test-package-downloads-action.yml.jinja | 8 ++++---- .../test-package-downloads-action.yml | 8 ++++---- tools/pkg/build.py | 6 +++--- 14 files changed, 60 insertions(+), 60 deletions(-) diff --git a/.github/workflows/build-deps-onedir.yml b/.github/workflows/build-deps-onedir.yml index 438ab3c6ae92..7230ce9d7d07 100644 --- a/.github/workflows/build-deps-onedir.yml +++ b/.github/workflows/build-deps-onedir.yml @@ -45,7 +45,7 @@ jobs: matrix: arch: - x86_64 - - aarch64 + - arm64 runs-on: - self-hosted - linux @@ -69,7 +69,7 @@ jobs: uses: ./.github/actions/setup-relenv with: platform: linux - arch: ${{ matrix.arch }} + arch: ${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }} version: ${{ inputs.relenv-version }} cache-seed: ${{ inputs.cache-seed }} python-version: ${{ inputs.python-version }} @@ -91,9 +91,9 @@ jobs: matrix: arch: - x86_64 - - aarch64 + - arm64 runs-on: - - ${{ matrix.arch == 'aarch64' && 'macos-13-xlarge' || 'macos-12' }} + - ${{ matrix.arch == 'arm64' && 'macos-13-xlarge' || 'macos-12' }} steps: @@ -119,7 +119,7 @@ jobs: uses: ./.github/actions/setup-relenv with: platform: darwin - arch: ${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }} + arch: ${{ matrix.arch }} version: ${{ inputs.relenv-version }} cache-seed: ${{ inputs.cache-seed }} python-version: ${{ inputs.python-version }} diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index 7a7f13871e45..abe35e1c81f5 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -52,12 +52,12 @@ jobs: matrix: arch: - x86_64 - - aarch64 + - arm64 source: - ${{ inputs.source }} runs-on: - - ${{ matrix.arch == 'aarch64' && 'macos-13-xlarge' || 'macos-12' }} + - ${{ matrix.arch == 'arm64' && 'macos-13-xlarge' || 'macos-12' }} steps: - name: Check Package Signing Enabled @@ -172,7 +172,7 @@ jobs: matrix: arch: - x86_64 - - aarch64 + - arm64 source: - ${{ inputs.source }} @@ -270,7 +270,7 @@ jobs: matrix: arch: - x86_64 - - aarch64 + - arm64 source: - ${{ inputs.source }} @@ -335,7 +335,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: ${{ steps.set-artifact-name.outputs.artifact-name }} - path: ~/rpmbuild/RPMS/${{ matrix.arch }}/*.rpm + path: ~/rpmbuild/RPMS/*/*.rpm retention-days: 7 if-no-files-found: error diff --git a/.github/workflows/build-salt-onedir.yml b/.github/workflows/build-salt-onedir.yml index b95381ae3884..df2f562fa541 100644 --- a/.github/workflows/build-salt-onedir.yml +++ b/.github/workflows/build-salt-onedir.yml @@ -45,7 +45,7 @@ jobs: matrix: arch: - x86_64 - - aarch64 + - arm64 runs-on: - self-hosted - linux @@ -75,7 +75,7 @@ jobs: id: setup-relenv with: platform: linux - arch: ${{ matrix.arch }} + arch: ${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }} version: ${{ inputs.relenv-version }} cache-seed: ${{ inputs.cache-seed }} python-version: ${{ inputs.python-version }} @@ -98,9 +98,9 @@ jobs: matrix: arch: - x86_64 - - aarch64 + - arm64 runs-on: - - ${{ matrix.arch == 'aarch64' && 'macos-13-xlarge' || 'macos-12' }} + - ${{ matrix.arch == 'arm64' && 'macos-13-xlarge' || 'macos-12' }} steps: - name: "Throttle Builds" @@ -119,7 +119,7 @@ jobs: uses: ./.github/actions/setup-relenv with: platform: darwin - arch: ${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }} + arch: ${{ matrix.arch }} version: ${{ inputs.relenv-version }} cache-seed: ${{ inputs.cache-seed }} python-version: ${{ inputs.python-version }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 41383fb40621..adaa539fc12d 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -2267,7 +2267,7 @@ jobs: - pkg-type: deb distro: debian version: "10" - arch: aarch64 + arch: arm64 - pkg-type: deb distro: debian version: "11" @@ -2275,7 +2275,7 @@ jobs: - pkg-type: deb distro: debian version: "11" - arch: aarch64 + arch: arm64 - pkg-type: deb distro: debian version: "12" @@ -2283,7 +2283,7 @@ jobs: - pkg-type: deb distro: debian version: "12" - arch: aarch64 + arch: arm64 - pkg-type: deb distro: ubuntu version: "20.04" @@ -2291,7 +2291,7 @@ jobs: - pkg-type: deb distro: ubuntu version: "20.04" - arch: aarch64 + arch: arm64 - pkg-type: deb distro: ubuntu version: "22.04" @@ -2299,7 +2299,7 @@ jobs: - pkg-type: deb distro: ubuntu version: "22.04" - arch: aarch64 + arch: arm64 steps: - uses: actions/checkout@v4 @@ -2544,7 +2544,7 @@ jobs: - name: Download RPM Packages uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}-rpm + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch }}-rpm path: artifacts/pkgs/incoming - name: Setup GnuPG @@ -2740,7 +2740,7 @@ jobs: - name: Download macOS Arch64 Packages uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-aarch64-macos + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-arm64-macos path: artifacts/pkgs/incoming - name: Setup GnuPG @@ -2827,10 +2827,10 @@ jobs: name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-x86_64.tar.xz path: artifacts/pkgs/incoming - - name: Download Linux aarch64 Onedir Archive + - name: Download Linux arm64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-aarch64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-arm64.tar.xz path: artifacts/pkgs/incoming - name: Download macOS x86_64 Onedir Archive @@ -2842,7 +2842,7 @@ jobs: - name: Download macOS arm64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-aarch64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-arm64.tar.xz path: artifacts/pkgs/incoming - name: Download Windows amd64 Onedir Archive diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d6c8ef4d702..94a48304ee14 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -132,7 +132,7 @@ jobs: - platform: linux arch: x86_64 - platform: linux - arch: aarch64 + arch: arm64 - platform: windows arch: amd64 - platform: windows @@ -140,7 +140,7 @@ jobs: - platform: darwin arch: x86_64 - platform: darwin - arch: aarch64 + arch: arm64 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index cef642db2d8a..eadb19a9afd8 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -2112,7 +2112,7 @@ jobs: - pkg-type: deb distro: debian version: "10" - arch: aarch64 + arch: arm64 - pkg-type: deb distro: debian version: "11" @@ -2120,7 +2120,7 @@ jobs: - pkg-type: deb distro: debian version: "11" - arch: aarch64 + arch: arm64 - pkg-type: deb distro: debian version: "12" @@ -2128,7 +2128,7 @@ jobs: - pkg-type: deb distro: debian version: "12" - arch: aarch64 + arch: arm64 - pkg-type: deb distro: ubuntu version: "20.04" @@ -2136,7 +2136,7 @@ jobs: - pkg-type: deb distro: ubuntu version: "20.04" - arch: aarch64 + arch: arm64 - pkg-type: deb distro: ubuntu version: "22.04" @@ -2144,7 +2144,7 @@ jobs: - pkg-type: deb distro: ubuntu version: "22.04" - arch: aarch64 + arch: arm64 steps: - uses: actions/checkout@v4 @@ -2389,7 +2389,7 @@ jobs: - name: Download RPM Packages uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}-rpm + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch }}-rpm path: artifacts/pkgs/incoming - name: Setup GnuPG @@ -2587,7 +2587,7 @@ jobs: - name: Download macOS Arch64 Packages uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-aarch64-macos + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-arm64-macos path: artifacts/pkgs/incoming - name: Setup GnuPG @@ -2674,10 +2674,10 @@ jobs: name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-x86_64.tar.xz path: artifacts/pkgs/incoming - - name: Download Linux aarch64 Onedir Archive + - name: Download Linux arm64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-aarch64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-arm64.tar.xz path: artifacts/pkgs/incoming - name: Download macOS x86_64 Onedir Archive @@ -2689,7 +2689,7 @@ jobs: - name: Download macOS arm64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-aarch64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-arm64.tar.xz path: artifacts/pkgs/incoming - name: Download Windows amd64 Onedir Archive diff --git a/.github/workflows/templates/build-deb-repo.yml.jinja b/.github/workflows/templates/build-deb-repo.yml.jinja index 8d9c054405fc..ac0bc159da45 100644 --- a/.github/workflows/templates/build-deb-repo.yml.jinja +++ b/.github/workflows/templates/build-deb-repo.yml.jinja @@ -5,15 +5,15 @@ include: <%- for distro, version, arch in ( ("debian", "10", "x86_64"), - ("debian", "10", "aarch64"), + ("debian", "10", "arm64"), ("debian", "11", "x86_64"), - ("debian", "11", "aarch64"), + ("debian", "11", "arm64"), ("debian", "12", "x86_64"), - ("debian", "12", "aarch64"), + ("debian", "12", "arm64"), ("ubuntu", "20.04", "x86_64"), - ("ubuntu", "20.04", "aarch64"), + ("ubuntu", "20.04", "arm64"), ("ubuntu", "22.04", "x86_64"), - ("ubuntu", "22.04", "aarch64"), + ("ubuntu", "22.04", "arm64"), ) %> - pkg-type: deb distro: <{ distro }> diff --git a/.github/workflows/templates/build-macos-repo.yml.jinja b/.github/workflows/templates/build-macos-repo.yml.jinja index c8127d0ac3e8..4e62d84e9535 100644 --- a/.github/workflows/templates/build-macos-repo.yml.jinja +++ b/.github/workflows/templates/build-macos-repo.yml.jinja @@ -28,7 +28,7 @@ - name: Download macOS Arch64 Packages uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-aarch64-macos + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-arm64-macos path: artifacts/pkgs/incoming - name: Setup GnuPG diff --git a/.github/workflows/templates/build-onedir-repo.yml.jinja b/.github/workflows/templates/build-onedir-repo.yml.jinja index 8e51caa9c8ba..9cbfb81c7695 100644 --- a/.github/workflows/templates/build-onedir-repo.yml.jinja +++ b/.github/workflows/templates/build-onedir-repo.yml.jinja @@ -25,10 +25,10 @@ name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-x86_64.tar.xz path: artifacts/pkgs/incoming - - name: Download Linux aarch64 Onedir Archive + - name: Download Linux arm64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-aarch64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-linux-arm64.tar.xz path: artifacts/pkgs/incoming - name: Download macOS x86_64 Onedir Archive @@ -40,7 +40,7 @@ - name: Download macOS arm64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-aarch64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-arm64.tar.xz path: artifacts/pkgs/incoming - name: Download Windows amd64 Onedir Archive diff --git a/.github/workflows/templates/build-rpm-repo.yml.jinja b/.github/workflows/templates/build-rpm-repo.yml.jinja index 7e99a9686964..4c785c82b1d4 100644 --- a/.github/workflows/templates/build-rpm-repo.yml.jinja +++ b/.github/workflows/templates/build-rpm-repo.yml.jinja @@ -66,7 +66,7 @@ - name: Download RPM Packages uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}-rpm + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch }}-rpm path: artifacts/pkgs/incoming - name: Setup GnuPG diff --git a/.github/workflows/templates/release.yml.jinja b/.github/workflows/templates/release.yml.jinja index cf05beefa80b..1bdaead95bec 100644 --- a/.github/workflows/templates/release.yml.jinja +++ b/.github/workflows/templates/release.yml.jinja @@ -166,7 +166,7 @@ permissions: - platform: linux arch: x86_64 - platform: linux - arch: aarch64 + arch: arm64 - platform: windows arch: amd64 - platform: windows @@ -174,7 +174,7 @@ permissions: - platform: darwin arch: x86_64 - platform: darwin - arch: aarch64 + arch: arm64 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/templates/test-package-downloads-action.yml.jinja b/.github/workflows/templates/test-package-downloads-action.yml.jinja index d92b2540e259..4e023dfefd5e 100644 --- a/.github/workflows/templates/test-package-downloads-action.yml.jinja +++ b/.github/workflows/templates/test-package-downloads-action.yml.jinja @@ -84,7 +84,7 @@ jobs: - name: Download Onedir Tarball as an Artifact uses: actions/download-artifact@v3 with: - name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}.tar.xz + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz path: artifacts/ - name: Decompress Onedir Tarball @@ -92,7 +92,7 @@ jobs: run: | python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" cd artifacts - tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}.tar.xz + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz - name: Download cached nox.linux.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3.3.1 @@ -318,7 +318,7 @@ jobs: - name: Download Onedir Tarball as an Artifact uses: actions/download-artifact@v3 with: - name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}.tar.xz + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch }}.tar.xz path: artifacts/ - name: Install System Dependencies @@ -330,7 +330,7 @@ jobs: run: | python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" cd artifacts - tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}.tar.xz + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch }}.tar.xz - name: Set up Python ${{ inputs.python-version }} uses: actions/setup-python@v4 diff --git a/.github/workflows/test-package-downloads-action.yml b/.github/workflows/test-package-downloads-action.yml index c6661849724c..7301e1f0e312 100644 --- a/.github/workflows/test-package-downloads-action.yml +++ b/.github/workflows/test-package-downloads-action.yml @@ -163,7 +163,7 @@ jobs: - name: Download Onedir Tarball as an Artifact uses: actions/download-artifact@v3 with: - name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}.tar.xz + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz path: artifacts/ - name: Decompress Onedir Tarball @@ -171,7 +171,7 @@ jobs: run: | python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" cd artifacts - tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}.tar.xz + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-linux-${{ matrix.arch }}.tar.xz - name: Download cached nox.linux.${{ matrix.arch }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3.3.1 @@ -404,7 +404,7 @@ jobs: - name: Download Onedir Tarball as an Artifact uses: actions/download-artifact@v3 with: - name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}.tar.xz + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch }}.tar.xz path: artifacts/ - name: Install System Dependencies @@ -416,7 +416,7 @@ jobs: run: | python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" cd artifacts - tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}.tar.xz + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch }}.tar.xz - name: Set up Python ${{ inputs.python-version }} uses: actions/setup-python@v4 diff --git a/tools/pkg/build.py b/tools/pkg/build.py index 90f34947bd5f..59e9467cdb2a 100644 --- a/tools/pkg/build.py +++ b/tools/pkg/build.py @@ -447,7 +447,7 @@ def windows( arguments={ "arch": { "help": "The architecture to build the package for", - "choices": ("x86_64", "aarch64", "x86", "amd64"), + "choices": ("x86_64", "arm64", "x86", "amd64"), "required": True, }, "python_version": { @@ -486,8 +486,8 @@ def onedir_dependencies( assert package_name is not None assert platform is not None - if platform in ("macos", "darwin") and arch == "aarch64": - arch = "arm64" + if platform not in ("macos", "darwin") and arch == "arm64": + arch = "aarch64" shared_constants = _get_shared_constants() if not python_version: From ab4b5e7ae97238174d658aba943df5a86db3e956 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 2 Jan 2024 14:24:42 +0000 Subject: [PATCH 49/60] Fix source package build Signed-off-by: Pedro Algarvio --- pkg/debian/rules | 4 ++-- pkg/rpm/salt.spec | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/debian/rules b/pkg/debian/rules index 3d39abe7ab18..6ed990418e4d 100755 --- a/pkg/debian/rules +++ b/pkg/debian/rules @@ -24,8 +24,8 @@ override_dh_auto_build: export FETCH_RELENV_VERSION=$${SALT_RELENV_VERSION} export PY=$$(build/onedir/venv/bin/python3 -c 'import sys; sys.stdout.write("{}.{}".format(*sys.version_info)); sys.stdout.flush()') \ && build/onedir/venv/bin/python3 -m pip install -r requirements/static/ci/py$${PY}/tools.txt - build/onedir/venv/bin/relenv fetch --arch=$${SALT_PACKAGE_ARCH} --python=$${SALT_PYTHON_VERSION} - build/onedir/venv/bin/relenv toolchain fetch --arch=$${SALT_PACKAGE_ARCH} + build/onedir/venv/bin/relenv fetch --python=$${SALT_PYTHON_VERSION} + build/onedir/venv/bin/relenv toolchain fetch build/onedir/venv/bin/tools pkg build onedir-dependencies --arch $${SALT_PACKAGE_ARCH} --relenv-version=$${SALT_RELENV_VERSION} --python-version $${SALT_PYTHON_VERSION} --package-name build/onedir/salt --platform linux # Fix any hardcoded paths to the relenv python binary on any of the scripts installed in the /bin directory diff --git a/pkg/rpm/salt.spec b/pkg/rpm/salt.spec index 9bb75580e03a..ed350a9e8dc8 100644 --- a/pkg/rpm/salt.spec +++ b/pkg/rpm/salt.spec @@ -169,8 +169,8 @@ cd $RPM_BUILD_DIR export FETCH_RELENV_VERSION=${SALT_RELENV_VERSION} export PY=$(build/venv/bin/python3 -c 'import sys; sys.stdout.write("{}.{}".format(*sys.version_info)); sys.stdout.flush()') build/venv/bin/python3 -m pip install -r %{_salt_src}/requirements/static/ci/py${PY}/tools.txt - build/venv/bin/relenv fetch --arch=${SALT_PACKAGE_ARCH} --python=${SALT_PYTHON_VERSION} - build/venv/bin/relenv toolchain fetch --arch=${SALT_PACKAGE_ARCH} + build/venv/bin/relenv fetch --python=${SALT_PYTHON_VERSION} + build/venv/bin/relenv toolchain fetch cd %{_salt_src} $RPM_BUILD_DIR/build/venv/bin/tools pkg build onedir-dependencies --arch ${SALT_PACKAGE_ARCH} --relenv-version=${SALT_RELENV_VERSION} --python-version ${SALT_PYTHON_VERSION} --package-name $RPM_BUILD_DIR/build/salt --platform linux From 5ea3bf3a9dbd7e128cf8a899b6c06958cdfcbf36 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 2 Jan 2024 15:17:33 +0000 Subject: [PATCH 50/60] Prefer using `macos` instead of `darwin` Signed-off-by: Pedro Algarvio --- .github/workflows/build-deps-ci-action.yml | 4 ++-- .github/workflows/build-deps-onedir.yml | 4 ++-- .github/workflows/build-packages.yml | 4 ++-- .github/workflows/build-salt-onedir.yml | 4 ++-- .github/workflows/ci.yml | 12 ++++++------ .github/workflows/nightly.yml | 16 ++++++++-------- .github/workflows/release.yml | 4 ++-- .github/workflows/scheduled.yml | 12 ++++++------ .github/workflows/staging.yml | 16 ++++++++-------- .../templates/build-deps-ci-action.yml.jinja | 4 ++-- .../templates/build-onedir-repo.yml.jinja | 4 ++-- .github/workflows/templates/release.yml.jinja | 4 ++-- .../test-package-downloads-action.yml.jinja | 4 ++-- .../workflows/templates/test-salt-pkg.yml.jinja | 2 +- .github/workflows/templates/test-salt.yml.jinja | 2 +- .../workflows/test-package-downloads-action.yml | 4 ++-- tools/pkg/build.py | 2 +- 17 files changed, 51 insertions(+), 51 deletions(-) diff --git a/.github/workflows/build-deps-ci-action.yml b/.github/workflows/build-deps-ci-action.yml index 5e6ef722af4a..4764bd3c8073 100644 --- a/.github/workflows/build-deps-ci-action.yml +++ b/.github/workflows/build-deps-ci-action.yml @@ -190,7 +190,7 @@ jobs: if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' uses: actions/download-artifact@v3 with: - name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch }}.tar.xz + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz path: artifacts/ - name: Decompress Onedir Tarball @@ -199,7 +199,7 @@ jobs: run: | python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" cd artifacts - tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch }}.tar.xz + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz - name: Set up Python ${{ inputs.python-version }} if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' diff --git a/.github/workflows/build-deps-onedir.yml b/.github/workflows/build-deps-onedir.yml index 7230ce9d7d07..0ad923060f10 100644 --- a/.github/workflows/build-deps-onedir.yml +++ b/.github/workflows/build-deps-onedir.yml @@ -118,7 +118,7 @@ jobs: id: setup-relenv uses: ./.github/actions/setup-relenv with: - platform: darwin + platform: macos arch: ${{ matrix.arch }} version: ${{ inputs.relenv-version }} cache-seed: ${{ inputs.cache-seed }} @@ -127,7 +127,7 @@ jobs: - name: Install Salt Packaging Dependencies into Relenv Onedir uses: ./.github/actions/build-onedir-deps with: - platform: darwin + platform: macos arch: ${{ matrix.arch }} python-version: "${{ inputs.python-version }}" cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ steps.setup-relenv.outputs.version }} diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index abe35e1c81f5..266c9e064e6c 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -102,7 +102,7 @@ jobs: - name: Download Onedir Tarball as an Artifact uses: actions/download-artifact@v3 with: - name: salt-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch }}.tar.xz + name: salt-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz path: artifacts/ - name: Prepare Package Signing @@ -135,7 +135,7 @@ jobs: tools pkg build macos --relenv-version=${{ inputs.relenv-version }} --python-version=${{ inputs.python-version }} ${{ inputs.source == 'onedir' && format( - '--onedir salt-{0}-onedir-darwin-{1}.tar.xz --salt-version {0} {2}', + '--onedir salt-{0}-onedir-macos-{1}.tar.xz --salt-version {0} {2}', inputs.salt-version, matrix.arch, steps.check-pkg-sign.outputs.sign-pkgs == 'true' && '--sign' || '' diff --git a/.github/workflows/build-salt-onedir.yml b/.github/workflows/build-salt-onedir.yml index df2f562fa541..9c0e2aa7da68 100644 --- a/.github/workflows/build-salt-onedir.yml +++ b/.github/workflows/build-salt-onedir.yml @@ -118,7 +118,7 @@ jobs: id: setup-relenv uses: ./.github/actions/setup-relenv with: - platform: darwin + platform: macos arch: ${{ matrix.arch }} version: ${{ inputs.relenv-version }} cache-seed: ${{ inputs.cache-seed }} @@ -138,7 +138,7 @@ jobs: - name: Install Salt into Relenv Onedir uses: ./.github/actions/build-onedir-salt with: - platform: darwin + platform: macos arch: ${{ matrix.arch }} salt-version: "${{ inputs.salt-version }}" python-version: "${{ inputs.python-version }}" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 823166cfe1f2..fef43c299f6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1005,7 +1005,7 @@ jobs: with: distro-slug: macos-12 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos @@ -1027,7 +1027,7 @@ jobs: with: distro-slug: macos-13 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos @@ -1049,7 +1049,7 @@ jobs: with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir - platform: darwin + platform: macos arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos @@ -1268,7 +1268,7 @@ jobs: with: distro-slug: macos-12 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" @@ -1290,7 +1290,7 @@ jobs: with: distro-slug: macos-13 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" @@ -1312,7 +1312,7 @@ jobs: with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir - platform: darwin + platform: macos arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index adaa539fc12d..d1511e44270e 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -1062,7 +1062,7 @@ jobs: with: distro-slug: macos-12 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos @@ -1084,7 +1084,7 @@ jobs: with: distro-slug: macos-13 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos @@ -1106,7 +1106,7 @@ jobs: with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir - platform: darwin + platform: macos arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos @@ -1325,7 +1325,7 @@ jobs: with: distro-slug: macos-12 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" @@ -1347,7 +1347,7 @@ jobs: with: distro-slug: macos-13 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" @@ -1369,7 +1369,7 @@ jobs: with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir - platform: darwin + platform: macos arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" @@ -2836,13 +2836,13 @@ jobs: - name: Download macOS x86_64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-x86_64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-macos-x86_64.tar.xz path: artifacts/pkgs/incoming - name: Download macOS arm64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-arm64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-macos-arm64.tar.xz path: artifacts/pkgs/incoming - name: Download Windows amd64 Onedir Archive diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 94a48304ee14..90f3ca42935c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -137,9 +137,9 @@ jobs: arch: amd64 - platform: windows arch: x86 - - platform: darwin + - platform: macos arch: x86_64 - - platform: darwin + - platform: macos arch: arm64 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index b9da44c7f0e4..fa60f49a74f2 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -1039,7 +1039,7 @@ jobs: with: distro-slug: macos-12 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos @@ -1061,7 +1061,7 @@ jobs: with: distro-slug: macos-13 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos @@ -1083,7 +1083,7 @@ jobs: with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir - platform: darwin + platform: macos arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos @@ -1302,7 +1302,7 @@ jobs: with: distro-slug: macos-12 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" @@ -1324,7 +1324,7 @@ jobs: with: distro-slug: macos-13 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" @@ -1346,7 +1346,7 @@ jobs: with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir - platform: darwin + platform: macos arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index eadb19a9afd8..3697eec3395d 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -1052,7 +1052,7 @@ jobs: with: distro-slug: macos-12 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos @@ -1074,7 +1074,7 @@ jobs: with: distro-slug: macos-13 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos @@ -1096,7 +1096,7 @@ jobs: with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir - platform: darwin + platform: macos arch: arm64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos @@ -1315,7 +1315,7 @@ jobs: with: distro-slug: macos-12 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" @@ -1337,7 +1337,7 @@ jobs: with: distro-slug: macos-13 nox-session: ci-test-onedir - platform: darwin + platform: macos arch: x86_64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" @@ -1359,7 +1359,7 @@ jobs: with: distro-slug: macos-13-xlarge nox-session: ci-test-onedir - platform: darwin + platform: macos arch: arm64 nox-version: 2022.8.7 gh-actions-python-version: "3.10" @@ -2683,13 +2683,13 @@ jobs: - name: Download macOS x86_64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-x86_64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-macos-x86_64.tar.xz path: artifacts/pkgs/incoming - name: Download macOS arm64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-arm64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-macos-arm64.tar.xz path: artifacts/pkgs/incoming - name: Download Windows amd64 Onedir Archive diff --git a/.github/workflows/templates/build-deps-ci-action.yml.jinja b/.github/workflows/templates/build-deps-ci-action.yml.jinja index 7be48b3dd9b6..735a05edd22e 100644 --- a/.github/workflows/templates/build-deps-ci-action.yml.jinja +++ b/.github/workflows/templates/build-deps-ci-action.yml.jinja @@ -190,7 +190,7 @@ jobs: if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' uses: actions/download-artifact@v3 with: - name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch }}.tar.xz + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz path: artifacts/ - name: Decompress Onedir Tarball @@ -199,7 +199,7 @@ jobs: run: | python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" cd artifacts - tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch }}.tar.xz + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz - name: Set up Python ${{ inputs.python-version }} if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' diff --git a/.github/workflows/templates/build-onedir-repo.yml.jinja b/.github/workflows/templates/build-onedir-repo.yml.jinja index 9cbfb81c7695..ac0e64e203a8 100644 --- a/.github/workflows/templates/build-onedir-repo.yml.jinja +++ b/.github/workflows/templates/build-onedir-repo.yml.jinja @@ -34,13 +34,13 @@ - name: Download macOS x86_64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-x86_64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-macos-x86_64.tar.xz path: artifacts/pkgs/incoming - name: Download macOS arm64 Onedir Archive uses: actions/download-artifact@v3 with: - name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-darwin-arm64.tar.xz + name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-macos-arm64.tar.xz path: artifacts/pkgs/incoming - name: Download Windows amd64 Onedir Archive diff --git a/.github/workflows/templates/release.yml.jinja b/.github/workflows/templates/release.yml.jinja index 1bdaead95bec..6cbb59a9136c 100644 --- a/.github/workflows/templates/release.yml.jinja +++ b/.github/workflows/templates/release.yml.jinja @@ -171,9 +171,9 @@ permissions: arch: amd64 - platform: windows arch: x86 - - platform: darwin + - platform: macos arch: x86_64 - - platform: darwin + - platform: macos arch: arm64 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/templates/test-package-downloads-action.yml.jinja b/.github/workflows/templates/test-package-downloads-action.yml.jinja index 4e023dfefd5e..284364fa1a37 100644 --- a/.github/workflows/templates/test-package-downloads-action.yml.jinja +++ b/.github/workflows/templates/test-package-downloads-action.yml.jinja @@ -318,7 +318,7 @@ jobs: - name: Download Onedir Tarball as an Artifact uses: actions/download-artifact@v3 with: - name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch }}.tar.xz + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz path: artifacts/ - name: Install System Dependencies @@ -330,7 +330,7 @@ jobs: run: | python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" cd artifacts - tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch }}.tar.xz + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz - name: Set up Python ${{ inputs.python-version }} uses: actions/setup-python@v4 diff --git a/.github/workflows/templates/test-salt-pkg.yml.jinja b/.github/workflows/templates/test-salt-pkg.yml.jinja index b41f1f37a5a2..5beab6824a0a 100644 --- a/.github/workflows/templates/test-salt-pkg.yml.jinja +++ b/.github/workflows/templates/test-salt-pkg.yml.jinja @@ -46,7 +46,7 @@ with: distro-slug: <{ slug }> nox-session: ci-test-onedir - platform: darwin + platform: macos arch: <{ arch }> salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos diff --git a/.github/workflows/templates/test-salt.yml.jinja b/.github/workflows/templates/test-salt.yml.jinja index 1be2d2995acb..296cf258dd3d 100644 --- a/.github/workflows/templates/test-salt.yml.jinja +++ b/.github/workflows/templates/test-salt.yml.jinja @@ -45,7 +45,7 @@ with: distro-slug: <{ slug }> nox-session: ci-test-onedir - platform: darwin + platform: macos arch: <{ arch }> nox-version: <{ nox_version }> gh-actions-python-version: "<{ gh_actions_workflows_python_version }>" diff --git a/.github/workflows/test-package-downloads-action.yml b/.github/workflows/test-package-downloads-action.yml index 7301e1f0e312..b40fa3810f7f 100644 --- a/.github/workflows/test-package-downloads-action.yml +++ b/.github/workflows/test-package-downloads-action.yml @@ -404,7 +404,7 @@ jobs: - name: Download Onedir Tarball as an Artifact uses: actions/download-artifact@v3 with: - name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch }}.tar.xz + name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz path: artifacts/ - name: Install System Dependencies @@ -416,7 +416,7 @@ jobs: run: | python3 -c "import os; os.makedirs('artifacts', exist_ok=True)" cd artifacts - tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-darwin-${{ matrix.arch }}.tar.xz + tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz - name: Set up Python ${{ inputs.python-version }} uses: actions/setup-python@v4 diff --git a/tools/pkg/build.py b/tools/pkg/build.py index 59e9467cdb2a..37210e8fa52d 100644 --- a/tools/pkg/build.py +++ b/tools/pkg/build.py @@ -562,7 +562,7 @@ def onedir_dependencies( / "static" / "pkg" / f"py{requirements_version}" - / f"{platform}.txt" + / f"{platform if platform != 'macos' else 'darwin'}.txt" ) _check_pkg_build_files_exist(ctx, requirements_file=requirements_file) From b57de375c83ddb47e04997afa6b0c2edf40d60b0 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 2 Jan 2024 15:27:51 +0000 Subject: [PATCH 51/60] Use windows self hosted runners to build CI deps Signed-off-by: Pedro Algarvio --- .github/workflows/build-deps-ci-action.yml | 59 ++++--------------- .../templates/build-deps-ci-action.yml.jinja | 59 ++++--------------- 2 files changed, 26 insertions(+), 92 deletions(-) diff --git a/.github/workflows/build-deps-ci-action.yml b/.github/workflows/build-deps-ci-action.yml index 4764bd3c8073..467d3e6916a1 100644 --- a/.github/workflows/build-deps-ci-action.yml +++ b/.github/workflows/build-deps-ci-action.yml @@ -247,10 +247,7 @@ jobs: windows-dependencies: name: Windows - runs-on: - - self-hosted - - linux - - bastion + runs-on: ${{ matrix.distro-slug }} timeout-minutes: 90 strategy: fail-fast: false @@ -263,7 +260,7 @@ jobs: - name: "Throttle Builds" shell: bash run: | - t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" + t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" - name: Checkout Source Code uses: actions/checkout@v4 @@ -292,64 +289,34 @@ jobs: cd artifacts tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.tar.xz - - name: PyPi Proxy - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - sed -i '7s;^;--index-url=https://pypi-proxy.saltstack.net/root/local/+simple/ --extra-index-url=https://pypi.org/simple\n;' requirements/static/ci/*/*.txt - - - name: Setup Python Tools Scripts + - name: Set up Python ${{ inputs.python-version }} if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - uses: ./.github/actions/setup-python-tools-scripts + uses: actions/setup-python@v4 with: - cache-prefix: ${{ inputs.cache-prefix }}-build-deps-ci - - - name: Get Salt Project GitHub Actions Bot Environment - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30") - SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/tags/instance/spb:environment) - echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV" - - - name: Start VM - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - id: spin-up-vm - run: | - tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ matrix.distro-slug }} - - - name: List Free Space - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm ssh ${{ matrix.distro-slug }} -- df -h || true + python-version: "${{ inputs.python-version }}" - - name: Upload Checkout To VM + - name: Install Nox if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - tools --timestamps vm rsync ${{ matrix.distro-slug }} + python3 -m pip install 'nox==${{ inputs.nox-version }}' - name: Install Dependencies if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + env: + PRINT_TEST_SELECTION: "0" + PRINT_SYSTEM_INFO: "0" run: | - tools --timestamps vm install-dependencies --nox-session=${{ inputs.nox-session }} ${{ matrix.distro-slug }} + nox --install-only -e ${{ inputs.nox-session }} - name: Cleanup .nox Directory if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - tools --timestamps vm pre-archive-cleanup ${{ matrix.distro-slug }} + nox --force-color -e "pre-archive-cleanup(pkg=False)" - name: Compress .nox Directory if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - tools --timestamps vm compress-dependencies ${{ matrix.distro-slug }} - - - name: Download Compressed .nox Directory - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm download-dependencies ${{ matrix.distro-slug }} - - - name: Destroy VM - if: always() && steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm destroy --no-wait ${{ matrix.distro-slug }} + nox --force-color -e compress-dependencies -- windows ${{ matrix.arch }} - name: Upload Nox Requirements Tarball uses: actions/upload-artifact@v3 diff --git a/.github/workflows/templates/build-deps-ci-action.yml.jinja b/.github/workflows/templates/build-deps-ci-action.yml.jinja index 735a05edd22e..2a8d73c8c32c 100644 --- a/.github/workflows/templates/build-deps-ci-action.yml.jinja +++ b/.github/workflows/templates/build-deps-ci-action.yml.jinja @@ -247,10 +247,7 @@ jobs: windows-dependencies: name: Windows - runs-on: - - self-hosted - - linux - - bastion + runs-on: ${{ matrix.distro-slug }} timeout-minutes: 90 strategy: fail-fast: false @@ -265,7 +262,7 @@ jobs: - name: "Throttle Builds" shell: bash run: | - t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" + t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" - name: Checkout Source Code uses: actions/checkout@v4 @@ -294,64 +291,34 @@ jobs: cd artifacts tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.tar.xz - - name: PyPi Proxy - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - sed -i '7s;^;--index-url=https://pypi-proxy.saltstack.net/root/local/+simple/ --extra-index-url=https://pypi.org/simple\n;' requirements/static/ci/*/*.txt - - - name: Setup Python Tools Scripts + - name: Set up Python ${{ inputs.python-version }} if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - uses: ./.github/actions/setup-python-tools-scripts + uses: actions/setup-python@v4 with: - cache-prefix: ${{ inputs.cache-prefix }}-build-deps-ci - - - name: Get Salt Project GitHub Actions Bot Environment - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30") - SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/tags/instance/spb:environment) - echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV" - - - name: Start VM - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - id: spin-up-vm - run: | - tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ matrix.distro-slug }} - - - name: List Free Space - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm ssh ${{ matrix.distro-slug }} -- df -h || true + python-version: "${{ inputs.python-version }}" - - name: Upload Checkout To VM + - name: Install Nox if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - tools --timestamps vm rsync ${{ matrix.distro-slug }} + python3 -m pip install 'nox==${{ inputs.nox-version }}' - name: Install Dependencies if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + env: + PRINT_TEST_SELECTION: "0" + PRINT_SYSTEM_INFO: "0" run: | - tools --timestamps vm install-dependencies --nox-session=${{ inputs.nox-session }} ${{ matrix.distro-slug }} + nox --install-only -e ${{ inputs.nox-session }} - name: Cleanup .nox Directory if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - tools --timestamps vm pre-archive-cleanup ${{ matrix.distro-slug }} + nox --force-color -e "pre-archive-cleanup(pkg=False)" - name: Compress .nox Directory if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - tools --timestamps vm compress-dependencies ${{ matrix.distro-slug }} - - - name: Download Compressed .nox Directory - if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm download-dependencies ${{ matrix.distro-slug }} - - - name: Destroy VM - if: always() && steps.nox-dependencies-cache.outputs.cache-hit != 'true' - run: | - tools --timestamps vm destroy --no-wait ${{ matrix.distro-slug }} + nox --force-color -e compress-dependencies -- windows ${{ matrix.arch }} - name: Upload Nox Requirements Tarball uses: actions/upload-artifact@v3 From 2fa8fa8d2ab15149de839f4f91591f60611aca4f Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 2 Jan 2024 16:11:00 +0000 Subject: [PATCH 52/60] Re-add the removed Linux OS'es for the package download tests Signed-off-by: Pedro Algarvio --- .../test-package-downloads-action.yml | 72 ++++++++++++++++++- tools/precommit/workflows.py | 31 +++++--- 2 files changed, 92 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test-package-downloads-action.yml b/.github/workflows/test-package-downloads-action.yml index b40fa3810f7f..704c021ab3ed 100644 --- a/.github/workflows/test-package-downloads-action.yml +++ b/.github/workflows/test-package-downloads-action.yml @@ -68,33 +68,72 @@ jobs: - distro-slug: almalinux-8 arch: x86_64 pkg-type: package + - distro-slug: almalinux-8-arm64 + arch: aarch64 + pkg-type: package + - distro-slug: almalinux-8-arm64 + arch: arm64 + pkg-type: package - distro-slug: almalinux-9 arch: x86_64 pkg-type: package + - distro-slug: almalinux-9-arm64 + arch: aarch64 + pkg-type: package + - distro-slug: almalinux-9-arm64 + arch: arm64 + pkg-type: package - distro-slug: amazonlinux-2 arch: x86_64 pkg-type: package + - distro-slug: amazonlinux-2-arm64 + arch: aarch64 + pkg-type: package - distro-slug: amazonlinux-2-arm64 arch: arm64 pkg-type: package - distro-slug: amazonlinux-2023 arch: x86_64 pkg-type: package + - distro-slug: amazonlinux-2023-arm64 + arch: aarch64 + pkg-type: package - distro-slug: amazonlinux-2023-arm64 arch: arm64 pkg-type: package - distro-slug: centos-7 arch: x86_64 pkg-type: package + - distro-slug: centos-7-arm64 + arch: aarch64 + pkg-type: package + - distro-slug: centos-7-arm64 + arch: arm64 + pkg-type: package - distro-slug: centosstream-8 arch: x86_64 pkg-type: package + - distro-slug: centosstream-8-arm64 + arch: aarch64 + pkg-type: package + - distro-slug: centosstream-8-arm64 + arch: arm64 + pkg-type: package - distro-slug: centosstream-9 arch: x86_64 pkg-type: package + - distro-slug: centosstream-9-arm64 + arch: aarch64 + pkg-type: package + - distro-slug: centosstream-9-arm64 + arch: arm64 + pkg-type: package - distro-slug: debian-10 arch: x86_64 pkg-type: package + - distro-slug: debian-10-arm64 + arch: arm64 + pkg-type: package - distro-slug: debian-11 arch: x86_64 pkg-type: package @@ -110,24 +149,45 @@ jobs: - distro-slug: fedora-37 arch: x86_64 pkg-type: package + - distro-slug: fedora-37-arm64 + arch: aarch64 + pkg-type: package + - distro-slug: fedora-37-arm64 + arch: arm64 + pkg-type: package - distro-slug: fedora-38 arch: x86_64 pkg-type: package + - distro-slug: fedora-38-arm64 + arch: aarch64 + pkg-type: package + - distro-slug: fedora-38-arm64 + arch: arm64 + pkg-type: package - distro-slug: photonos-3 arch: x86_64 pkg-type: package + - distro-slug: photonos-3-arm64 + arch: aarch64 + pkg-type: package - distro-slug: photonos-3-arm64 arch: arm64 pkg-type: package - distro-slug: photonos-4 arch: x86_64 pkg-type: package + - distro-slug: photonos-4-arm64 + arch: aarch64 + pkg-type: package - distro-slug: photonos-4-arm64 arch: arm64 pkg-type: package - distro-slug: photonos-5 arch: x86_64 pkg-type: package + - distro-slug: photonos-5-arm64 + arch: aarch64 + pkg-type: package - distro-slug: photonos-5-arm64 arch: arm64 pkg-type: package @@ -140,15 +200,21 @@ jobs: - distro-slug: ubuntu-22.04 arch: x86_64 pkg-type: package - - distro-slug: ubuntu-22.04-arm64 - arch: arm64 - pkg-type: package - distro-slug: ubuntu-22.04 arch: x86_64 pkg-type: onedir + - distro-slug: ubuntu-22.04-arm64 + arch: arm64 + pkg-type: package - distro-slug: ubuntu-22.04-arm64 arch: arm64 pkg-type: onedir + - distro-slug: ubuntu-23.04 + arch: x86_64 + pkg-type: package + - distro-slug: ubuntu-23.04-arm64 + arch: arm64 + pkg-type: package steps: diff --git a/tools/precommit/workflows.py b/tools/precommit/workflows.py index 88920f48c68a..f75c40df120c 100644 --- a/tools/precommit/workflows.py +++ b/tools/precommit/workflows.py @@ -4,6 +4,7 @@ # pylint: disable=resource-leakage,broad-except,3rd-party-module-not-gated from __future__ import annotations +import json import logging import shutil from typing import TYPE_CHECKING, cast @@ -18,6 +19,8 @@ WORKFLOWS = tools.utils.REPO_ROOT / ".github" / "workflows" TEMPLATES = WORKFLOWS / "templates" +with tools.utils.REPO_ROOT.joinpath("cicd", "golden-images.json").open() as rfh: + AMIS = json.load(rfh) # Define the command group @@ -208,22 +211,34 @@ def generate_workflows(ctx: Context): "macos": [], "windows": [], } - rpm_slugs = [ + rpm_slugs = ( "almalinux", "amazonlinux", "centos", "centosstream", "fedora", "photon", - ] - for slug, display_name, arch, fips in test_salt_listing["linux"]: - if slug in ("archlinux-lts", "opensuse-15"): + ) + linux_skip_pkg_download_tests = ( + "archlinux-lts", + "opensuse-15", + "windows", + ) + for slug in sorted(AMIS): + if slug.startswith(linux_skip_pkg_download_tests): continue + if "arm64" in slug: + arch = "arm64" + else: + arch = "x86_64" + if slug.startswith(rpm_slugs) and arch == "arm64": + # While we maintain backwards compatible urls + test_salt_pkg_downloads_listing["linux"].append( + (slug, "aarch64", "package") + ) test_salt_pkg_downloads_listing["linux"].append((slug, arch, "package")) - for slug, display_name, arch, fips in test_salt_listing["linux"][-2:]: - if slug in ("archlinux-lts", "opensuse-15"): - continue - test_salt_pkg_downloads_listing["linux"].append((slug, arch, "onedir")) + if slug.startswith("ubuntu-22"): + test_salt_pkg_downloads_listing["linux"].append((slug, arch, "onedir")) for slug, display_name, arch in test_salt_listing["macos"]: test_salt_pkg_downloads_listing["macos"].append((slug, arch, "package")) for slug, display_name, arch in test_salt_listing["macos"][-1:]: From 4243d41d88c2c886b2c931e8d02d4a7a17b73d0a Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 3 Jan 2024 17:27:49 +0000 Subject: [PATCH 53/60] Now the hashes will match, no more windows line breaks to mess it up Signed-off-by: Pedro Algarvio --- .github/workflows/build-deps-ci-action.yml | 16 ++-- .github/workflows/ci.yml | 73 ++++++++++++++++++ .github/workflows/nightly.yml | 73 ++++++++++++++++++ .github/workflows/release.yml | 8 ++ .github/workflows/scheduled.yml | 73 ++++++++++++++++++ .github/workflows/staging.yml | 74 +++++++++++++++++++ .../templates/build-ci-deps.yml.jinja | 1 + .../templates/build-deps-ci-action.yml.jinja | 16 ++-- .github/workflows/templates/layout.yml.jinja | 6 ++ .github/workflows/templates/release.yml.jinja | 6 ++ .../test-package-downloads-action.yml.jinja | 16 ++-- .../test-salt-pkg-repo-downloads.yml.jinja | 1 + .../templates/test-salt-pkg.yml.jinja | 3 + .../workflows/templates/test-salt.yml.jinja | 3 + .github/workflows/test-action-linux.yml | 8 +- .github/workflows/test-action-macos.yml | 8 +- .github/workflows/test-action-windows.yml | 8 +- .../test-package-downloads-action.yml | 16 ++-- .../workflows/test-packages-action-linux.yml | 8 +- .../workflows/test-packages-action-macos.yml | 8 +- .../test-packages-action-windows.yml | 8 +- 21 files changed, 379 insertions(+), 54 deletions(-) diff --git a/.github/workflows/build-deps-ci-action.yml b/.github/workflows/build-deps-ci-action.yml index 467d3e6916a1..3bb08e11b34a 100644 --- a/.github/workflows/build-deps-ci-action.yml +++ b/.github/workflows/build-deps-ci-action.yml @@ -20,6 +20,10 @@ on: required: true type: string description: The nox version to install + nox-archive-hash: + required: true + type: string + description: Nox Tarball Cache Hash python-version: required: false type: string @@ -71,9 +75,7 @@ jobs: uses: actions/cache@v3.3.1 with: path: nox.linux.${{ matrix.arch }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} - name: Download Onedir Tarball as an Artifact if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' @@ -182,9 +184,7 @@ jobs: uses: actions/cache@v3.3.1 with: path: nox.macos.${{ matrix.arch }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} - name: Download Onedir Tarball as an Artifact if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' @@ -270,9 +270,7 @@ jobs: uses: actions/cache@v3.3.1 with: path: nox.windows.${{ matrix.arch }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} - name: Download Onedir Tarball as an Artifact if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fef43c299f6c..446e868bebd7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,6 +48,7 @@ jobs: latest-release: ${{ steps.get-salt-releases.outputs.latest-release }} releases: ${{ steps.get-salt-releases.outputs.releases }} testing-releases: ${{ steps.get-testing-releases.outputs.testing-releases }} + nox-archive-hash: ${{ steps.nox-archive-hash.outputs.nox-archive-hash }} steps: - uses: actions/checkout@v4 with: @@ -164,6 +165,11 @@ jobs: run: | tools ci get-pr-test-labels --repository ${{ github.repository }} + - name: Get Hash For Nox Tarball Cache + id: nox-archive-hash + run: | + echo "nox-archive-hash=${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }}" | tee -a "$GITHUB_OUTPUT" + - name: Write Changed Files To A Local File run: echo '${{ toJSON(steps.changed-files.outputs) }}' > changed-files.json @@ -483,6 +489,7 @@ jobs: python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-pkg-tests: name: Amazon Linux 2 Package Test @@ -505,6 +512,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-arm64-pkg-tests: name: Amazon Linux 2 Arm64 Package Test @@ -527,6 +535,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-pkg-tests: name: Amazon Linux 2023 Package Test @@ -549,6 +558,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-arm64-pkg-tests: name: Amazon Linux 2023 Arm64 Package Test @@ -571,6 +581,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centos-7-pkg-tests: name: CentOS 7 Package Test @@ -593,6 +604,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-8-pkg-tests: name: CentOS Stream 8 Package Test @@ -615,6 +627,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9-pkg-tests: name: CentOS Stream 9 Package Test @@ -637,6 +650,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9-arm64-pkg-tests: name: CentOS Stream 9 Arm64 Package Test @@ -659,6 +673,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-10-pkg-tests: name: Debian 10 Package Test @@ -681,6 +696,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-pkg-tests: name: Debian 11 Package Test @@ -703,6 +719,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-arm64-pkg-tests: name: Debian 11 Arm64 Package Test @@ -725,6 +742,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-pkg-tests: name: Debian 12 Package Test @@ -747,6 +765,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-arm64-pkg-tests: name: Debian 12 Arm64 Package Test @@ -769,6 +788,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-pkg-tests: name: Photon OS 3 Package Test @@ -791,6 +811,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-arm64-pkg-tests: name: Photon OS 3 Arm64 Package Test @@ -813,6 +834,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-4-pkg-tests: name: Photon OS 4 Package Test @@ -835,6 +857,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-4-arm64-pkg-tests: @@ -858,6 +881,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-pkg-tests: @@ -881,6 +905,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-arm64-pkg-tests: @@ -904,6 +929,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true ubuntu-2004-pkg-tests: @@ -927,6 +953,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2004-arm64-pkg-tests: name: Ubuntu 20.04 Arm64 Package Test @@ -949,6 +976,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-pkg-tests: name: Ubuntu 22.04 Package Test @@ -971,6 +999,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-arm64-pkg-tests: name: Ubuntu 22.04 Arm64 Package Test @@ -993,6 +1022,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-12-pkg-tests: name: macOS 12 Package Test @@ -1015,6 +1045,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-pkg-tests: name: macOS 13 Package Test @@ -1037,6 +1068,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-xlarge-pkg-tests: name: macOS 13 Arm64 Package Test @@ -1059,6 +1091,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016-nsis-pkg-tests: name: Windows 2016 NSIS Package Test @@ -1081,6 +1114,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016-msi-pkg-tests: name: Windows 2016 MSI Package Test @@ -1103,6 +1137,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019-nsis-pkg-tests: name: Windows 2019 NSIS Package Test @@ -1125,6 +1160,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019-msi-pkg-tests: name: Windows 2019 MSI Package Test @@ -1147,6 +1183,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022-nsis-pkg-tests: name: Windows 2022 NSIS Package Test @@ -1169,6 +1206,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022-msi-pkg-tests: name: Windows 2022 MSI Package Test @@ -1191,6 +1229,7 @@ jobs: skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016: name: Windows 2016 Test @@ -1213,6 +1252,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019: name: Windows 2019 Test @@ -1235,6 +1275,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022: name: Windows 2022 Test @@ -1257,6 +1298,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-12: name: macOS 12 Test @@ -1279,6 +1321,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13: name: macOS 13 Test @@ -1301,6 +1344,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-xlarge: name: macOS 13 Arm64 Test @@ -1323,6 +1367,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" almalinux-8: name: Alma Linux 8 Test @@ -1345,6 +1390,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" almalinux-9: name: Alma Linux 9 Test @@ -1367,6 +1413,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2: name: Amazon Linux 2 Test @@ -1389,6 +1436,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-arm64: name: Amazon Linux 2 Arm64 Test @@ -1411,6 +1459,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023: name: Amazon Linux 2023 Test @@ -1433,6 +1482,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-arm64: name: Amazon Linux 2023 Arm64 Test @@ -1455,6 +1505,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" archlinux-lts: name: Arch Linux LTS Test @@ -1477,6 +1528,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centos-7: name: CentOS 7 Test @@ -1499,6 +1551,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-8: name: CentOS Stream 8 Test @@ -1521,6 +1574,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9: name: CentOS Stream 9 Test @@ -1543,6 +1597,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-10: name: Debian 10 Test @@ -1565,6 +1620,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11: name: Debian 11 Test @@ -1587,6 +1643,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-arm64: name: Debian 11 Arm64 Test @@ -1609,6 +1666,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12: name: Debian 12 Test @@ -1631,6 +1689,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-arm64: name: Debian 12 Arm64 Test @@ -1653,6 +1712,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fedora-37: name: Fedora 37 Test @@ -1675,6 +1735,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fedora-38: name: Fedora 38 Test @@ -1697,6 +1758,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" opensuse-15: name: Opensuse 15 Test @@ -1719,6 +1781,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3: name: Photon OS 3 Test @@ -1741,6 +1804,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-arm64: name: Photon OS 3 Arm64 Test @@ -1763,6 +1827,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-4: name: Photon OS 4 Test @@ -1785,6 +1850,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-4-arm64: @@ -1808,6 +1874,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5: @@ -1831,6 +1898,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-arm64: @@ -1854,6 +1922,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true ubuntu-2004: @@ -1877,6 +1946,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2004-arm64: name: Ubuntu 20.04 Arm64 Test @@ -1899,6 +1969,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204: name: Ubuntu 22.04 Test @@ -1921,6 +1992,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-arm64: name: Ubuntu 22.04 Arm64 Test @@ -1943,6 +2015,7 @@ jobs: skip-junit-reports: ${{ github.event_name == 'pull_request' }} workflow-slug: ci default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" combine-all-code-coverage: name: Combine Code Coverage diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index d1511e44270e..55cda4e7425c 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -92,6 +92,7 @@ jobs: latest-release: ${{ steps.get-salt-releases.outputs.latest-release }} releases: ${{ steps.get-salt-releases.outputs.releases }} testing-releases: ${{ steps.get-testing-releases.outputs.testing-releases }} + nox-archive-hash: ${{ steps.nox-archive-hash.outputs.nox-archive-hash }} steps: - uses: actions/checkout@v4 with: @@ -208,6 +209,11 @@ jobs: run: | tools ci get-pr-test-labels --repository ${{ github.repository }} + - name: Get Hash For Nox Tarball Cache + id: nox-archive-hash + run: | + echo "nox-archive-hash=${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }}" | tee -a "$GITHUB_OUTPUT" + - name: Write Changed Files To A Local File run: echo '${{ toJSON(steps.changed-files.outputs) }}' > changed-files.json @@ -540,6 +546,7 @@ jobs: python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-pkg-tests: name: Amazon Linux 2 Package Test @@ -562,6 +569,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-arm64-pkg-tests: name: Amazon Linux 2 Arm64 Package Test @@ -584,6 +592,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-pkg-tests: name: Amazon Linux 2023 Package Test @@ -606,6 +615,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-arm64-pkg-tests: name: Amazon Linux 2023 Arm64 Package Test @@ -628,6 +638,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centos-7-pkg-tests: name: CentOS 7 Package Test @@ -650,6 +661,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-8-pkg-tests: name: CentOS Stream 8 Package Test @@ -672,6 +684,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9-pkg-tests: name: CentOS Stream 9 Package Test @@ -694,6 +707,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9-arm64-pkg-tests: name: CentOS Stream 9 Arm64 Package Test @@ -716,6 +730,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-10-pkg-tests: name: Debian 10 Package Test @@ -738,6 +753,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-pkg-tests: name: Debian 11 Package Test @@ -760,6 +776,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-arm64-pkg-tests: name: Debian 11 Arm64 Package Test @@ -782,6 +799,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-pkg-tests: name: Debian 12 Package Test @@ -804,6 +822,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-arm64-pkg-tests: name: Debian 12 Arm64 Package Test @@ -826,6 +845,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-pkg-tests: name: Photon OS 3 Package Test @@ -848,6 +868,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-arm64-pkg-tests: name: Photon OS 3 Arm64 Package Test @@ -870,6 +891,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-4-pkg-tests: name: Photon OS 4 Package Test @@ -892,6 +914,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-4-arm64-pkg-tests: @@ -915,6 +938,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-pkg-tests: @@ -938,6 +962,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-arm64-pkg-tests: @@ -961,6 +986,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true ubuntu-2004-pkg-tests: @@ -984,6 +1010,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2004-arm64-pkg-tests: name: Ubuntu 20.04 Arm64 Package Test @@ -1006,6 +1033,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-pkg-tests: name: Ubuntu 22.04 Package Test @@ -1028,6 +1056,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-arm64-pkg-tests: name: Ubuntu 22.04 Arm64 Package Test @@ -1050,6 +1079,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-12-pkg-tests: name: macOS 12 Package Test @@ -1072,6 +1102,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-pkg-tests: name: macOS 13 Package Test @@ -1094,6 +1125,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-xlarge-pkg-tests: name: macOS 13 Arm64 Package Test @@ -1116,6 +1148,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016-nsis-pkg-tests: name: Windows 2016 NSIS Package Test @@ -1138,6 +1171,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016-msi-pkg-tests: name: Windows 2016 MSI Package Test @@ -1160,6 +1194,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019-nsis-pkg-tests: name: Windows 2019 NSIS Package Test @@ -1182,6 +1217,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019-msi-pkg-tests: name: Windows 2019 MSI Package Test @@ -1204,6 +1240,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022-nsis-pkg-tests: name: Windows 2022 NSIS Package Test @@ -1226,6 +1263,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022-msi-pkg-tests: name: Windows 2022 MSI Package Test @@ -1248,6 +1286,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016: name: Windows 2016 Test @@ -1270,6 +1309,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019: name: Windows 2019 Test @@ -1292,6 +1332,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022: name: Windows 2022 Test @@ -1314,6 +1355,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-12: name: macOS 12 Test @@ -1336,6 +1378,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13: name: macOS 13 Test @@ -1358,6 +1401,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-xlarge: name: macOS 13 Arm64 Test @@ -1380,6 +1424,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" almalinux-8: name: Alma Linux 8 Test @@ -1402,6 +1447,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" almalinux-9: name: Alma Linux 9 Test @@ -1424,6 +1470,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2: name: Amazon Linux 2 Test @@ -1446,6 +1493,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-arm64: name: Amazon Linux 2 Arm64 Test @@ -1468,6 +1516,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023: name: Amazon Linux 2023 Test @@ -1490,6 +1539,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-arm64: name: Amazon Linux 2023 Arm64 Test @@ -1512,6 +1562,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" archlinux-lts: name: Arch Linux LTS Test @@ -1534,6 +1585,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centos-7: name: CentOS 7 Test @@ -1556,6 +1608,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-8: name: CentOS Stream 8 Test @@ -1578,6 +1631,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9: name: CentOS Stream 9 Test @@ -1600,6 +1654,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-10: name: Debian 10 Test @@ -1622,6 +1677,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11: name: Debian 11 Test @@ -1644,6 +1700,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-arm64: name: Debian 11 Arm64 Test @@ -1666,6 +1723,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12: name: Debian 12 Test @@ -1688,6 +1746,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-arm64: name: Debian 12 Arm64 Test @@ -1710,6 +1769,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fedora-37: name: Fedora 37 Test @@ -1732,6 +1792,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fedora-38: name: Fedora 38 Test @@ -1754,6 +1815,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" opensuse-15: name: Opensuse 15 Test @@ -1776,6 +1838,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3: name: Photon OS 3 Test @@ -1798,6 +1861,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-arm64: name: Photon OS 3 Arm64 Test @@ -1820,6 +1884,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-4: name: Photon OS 4 Test @@ -1842,6 +1907,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-4-arm64: @@ -1865,6 +1931,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5: @@ -1888,6 +1955,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-arm64: @@ -1911,6 +1979,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true ubuntu-2004: @@ -1934,6 +2003,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2004-arm64: name: Ubuntu 20.04 Arm64 Test @@ -1956,6 +2026,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204: name: Ubuntu 22.04 Test @@ -1978,6 +2049,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-arm64: name: Ubuntu 22.04 Arm64 Test @@ -2000,6 +2072,7 @@ jobs: skip-junit-reports: false workflow-slug: nightly default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" combine-all-code-coverage: name: Combine Code Coverage diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 90f3ca42935c..87ecb2cd3f05 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,6 +58,7 @@ jobs: cache-seed: ${{ steps.set-cache-seed.outputs.cache-seed }} latest-release: ${{ steps.get-salt-releases.outputs.latest-release }} releases: ${{ steps.get-salt-releases.outputs.releases }} + nox-archive-hash: ${{ steps.nox-archive-hash.outputs.nox-archive-hash }} steps: - uses: actions/checkout@v4 with: @@ -116,6 +117,11 @@ jobs: run: | tools ci define-cache-seed ${{ env.CACHE_SEED }} + - name: Get Hash For Nox Tarball Cache + id: nox-archive-hash + run: | + echo "nox-archive-hash=${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }}" | tee -a "$GITHUB_OUTPUT" + download-onedir-artifact: name: Download Staging Onedir Artifact runs-on: @@ -178,6 +184,7 @@ jobs: python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" backup: name: Backup @@ -262,6 +269,7 @@ jobs: python-version: "3.10" skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" secrets: inherit release: diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index fa60f49a74f2..00e1c1bbc90d 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -82,6 +82,7 @@ jobs: latest-release: ${{ steps.get-salt-releases.outputs.latest-release }} releases: ${{ steps.get-salt-releases.outputs.releases }} testing-releases: ${{ steps.get-testing-releases.outputs.testing-releases }} + nox-archive-hash: ${{ steps.nox-archive-hash.outputs.nox-archive-hash }} steps: - uses: actions/checkout@v4 with: @@ -198,6 +199,11 @@ jobs: run: | tools ci get-pr-test-labels --repository ${{ github.repository }} + - name: Get Hash For Nox Tarball Cache + id: nox-archive-hash + run: | + echo "nox-archive-hash=${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }}" | tee -a "$GITHUB_OUTPUT" + - name: Write Changed Files To A Local File run: echo '${{ toJSON(steps.changed-files.outputs) }}' > changed-files.json @@ -517,6 +523,7 @@ jobs: python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-pkg-tests: name: Amazon Linux 2 Package Test @@ -539,6 +546,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-arm64-pkg-tests: name: Amazon Linux 2 Arm64 Package Test @@ -561,6 +569,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-pkg-tests: name: Amazon Linux 2023 Package Test @@ -583,6 +592,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-arm64-pkg-tests: name: Amazon Linux 2023 Arm64 Package Test @@ -605,6 +615,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centos-7-pkg-tests: name: CentOS 7 Package Test @@ -627,6 +638,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-8-pkg-tests: name: CentOS Stream 8 Package Test @@ -649,6 +661,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9-pkg-tests: name: CentOS Stream 9 Package Test @@ -671,6 +684,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9-arm64-pkg-tests: name: CentOS Stream 9 Arm64 Package Test @@ -693,6 +707,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-10-pkg-tests: name: Debian 10 Package Test @@ -715,6 +730,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-pkg-tests: name: Debian 11 Package Test @@ -737,6 +753,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-arm64-pkg-tests: name: Debian 11 Arm64 Package Test @@ -759,6 +776,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-pkg-tests: name: Debian 12 Package Test @@ -781,6 +799,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-arm64-pkg-tests: name: Debian 12 Arm64 Package Test @@ -803,6 +822,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-pkg-tests: name: Photon OS 3 Package Test @@ -825,6 +845,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-arm64-pkg-tests: name: Photon OS 3 Arm64 Package Test @@ -847,6 +868,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-4-pkg-tests: name: Photon OS 4 Package Test @@ -869,6 +891,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-4-arm64-pkg-tests: @@ -892,6 +915,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-pkg-tests: @@ -915,6 +939,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-arm64-pkg-tests: @@ -938,6 +963,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true ubuntu-2004-pkg-tests: @@ -961,6 +987,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2004-arm64-pkg-tests: name: Ubuntu 20.04 Arm64 Package Test @@ -983,6 +1010,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-pkg-tests: name: Ubuntu 22.04 Package Test @@ -1005,6 +1033,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-arm64-pkg-tests: name: Ubuntu 22.04 Arm64 Package Test @@ -1027,6 +1056,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-12-pkg-tests: name: macOS 12 Package Test @@ -1049,6 +1079,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-pkg-tests: name: macOS 13 Package Test @@ -1071,6 +1102,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-xlarge-pkg-tests: name: macOS 13 Arm64 Package Test @@ -1093,6 +1125,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016-nsis-pkg-tests: name: Windows 2016 NSIS Package Test @@ -1115,6 +1148,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016-msi-pkg-tests: name: Windows 2016 MSI Package Test @@ -1137,6 +1171,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019-nsis-pkg-tests: name: Windows 2019 NSIS Package Test @@ -1159,6 +1194,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019-msi-pkg-tests: name: Windows 2019 MSI Package Test @@ -1181,6 +1217,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022-nsis-pkg-tests: name: Windows 2022 NSIS Package Test @@ -1203,6 +1240,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022-msi-pkg-tests: name: Windows 2022 MSI Package Test @@ -1225,6 +1263,7 @@ jobs: skip-code-coverage: false skip-junit-reports: false testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016: name: Windows 2016 Test @@ -1247,6 +1286,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019: name: Windows 2019 Test @@ -1269,6 +1309,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022: name: Windows 2022 Test @@ -1291,6 +1332,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-12: name: macOS 12 Test @@ -1313,6 +1355,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13: name: macOS 13 Test @@ -1335,6 +1378,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-xlarge: name: macOS 13 Arm64 Test @@ -1357,6 +1401,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" almalinux-8: name: Alma Linux 8 Test @@ -1379,6 +1424,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" almalinux-9: name: Alma Linux 9 Test @@ -1401,6 +1447,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2: name: Amazon Linux 2 Test @@ -1423,6 +1470,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-arm64: name: Amazon Linux 2 Arm64 Test @@ -1445,6 +1493,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023: name: Amazon Linux 2023 Test @@ -1467,6 +1516,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-arm64: name: Amazon Linux 2023 Arm64 Test @@ -1489,6 +1539,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" archlinux-lts: name: Arch Linux LTS Test @@ -1511,6 +1562,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centos-7: name: CentOS 7 Test @@ -1533,6 +1585,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-8: name: CentOS Stream 8 Test @@ -1555,6 +1608,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9: name: CentOS Stream 9 Test @@ -1577,6 +1631,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-10: name: Debian 10 Test @@ -1599,6 +1654,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11: name: Debian 11 Test @@ -1621,6 +1677,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-arm64: name: Debian 11 Arm64 Test @@ -1643,6 +1700,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12: name: Debian 12 Test @@ -1665,6 +1723,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-arm64: name: Debian 12 Arm64 Test @@ -1687,6 +1746,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fedora-37: name: Fedora 37 Test @@ -1709,6 +1769,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fedora-38: name: Fedora 38 Test @@ -1731,6 +1792,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" opensuse-15: name: Opensuse 15 Test @@ -1753,6 +1815,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3: name: Photon OS 3 Test @@ -1775,6 +1838,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-arm64: name: Photon OS 3 Arm64 Test @@ -1797,6 +1861,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-4: name: Photon OS 4 Test @@ -1819,6 +1884,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-4-arm64: @@ -1842,6 +1908,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5: @@ -1865,6 +1932,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-arm64: @@ -1888,6 +1956,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true ubuntu-2004: @@ -1911,6 +1980,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2004-arm64: name: Ubuntu 20.04 Arm64 Test @@ -1933,6 +2003,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204: name: Ubuntu 22.04 Test @@ -1955,6 +2026,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-arm64: name: Ubuntu 22.04 Arm64 Test @@ -1977,6 +2049,7 @@ jobs: skip-junit-reports: false workflow-slug: scheduled default-timeout: 360 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" combine-all-code-coverage: name: Combine Code Coverage diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 3697eec3395d..d12a2d39529b 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -78,6 +78,7 @@ jobs: latest-release: ${{ steps.get-salt-releases.outputs.latest-release }} releases: ${{ steps.get-salt-releases.outputs.releases }} testing-releases: ${{ steps.get-testing-releases.outputs.testing-releases }} + nox-archive-hash: ${{ steps.nox-archive-hash.outputs.nox-archive-hash }} steps: - uses: actions/checkout@v4 with: @@ -194,6 +195,11 @@ jobs: run: | tools ci get-pr-test-labels --repository ${{ github.repository }} + - name: Get Hash For Nox Tarball Cache + id: nox-archive-hash + run: | + echo "nox-archive-hash=${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }}" | tee -a "$GITHUB_OUTPUT" + - name: Check Existing Releases env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -530,6 +536,7 @@ jobs: python-version: "3.10" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.13 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-pkg-tests: name: Amazon Linux 2 Package Test @@ -552,6 +559,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-arm64-pkg-tests: name: Amazon Linux 2 Arm64 Package Test @@ -574,6 +582,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-pkg-tests: name: Amazon Linux 2023 Package Test @@ -596,6 +605,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-arm64-pkg-tests: name: Amazon Linux 2023 Arm64 Package Test @@ -618,6 +628,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centos-7-pkg-tests: name: CentOS 7 Package Test @@ -640,6 +651,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-8-pkg-tests: name: CentOS Stream 8 Package Test @@ -662,6 +674,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9-pkg-tests: name: CentOS Stream 9 Package Test @@ -684,6 +697,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9-arm64-pkg-tests: name: CentOS Stream 9 Arm64 Package Test @@ -706,6 +720,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-10-pkg-tests: name: Debian 10 Package Test @@ -728,6 +743,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-pkg-tests: name: Debian 11 Package Test @@ -750,6 +766,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-arm64-pkg-tests: name: Debian 11 Arm64 Package Test @@ -772,6 +789,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-pkg-tests: name: Debian 12 Package Test @@ -794,6 +812,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-arm64-pkg-tests: name: Debian 12 Arm64 Package Test @@ -816,6 +835,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-pkg-tests: name: Photon OS 3 Package Test @@ -838,6 +858,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-arm64-pkg-tests: name: Photon OS 3 Arm64 Package Test @@ -860,6 +881,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-4-pkg-tests: name: Photon OS 4 Package Test @@ -882,6 +904,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-4-arm64-pkg-tests: @@ -905,6 +928,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-pkg-tests: @@ -928,6 +952,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-arm64-pkg-tests: @@ -951,6 +976,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true ubuntu-2004-pkg-tests: @@ -974,6 +1000,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2004-arm64-pkg-tests: name: Ubuntu 20.04 Arm64 Package Test @@ -996,6 +1023,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-pkg-tests: name: Ubuntu 22.04 Package Test @@ -1018,6 +1046,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-arm64-pkg-tests: name: Ubuntu 22.04 Arm64 Package Test @@ -1040,6 +1069,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-12-pkg-tests: name: macOS 12 Package Test @@ -1062,6 +1092,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-pkg-tests: name: macOS 13 Package Test @@ -1084,6 +1115,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-xlarge-pkg-tests: name: macOS 13 Arm64 Package Test @@ -1106,6 +1138,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016-nsis-pkg-tests: name: Windows 2016 NSIS Package Test @@ -1128,6 +1161,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016-msi-pkg-tests: name: Windows 2016 MSI Package Test @@ -1150,6 +1184,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019-nsis-pkg-tests: name: Windows 2019 NSIS Package Test @@ -1172,6 +1207,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019-msi-pkg-tests: name: Windows 2019 MSI Package Test @@ -1194,6 +1230,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022-nsis-pkg-tests: name: Windows 2022 NSIS Package Test @@ -1216,6 +1253,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022-msi-pkg-tests: name: Windows 2022 MSI Package Test @@ -1238,6 +1276,7 @@ jobs: skip-code-coverage: true skip-junit-reports: true testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2016: name: Windows 2016 Test @@ -1260,6 +1299,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2019: name: Windows 2019 Test @@ -1282,6 +1322,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" windows-2022: name: Windows 2022 Test @@ -1304,6 +1345,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-12: name: macOS 12 Test @@ -1326,6 +1368,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13: name: macOS 13 Test @@ -1348,6 +1391,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" macos-13-xlarge: name: macOS 13 Arm64 Test @@ -1370,6 +1414,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" almalinux-8: name: Alma Linux 8 Test @@ -1392,6 +1437,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" almalinux-9: name: Alma Linux 9 Test @@ -1414,6 +1460,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2: name: Amazon Linux 2 Test @@ -1436,6 +1483,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2-arm64: name: Amazon Linux 2 Arm64 Test @@ -1458,6 +1506,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023: name: Amazon Linux 2023 Test @@ -1480,6 +1529,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" amazonlinux-2023-arm64: name: Amazon Linux 2023 Arm64 Test @@ -1502,6 +1552,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" archlinux-lts: name: Arch Linux LTS Test @@ -1524,6 +1575,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centos-7: name: CentOS 7 Test @@ -1546,6 +1598,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-8: name: CentOS Stream 8 Test @@ -1568,6 +1621,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" centosstream-9: name: CentOS Stream 9 Test @@ -1590,6 +1644,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-10: name: Debian 10 Test @@ -1612,6 +1667,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11: name: Debian 11 Test @@ -1634,6 +1690,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-11-arm64: name: Debian 11 Arm64 Test @@ -1656,6 +1713,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12: name: Debian 12 Test @@ -1678,6 +1736,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" debian-12-arm64: name: Debian 12 Arm64 Test @@ -1700,6 +1759,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fedora-37: name: Fedora 37 Test @@ -1722,6 +1782,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fedora-38: name: Fedora 38 Test @@ -1744,6 +1805,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" opensuse-15: name: Opensuse 15 Test @@ -1766,6 +1828,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3: name: Photon OS 3 Test @@ -1788,6 +1851,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-3-arm64: name: Photon OS 3 Arm64 Test @@ -1810,6 +1874,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" photonos-4: name: Photon OS 4 Test @@ -1832,6 +1897,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-4-arm64: @@ -1855,6 +1921,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5: @@ -1878,6 +1945,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true photonos-5-arm64: @@ -1901,6 +1969,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" fips: true ubuntu-2004: @@ -1924,6 +1993,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2004-arm64: name: Ubuntu 20.04 Arm64 Test @@ -1946,6 +2016,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204: name: Ubuntu 22.04 Test @@ -1968,6 +2039,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" ubuntu-2204-arm64: name: Ubuntu 22.04 Arm64 Test @@ -1990,6 +2062,7 @@ jobs: skip-junit-reports: true workflow-slug: staging default-timeout: 180 + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" build-src-repo: name: Build Repository @@ -2902,6 +2975,7 @@ jobs: python-version: "3.10" skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" secrets: inherit publish-pypi: diff --git a/.github/workflows/templates/build-ci-deps.yml.jinja b/.github/workflows/templates/build-ci-deps.yml.jinja index bd933864dfa4..59f2bf0b9bcf 100644 --- a/.github/workflows/templates/build-ci-deps.yml.jinja +++ b/.github/workflows/templates/build-ci-deps.yml.jinja @@ -19,3 +19,4 @@ python-version: "<{ gh_actions_workflows_python_version }>" salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }> + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" diff --git a/.github/workflows/templates/build-deps-ci-action.yml.jinja b/.github/workflows/templates/build-deps-ci-action.yml.jinja index 2a8d73c8c32c..dea23b61444b 100644 --- a/.github/workflows/templates/build-deps-ci-action.yml.jinja +++ b/.github/workflows/templates/build-deps-ci-action.yml.jinja @@ -20,6 +20,10 @@ on: required: true type: string description: The nox version to install + nox-archive-hash: + required: true + type: string + description: Nox Tarball Cache Hash python-version: required: false type: string @@ -71,9 +75,7 @@ jobs: uses: actions/cache@v3.3.1 with: path: nox.linux.${{ matrix.arch }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} - name: Download Onedir Tarball as an Artifact if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' @@ -182,9 +184,7 @@ jobs: uses: actions/cache@v3.3.1 with: path: nox.macos.${{ matrix.arch }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} - name: Download Onedir Tarball as an Artifact if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' @@ -272,9 +272,7 @@ jobs: uses: actions/cache@v3.3.1 with: path: nox.windows.${{ matrix.arch }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} - name: Download Onedir Tarball as an Artifact if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' diff --git a/.github/workflows/templates/layout.yml.jinja b/.github/workflows/templates/layout.yml.jinja index 1ed2616983c1..d448bd2e5a74 100644 --- a/.github/workflows/templates/layout.yml.jinja +++ b/.github/workflows/templates/layout.yml.jinja @@ -96,6 +96,7 @@ jobs: latest-release: ${{ steps.get-salt-releases.outputs.latest-release }} releases: ${{ steps.get-salt-releases.outputs.releases }} testing-releases: ${{ steps.get-testing-releases.outputs.testing-releases }} + nox-archive-hash: ${{ steps.nox-archive-hash.outputs.nox-archive-hash }} steps: - uses: actions/checkout@v4 with: @@ -212,6 +213,11 @@ jobs: run: | tools ci get-pr-test-labels --repository ${{ github.repository }} + - name: Get Hash For Nox Tarball Cache + id: nox-archive-hash + run: | + echo "nox-archive-hash=${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }}" | tee -a "$GITHUB_OUTPUT" + <%- if prepare_actual_release %> - name: Check Existing Releases diff --git a/.github/workflows/templates/release.yml.jinja b/.github/workflows/templates/release.yml.jinja index 6cbb59a9136c..1417a7e93065 100644 --- a/.github/workflows/templates/release.yml.jinja +++ b/.github/workflows/templates/release.yml.jinja @@ -86,6 +86,7 @@ permissions: cache-seed: ${{ steps.set-cache-seed.outputs.cache-seed }} latest-release: ${{ steps.get-salt-releases.outputs.latest-release }} releases: ${{ steps.get-salt-releases.outputs.releases }} + nox-archive-hash: ${{ steps.nox-archive-hash.outputs.nox-archive-hash }} steps: - uses: actions/checkout@v4 with: @@ -144,6 +145,11 @@ permissions: run: | tools ci define-cache-seed ${{ env.CACHE_SEED }} + - name: Get Hash For Nox Tarball Cache + id: nox-archive-hash + run: | + echo "nox-archive-hash=${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') }}" | tee -a "$GITHUB_OUTPUT" + <%- endblock prepare_workflow_job %> <%- endif %> diff --git a/.github/workflows/templates/test-package-downloads-action.yml.jinja b/.github/workflows/templates/test-package-downloads-action.yml.jinja index 284364fa1a37..2a5b83103646 100644 --- a/.github/workflows/templates/test-package-downloads-action.yml.jinja +++ b/.github/workflows/templates/test-package-downloads-action.yml.jinja @@ -23,6 +23,10 @@ on: required: true type: string description: The nox version to install + nox-archive-hash: + required: true + type: string + description: Nox Tarball Cache Hash python-version: required: false type: string @@ -98,9 +102,7 @@ jobs: uses: actions/cache@v3.3.1 with: path: nox.linux.${{ matrix.arch }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} # If we get a cache miss here it means the dependencies step failed to save the cache fail-on-cache-miss: true @@ -346,9 +348,7 @@ jobs: uses: actions/cache@v3.3.1 with: path: nox.macos.${{ matrix.arch }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} # If we get a cache miss here it means the dependencies step failed to save the cache fail-on-cache-miss: true @@ -549,9 +549,7 @@ jobs: uses: actions/cache@v3.3.1 with: path: nox.windows.${{ matrix.arch }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} # If we get a cache miss here it means the dependencies step failed to save the cache fail-on-cache-miss: true diff --git a/.github/workflows/templates/test-salt-pkg-repo-downloads.yml.jinja b/.github/workflows/templates/test-salt-pkg-repo-downloads.yml.jinja index d28614620db2..0373787a47c0 100644 --- a/.github/workflows/templates/test-salt-pkg-repo-downloads.yml.jinja +++ b/.github/workflows/templates/test-salt-pkg-repo-downloads.yml.jinja @@ -31,4 +31,5 @@ python-version: "<{ gh_actions_workflows_python_version }>" skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" secrets: inherit diff --git a/.github/workflows/templates/test-salt-pkg.yml.jinja b/.github/workflows/templates/test-salt-pkg.yml.jinja index 5beab6824a0a..2afab9cf3adc 100644 --- a/.github/workflows/templates/test-salt-pkg.yml.jinja +++ b/.github/workflows/templates/test-salt-pkg.yml.jinja @@ -23,6 +23,7 @@ skip-code-coverage: <{ skip_test_coverage_check }> skip-junit-reports: <{ skip_junit_reports_check }> testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" <%- if fips == "fips" %> fips: true <%- endif %> @@ -56,6 +57,7 @@ skip-code-coverage: <{ skip_test_coverage_check }> skip-junit-reports: <{ skip_junit_reports_check }> testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" <%- endfor %> @@ -86,6 +88,7 @@ skip-code-coverage: <{ skip_test_coverage_check }> skip-junit-reports: <{ skip_junit_reports_check }> testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }} + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" <%- endfor %> <%- endfor %> diff --git a/.github/workflows/templates/test-salt.yml.jinja b/.github/workflows/templates/test-salt.yml.jinja index 296cf258dd3d..214985df3557 100644 --- a/.github/workflows/templates/test-salt.yml.jinja +++ b/.github/workflows/templates/test-salt.yml.jinja @@ -28,6 +28,7 @@ skip-junit-reports: <{ skip_junit_reports_check }> workflow-slug: <{ workflow_slug }> default-timeout: <{ timeout_value }> + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" <%- endfor %> @@ -56,6 +57,7 @@ skip-junit-reports: <{ skip_junit_reports_check }> workflow-slug: <{ workflow_slug }> default-timeout: <{ timeout_value }> + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" <%- endfor %> @@ -83,6 +85,7 @@ skip-junit-reports: <{ skip_junit_reports_check }> workflow-slug: <{ workflow_slug }> default-timeout: <{ timeout_value }> + nox-archive-hash: "${{ needs.prepare-workflow.outputs.nox-archive-hash }}" <%- if fips == "fips" %> fips: true <%- endif %> diff --git a/.github/workflows/test-action-linux.yml b/.github/workflows/test-action-linux.yml index 6a5ba0ae9515..2626bb5fdf2a 100644 --- a/.github/workflows/test-action-linux.yml +++ b/.github/workflows/test-action-linux.yml @@ -36,6 +36,10 @@ on: required: true type: string description: The nox version to install + nox-archive-hash: + required: true + type: string + description: Nox Tarball Cache Hash gh-actions-python-version: required: false type: string @@ -159,9 +163,7 @@ jobs: uses: actions/cache@v3.3.1 with: path: nox.linux.${{ inputs.arch }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.gh-actions-python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.gh-actions-python-version }}|${{ inputs.nox-archive-hash }} # If we get a cache miss here it means the dependencies step failed to save the cache fail-on-cache-miss: true diff --git a/.github/workflows/test-action-macos.yml b/.github/workflows/test-action-macos.yml index 605f16fc61fe..e95df52b7cd8 100644 --- a/.github/workflows/test-action-macos.yml +++ b/.github/workflows/test-action-macos.yml @@ -41,6 +41,10 @@ on: required: true type: string description: The nox version to install + nox-archive-hash: + required: true + type: string + description: Nox Tarball Cache Hash package-name: required: false type: string @@ -149,9 +153,7 @@ jobs: uses: actions/cache@v3.3.1 with: path: nox.macos.${{ inputs.arch }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.gh-actions-python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.gh-actions-python-version }}|${{ inputs.nox-archive-hash }} # If we get a cache miss here it means the dependencies step failed to save the cache fail-on-cache-miss: true diff --git a/.github/workflows/test-action-windows.yml b/.github/workflows/test-action-windows.yml index 769bc03f48bd..bdc944494f3f 100644 --- a/.github/workflows/test-action-windows.yml +++ b/.github/workflows/test-action-windows.yml @@ -36,6 +36,10 @@ on: required: true type: string description: The nox version to install + nox-archive-hash: + required: true + type: string + description: Nox Tarball Cache Hash gh-actions-python-version: required: false type: string @@ -159,9 +163,7 @@ jobs: uses: actions/cache@v3.3.1 with: path: nox.windows.${{ inputs.arch }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.gh-actions-python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.gh-actions-python-version }}|${{ inputs.nox-archive-hash }} # If we get a cache miss here it means the dependencies step failed to save the cache fail-on-cache-miss: true diff --git a/.github/workflows/test-package-downloads-action.yml b/.github/workflows/test-package-downloads-action.yml index 704c021ab3ed..12d3da43a968 100644 --- a/.github/workflows/test-package-downloads-action.yml +++ b/.github/workflows/test-package-downloads-action.yml @@ -23,6 +23,10 @@ on: required: true type: string description: The nox version to install + nox-archive-hash: + required: true + type: string + description: Nox Tarball Cache Hash python-version: required: false type: string @@ -243,9 +247,7 @@ jobs: uses: actions/cache@v3.3.1 with: path: nox.linux.${{ matrix.arch }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} # If we get a cache miss here it means the dependencies step failed to save the cache fail-on-cache-miss: true @@ -498,9 +500,7 @@ jobs: uses: actions/cache@v3.3.1 with: path: nox.macos.${{ matrix.arch }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} # If we get a cache miss here it means the dependencies step failed to save the cache fail-on-cache-miss: true @@ -705,9 +705,7 @@ jobs: uses: actions/cache@v3.3.1 with: path: nox.windows.${{ matrix.arch }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ matrix.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} # If we get a cache miss here it means the dependencies step failed to save the cache fail-on-cache-miss: true diff --git a/.github/workflows/test-packages-action-linux.yml b/.github/workflows/test-packages-action-linux.yml index 7b25c097e008..6a641b31f0bf 100644 --- a/.github/workflows/test-packages-action-linux.yml +++ b/.github/workflows/test-packages-action-linux.yml @@ -35,6 +35,10 @@ on: required: true type: string description: The nox version to install + nox-archive-hash: + required: true + type: string + description: Nox Tarball Cache Hash python-version: required: false type: string @@ -156,9 +160,7 @@ jobs: uses: actions/cache@v3.3.1 with: path: nox.linux.${{ inputs.arch }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|linux|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} # If we get a cache miss here it means the dependencies step failed to save the cache fail-on-cache-miss: true diff --git a/.github/workflows/test-packages-action-macos.yml b/.github/workflows/test-packages-action-macos.yml index 48d65e638e3c..6437acdf1d09 100644 --- a/.github/workflows/test-packages-action-macos.yml +++ b/.github/workflows/test-packages-action-macos.yml @@ -35,6 +35,10 @@ on: required: true type: string description: The nox version to install + nox-archive-hash: + required: true + type: string + description: Nox Tarball Cache Hash python-version: required: false type: string @@ -158,9 +162,7 @@ jobs: uses: actions/cache@v3.3.1 with: path: nox.macos.${{ inputs.arch }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|macos|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} # If we get a cache miss here it means the dependencies step failed to save the cache fail-on-cache-miss: true diff --git a/.github/workflows/test-packages-action-windows.yml b/.github/workflows/test-packages-action-windows.yml index 9e84c8906f15..7a15a681c95f 100644 --- a/.github/workflows/test-packages-action-windows.yml +++ b/.github/workflows/test-packages-action-windows.yml @@ -35,6 +35,10 @@ on: required: true type: string description: The nox version to install + nox-archive-hash: + required: true + type: string + description: Nox Tarball Cache Hash python-version: required: false type: string @@ -156,9 +160,7 @@ jobs: uses: actions/cache@v3.3.1 with: path: nox.windows.${{ inputs.arch }}.tar.* - key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ - hashFiles('requirements/**/*.txt', 'cicd/golden-images.json', 'noxfile.py') - }} + key: ${{ inputs.cache-prefix }}|testrun-deps|${{ inputs.arch }}|windows|${{ inputs.nox-session }}|${{ inputs.python-version }}|${{ inputs.nox-archive-hash }} # If we get a cache miss here it means the dependencies step failed to save the cache fail-on-cache-miss: true From 9940edbb3d7c23d9b3fefc11fe48774264a6d002 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 3 Jan 2024 20:23:20 +0000 Subject: [PATCH 54/60] Prefer GitHub hosted actions runners when generating the matrix Signed-off-by: Pedro Algarvio --- .github/workflows/test-action-linux.yml | 5 +---- .github/workflows/test-action-windows.yml | 5 +---- .github/workflows/test-packages-action-linux.yml | 5 +---- .github/workflows/test-packages-action-macos.yml | 5 +---- .github/workflows/test-packages-action-windows.yml | 5 +---- 5 files changed, 5 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test-action-linux.yml b/.github/workflows/test-action-linux.yml index 2626bb5fdf2a..522a10f71917 100644 --- a/.github/workflows/test-action-linux.yml +++ b/.github/workflows/test-action-linux.yml @@ -87,10 +87,7 @@ jobs: generate-matrix: name: Test Matrix - runs-on: - - self-hosted - - linux - - x86_64 + runs-on: ubuntu-latest outputs: matrix-include: ${{ steps.generate-matrix.outputs.matrix }} steps: diff --git a/.github/workflows/test-action-windows.yml b/.github/workflows/test-action-windows.yml index bdc944494f3f..e303a992ca26 100644 --- a/.github/workflows/test-action-windows.yml +++ b/.github/workflows/test-action-windows.yml @@ -87,10 +87,7 @@ jobs: generate-matrix: name: Test Matrix - runs-on: - - self-hosted - - linux - - x86_64 + runs-on: ubuntu-latest outputs: matrix-include: ${{ steps.generate-matrix.outputs.matrix }} steps: diff --git a/.github/workflows/test-packages-action-linux.yml b/.github/workflows/test-packages-action-linux.yml index 6a641b31f0bf..ee1e3d11fe0b 100644 --- a/.github/workflows/test-packages-action-linux.yml +++ b/.github/workflows/test-packages-action-linux.yml @@ -81,10 +81,7 @@ jobs: generate-matrix: name: Generate Matrix - runs-on: - - self-hosted - - linux - - x86_64 + runs-on: ubuntu-latest outputs: pkg-matrix-include: ${{ steps.generate-pkg-matrix.outputs.matrix }} steps: diff --git a/.github/workflows/test-packages-action-macos.yml b/.github/workflows/test-packages-action-macos.yml index 6437acdf1d09..09ae3a64b88b 100644 --- a/.github/workflows/test-packages-action-macos.yml +++ b/.github/workflows/test-packages-action-macos.yml @@ -74,10 +74,7 @@ jobs: generate-matrix: name: Generate Matrix - runs-on: - - self-hosted - - linux - - x86_64 + runs-on: ubuntu-latest outputs: pkg-matrix-include: ${{ steps.generate-pkg-matrix.outputs.matrix }} steps: diff --git a/.github/workflows/test-packages-action-windows.yml b/.github/workflows/test-packages-action-windows.yml index 7a15a681c95f..c8994f6e52c4 100644 --- a/.github/workflows/test-packages-action-windows.yml +++ b/.github/workflows/test-packages-action-windows.yml @@ -81,10 +81,7 @@ jobs: generate-matrix: name: Generate Matrix - runs-on: - - self-hosted - - linux - - x86_64 + runs-on: ubuntu-latest outputs: pkg-matrix-include: ${{ steps.generate-pkg-matrix.outputs.matrix }} steps: From f15fd875d81077984e352b59249cfbae8f3325c9 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 4 Jan 2024 06:27:54 +0000 Subject: [PATCH 55/60] Package tests matrix jobs need to run on our own runners Signed-off-by: Pedro Algarvio --- .github/workflows/test-packages-action-linux.yml | 7 ++++++- .github/workflows/test-packages-action-macos.yml | 7 ++++++- .github/workflows/test-packages-action-windows.yml | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-packages-action-linux.yml b/.github/workflows/test-packages-action-linux.yml index ee1e3d11fe0b..4d80c2ffa9ab 100644 --- a/.github/workflows/test-packages-action-linux.yml +++ b/.github/workflows/test-packages-action-linux.yml @@ -81,7 +81,12 @@ jobs: generate-matrix: name: Generate Matrix - runs-on: ubuntu-latest + runs-on: + # We need to run on our self-hosted runners because we need proper credentials + # for boto3 to scan through our repositories. + - self-hosted + - linux + - x86_64 outputs: pkg-matrix-include: ${{ steps.generate-pkg-matrix.outputs.matrix }} steps: diff --git a/.github/workflows/test-packages-action-macos.yml b/.github/workflows/test-packages-action-macos.yml index 09ae3a64b88b..af8ce9c4ade3 100644 --- a/.github/workflows/test-packages-action-macos.yml +++ b/.github/workflows/test-packages-action-macos.yml @@ -74,7 +74,12 @@ jobs: generate-matrix: name: Generate Matrix - runs-on: ubuntu-latest + runs-on: + # We need to run on our self-hosted runners because we need proper credentials + # for boto3 to scan through our repositories. + - self-hosted + - linux + - x86_64 outputs: pkg-matrix-include: ${{ steps.generate-pkg-matrix.outputs.matrix }} steps: diff --git a/.github/workflows/test-packages-action-windows.yml b/.github/workflows/test-packages-action-windows.yml index c8994f6e52c4..0855b48606c0 100644 --- a/.github/workflows/test-packages-action-windows.yml +++ b/.github/workflows/test-packages-action-windows.yml @@ -81,7 +81,12 @@ jobs: generate-matrix: name: Generate Matrix - runs-on: ubuntu-latest + runs-on: + # We need to run on our self-hosted runners because we need proper credentials + # for boto3 to scan through our repositories. + - self-hosted + - linux + - x86_64 outputs: pkg-matrix-include: ${{ steps.generate-pkg-matrix.outputs.matrix }} steps: From 7e4680536584aac5ae49fbdc248720935e3d5a75 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 4 Jan 2024 07:48:23 +0000 Subject: [PATCH 56/60] Revert "Use windows self hosted runners to build CI deps" This reverts commit f99055beb9cf867493a81ab9c60c4ce3c653b1f0. We would have to enable cross os caches(probably) --- .github/workflows/build-deps-ci-action.yml | 59 +++++++++++++++---- .../templates/build-deps-ci-action.yml.jinja | 59 +++++++++++++++---- 2 files changed, 92 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build-deps-ci-action.yml b/.github/workflows/build-deps-ci-action.yml index 3bb08e11b34a..6352797c9b11 100644 --- a/.github/workflows/build-deps-ci-action.yml +++ b/.github/workflows/build-deps-ci-action.yml @@ -247,7 +247,10 @@ jobs: windows-dependencies: name: Windows - runs-on: ${{ matrix.distro-slug }} + runs-on: + - self-hosted + - linux + - bastion timeout-minutes: 90 strategy: fail-fast: false @@ -260,7 +263,7 @@ jobs: - name: "Throttle Builds" shell: bash run: | - t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" + t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" - name: Checkout Source Code uses: actions/checkout@v4 @@ -287,34 +290,64 @@ jobs: cd artifacts tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.tar.xz - - name: Set up Python ${{ inputs.python-version }} + - name: PyPi Proxy if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - uses: actions/setup-python@v4 + run: | + sed -i '7s;^;--index-url=https://pypi-proxy.saltstack.net/root/local/+simple/ --extra-index-url=https://pypi.org/simple\n;' requirements/static/ci/*/*.txt + + - name: Setup Python Tools Scripts + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: ./.github/actions/setup-python-tools-scripts with: - python-version: "${{ inputs.python-version }}" + cache-prefix: ${{ inputs.cache-prefix }}-build-deps-ci - - name: Install Nox + - name: Get Salt Project GitHub Actions Bot Environment if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - python3 -m pip install 'nox==${{ inputs.nox-version }}' + TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30") + SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/tags/instance/spb:environment) + echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV" + + - name: Start VM + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + id: spin-up-vm + run: | + tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ matrix.distro-slug }} + + - name: List Free Space + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm ssh ${{ matrix.distro-slug }} -- df -h || true + + - name: Upload Checkout To VM + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm rsync ${{ matrix.distro-slug }} - name: Install Dependencies if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - env: - PRINT_TEST_SELECTION: "0" - PRINT_SYSTEM_INFO: "0" run: | - nox --install-only -e ${{ inputs.nox-session }} + tools --timestamps vm install-dependencies --nox-session=${{ inputs.nox-session }} ${{ matrix.distro-slug }} - name: Cleanup .nox Directory if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - nox --force-color -e "pre-archive-cleanup(pkg=False)" + tools --timestamps vm pre-archive-cleanup ${{ matrix.distro-slug }} - name: Compress .nox Directory if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - nox --force-color -e compress-dependencies -- windows ${{ matrix.arch }} + tools --timestamps vm compress-dependencies ${{ matrix.distro-slug }} + + - name: Download Compressed .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm download-dependencies ${{ matrix.distro-slug }} + + - name: Destroy VM + if: always() && steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm destroy --no-wait ${{ matrix.distro-slug }} - name: Upload Nox Requirements Tarball uses: actions/upload-artifact@v3 diff --git a/.github/workflows/templates/build-deps-ci-action.yml.jinja b/.github/workflows/templates/build-deps-ci-action.yml.jinja index dea23b61444b..e9c168331019 100644 --- a/.github/workflows/templates/build-deps-ci-action.yml.jinja +++ b/.github/workflows/templates/build-deps-ci-action.yml.jinja @@ -247,7 +247,10 @@ jobs: windows-dependencies: name: Windows - runs-on: ${{ matrix.distro-slug }} + runs-on: + - self-hosted + - linux + - bastion timeout-minutes: 90 strategy: fail-fast: false @@ -262,7 +265,7 @@ jobs: - name: "Throttle Builds" shell: bash run: | - t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t" + t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t" - name: Checkout Source Code uses: actions/checkout@v4 @@ -289,34 +292,64 @@ jobs: cd artifacts tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-windows-${{ matrix.arch }}.tar.xz - - name: Set up Python ${{ inputs.python-version }} + - name: PyPi Proxy if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - uses: actions/setup-python@v4 + run: | + sed -i '7s;^;--index-url=https://pypi-proxy.saltstack.net/root/local/+simple/ --extra-index-url=https://pypi.org/simple\n;' requirements/static/ci/*/*.txt + + - name: Setup Python Tools Scripts + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + uses: ./.github/actions/setup-python-tools-scripts with: - python-version: "${{ inputs.python-version }}" + cache-prefix: ${{ inputs.cache-prefix }}-build-deps-ci - - name: Install Nox + - name: Get Salt Project GitHub Actions Bot Environment if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - python3 -m pip install 'nox==${{ inputs.nox-version }}' + TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30") + SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/tags/instance/spb:environment) + echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV" + + - name: Start VM + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + id: spin-up-vm + run: | + tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ matrix.distro-slug }} + + - name: List Free Space + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm ssh ${{ matrix.distro-slug }} -- df -h || true + + - name: Upload Checkout To VM + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm rsync ${{ matrix.distro-slug }} - name: Install Dependencies if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - env: - PRINT_TEST_SELECTION: "0" - PRINT_SYSTEM_INFO: "0" run: | - nox --install-only -e ${{ inputs.nox-session }} + tools --timestamps vm install-dependencies --nox-session=${{ inputs.nox-session }} ${{ matrix.distro-slug }} - name: Cleanup .nox Directory if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - nox --force-color -e "pre-archive-cleanup(pkg=False)" + tools --timestamps vm pre-archive-cleanup ${{ matrix.distro-slug }} - name: Compress .nox Directory if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - nox --force-color -e compress-dependencies -- windows ${{ matrix.arch }} + tools --timestamps vm compress-dependencies ${{ matrix.distro-slug }} + + - name: Download Compressed .nox Directory + if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm download-dependencies ${{ matrix.distro-slug }} + + - name: Destroy VM + if: always() && steps.nox-dependencies-cache.outputs.cache-hit != 'true' + run: | + tools --timestamps vm destroy --no-wait ${{ matrix.distro-slug }} - name: Upload Nox Requirements Tarball uses: actions/upload-artifact@v3 From 77f231d3f1594e2602c630a0e03a7bfdfec7c512 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 4 Jan 2024 12:03:55 +0000 Subject: [PATCH 57/60] Bump to `actions/setup-python@v5` Signed-off-by: Pedro Algarvio --- .github/workflows/build-deps-ci-action.yml | 2 +- .github/workflows/build-deps-onedir.yml | 4 ++-- .github/workflows/build-packages.yml | 4 ++-- .github/workflows/build-salt-onedir.yml | 4 ++-- .github/workflows/ci.yml | 8 ++++---- .github/workflows/nightly.yml | 8 ++++---- .github/workflows/release-tag.yml | 2 +- .github/workflows/release-update-winrepo.yml | 2 +- .github/workflows/release-upload-virustotal.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/scheduled.yml | 8 ++++---- .github/workflows/staging.yml | 4 ++-- .../workflows/templates/build-deps-ci-action.yml.jinja | 2 +- .github/workflows/templates/ci.yml.jinja | 6 +++--- .github/workflows/templates/layout.yml.jinja | 2 +- .github/workflows/templates/release.yml.jinja | 2 +- .../templates/test-package-downloads-action.yml.jinja | 2 +- .github/workflows/test-action-macos.yml | 4 ++-- .github/workflows/test-package-downloads-action.yml | 2 +- .github/workflows/test-packages-action-macos.yml | 4 ++-- .github/workflows/triage.yml | 2 +- 21 files changed, 38 insertions(+), 38 deletions(-) diff --git a/.github/workflows/build-deps-ci-action.yml b/.github/workflows/build-deps-ci-action.yml index 6352797c9b11..fcdd9f377144 100644 --- a/.github/workflows/build-deps-ci-action.yml +++ b/.github/workflows/build-deps-ci-action.yml @@ -203,7 +203,7 @@ jobs: - name: Set up Python ${{ inputs.python-version }} if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "${{ inputs.python-version }}" diff --git a/.github/workflows/build-deps-onedir.yml b/.github/workflows/build-deps-onedir.yml index 0ad923060f10..d99fc0e24610 100644 --- a/.github/workflows/build-deps-onedir.yml +++ b/.github/workflows/build-deps-onedir.yml @@ -105,7 +105,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -153,7 +153,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index 266c9e064e6c..6e1ec435da03 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -84,7 +84,7 @@ jobs: fi - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: 3.11 @@ -387,7 +387,7 @@ jobs: fi - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: 3.11 diff --git a/.github/workflows/build-salt-onedir.yml b/.github/workflows/build-salt-onedir.yml index 9c0e2aa7da68..eb807bd7feda 100644 --- a/.github/workflows/build-salt-onedir.yml +++ b/.github/workflows/build-salt-onedir.yml @@ -110,7 +110,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -165,7 +165,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 446e868bebd7..e364ceeababb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -132,7 +132,7 @@ jobs: - *pkg_tests_added_modified - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -279,7 +279,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -399,7 +399,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -2062,7 +2062,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 55cda4e7425c..0ee70ea129bf 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -176,7 +176,7 @@ jobs: - *pkg_tests_added_modified - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -323,7 +323,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -448,7 +448,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -2119,7 +2119,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml index 85154bd59faf..66c16da7f973 100644 --- a/.github/workflows/release-tag.yml +++ b/.github/workflows/release-tag.yml @@ -54,7 +54,7 @@ jobs: custom_tag: ${{ github.event.inputs.saltVersion }} - name: Set up Python 3.8 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.8 diff --git a/.github/workflows/release-update-winrepo.yml b/.github/workflows/release-update-winrepo.yml index 7774657351c5..2c5630034b8a 100644 --- a/.github/workflows/release-update-winrepo.yml +++ b/.github/workflows/release-update-winrepo.yml @@ -34,7 +34,7 @@ jobs: repository: twangboy/salt-winrepo-ng - name: Set Up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/release-upload-virustotal.yml b/.github/workflows/release-upload-virustotal.yml index da13d83ca806..50e71594d50c 100644 --- a/.github/workflows/release-upload-virustotal.yml +++ b/.github/workflows/release-upload-virustotal.yml @@ -37,7 +37,7 @@ jobs: uses: actions/checkout@v4 - name: Set Up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 87ecb2cd3f05..3142598e49fb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,7 +65,7 @@ jobs: fetch-depth: 0 # Full clone to also get the tags to get the right salt version - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 00e1c1bbc90d..a63a121cdb5a 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -166,7 +166,7 @@ jobs: - *pkg_tests_added_modified - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -313,7 +313,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -433,7 +433,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -2096,7 +2096,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index d12a2d39529b..12773d45bcc6 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -162,7 +162,7 @@ jobs: - *pkg_tests_added_modified - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -438,7 +438,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/templates/build-deps-ci-action.yml.jinja b/.github/workflows/templates/build-deps-ci-action.yml.jinja index e9c168331019..100edcab7c4c 100644 --- a/.github/workflows/templates/build-deps-ci-action.yml.jinja +++ b/.github/workflows/templates/build-deps-ci-action.yml.jinja @@ -203,7 +203,7 @@ jobs: - name: Set up Python ${{ inputs.python-version }} if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "${{ inputs.python-version }}" diff --git a/.github/workflows/templates/ci.yml.jinja b/.github/workflows/templates/ci.yml.jinja index 8e71b9764766..6c28dc992aac 100644 --- a/.github/workflows/templates/ci.yml.jinja +++ b/.github/workflows/templates/ci.yml.jinja @@ -62,7 +62,7 @@ <%- if not prepare_actual_release %> - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -210,7 +210,7 @@ - uses: actions/checkout@v4 - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" @@ -313,7 +313,7 @@ - uses: actions/checkout@v4 - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/templates/layout.yml.jinja b/.github/workflows/templates/layout.yml.jinja index d448bd2e5a74..c8010fcded0c 100644 --- a/.github/workflows/templates/layout.yml.jinja +++ b/.github/workflows/templates/layout.yml.jinja @@ -180,7 +180,7 @@ jobs: - *pkg_tests_added_modified - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/templates/release.yml.jinja b/.github/workflows/templates/release.yml.jinja index 1417a7e93065..073a3c806774 100644 --- a/.github/workflows/templates/release.yml.jinja +++ b/.github/workflows/templates/release.yml.jinja @@ -93,7 +93,7 @@ permissions: fetch-depth: 0 # Full clone to also get the tags to get the right salt version - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/templates/test-package-downloads-action.yml.jinja b/.github/workflows/templates/test-package-downloads-action.yml.jinja index 2a5b83103646..4cb2802ce0b4 100644 --- a/.github/workflows/templates/test-package-downloads-action.yml.jinja +++ b/.github/workflows/templates/test-package-downloads-action.yml.jinja @@ -335,7 +335,7 @@ jobs: tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "${{ inputs.python-version }}" update-environment: true diff --git a/.github/workflows/test-action-macos.yml b/.github/workflows/test-action-macos.yml index e95df52b7cd8..baeaaa4206a0 100644 --- a/.github/workflows/test-action-macos.yml +++ b/.github/workflows/test-action-macos.yml @@ -158,7 +158,7 @@ jobs: fail-on-cache-miss: true - name: Set up Python ${{ inputs.gh-actions-python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "${{ inputs.gh-actions-python-version }}" @@ -406,7 +406,7 @@ jobs: tree -a artifacts - name: Set up Python ${{ inputs.gh-actions-python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "${{ inputs.gh-actions-python-version }}" diff --git a/.github/workflows/test-package-downloads-action.yml b/.github/workflows/test-package-downloads-action.yml index 12d3da43a968..ccc5ca7de19c 100644 --- a/.github/workflows/test-package-downloads-action.yml +++ b/.github/workflows/test-package-downloads-action.yml @@ -487,7 +487,7 @@ jobs: tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-macos-${{ matrix.arch }}.tar.xz - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "${{ inputs.python-version }}" update-environment: true diff --git a/.github/workflows/test-packages-action-macos.yml b/.github/workflows/test-packages-action-macos.yml index af8ce9c4ade3..2ebde6b0d7ce 100644 --- a/.github/workflows/test-packages-action-macos.yml +++ b/.github/workflows/test-packages-action-macos.yml @@ -152,7 +152,7 @@ jobs: tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "${{ inputs.python-version }}" @@ -251,7 +251,7 @@ jobs: tree -a artifacts - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "${{ inputs.python-version }}" diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index 7d0ad560116e..612460f6b563 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -28,7 +28,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.8 From 95c1cd00e0f3a791e9c16d3af92c809b98295b83 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 5 Jan 2024 11:43:55 +0000 Subject: [PATCH 58/60] Prefer github hosted runners in favor of self hosted runners for reports Signed-off-by: Pedro Algarvio --- .github/workflows/test-action-linux.yml | 5 +---- .github/workflows/test-action-windows.yml | 5 +---- .github/workflows/test-packages-action-linux.yml | 5 +---- .github/workflows/test-packages-action-windows.yml | 5 +---- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test-action-linux.yml b/.github/workflows/test-action-linux.yml index 522a10f71917..e6066e8b4508 100644 --- a/.github/workflows/test-action-linux.yml +++ b/.github/workflows/test-action-linux.yml @@ -338,10 +338,7 @@ jobs: report: name: Test Reports if: always() && inputs.skip-code-coverage == false && needs.test.result != 'cancelled' && needs.test.result != 'skipped' - runs-on: - - self-hosted - - linux - - x86_64 + runs-on: ubuntu-latest needs: - test diff --git a/.github/workflows/test-action-windows.yml b/.github/workflows/test-action-windows.yml index e303a992ca26..d89311148383 100644 --- a/.github/workflows/test-action-windows.yml +++ b/.github/workflows/test-action-windows.yml @@ -338,10 +338,7 @@ jobs: report: name: Test Reports if: always() && inputs.skip-code-coverage == false && needs.test.result != 'cancelled' && needs.test.result != 'skipped' - runs-on: - - self-hosted - - linux - - x86_64 + runs-on: ubuntu-latest needs: - test diff --git a/.github/workflows/test-packages-action-linux.yml b/.github/workflows/test-packages-action-linux.yml index 4d80c2ffa9ab..377410c820f6 100644 --- a/.github/workflows/test-packages-action-linux.yml +++ b/.github/workflows/test-packages-action-linux.yml @@ -240,10 +240,7 @@ jobs: report: name: Report - runs-on: - - self-hosted - - linux - - x86_64 + runs-on: ubuntu-latest if: always() && (inputs.skip-code-coverage == false || inputs.skip-junit-reports == false) && needs.test.result != 'cancelled' && needs.test.result != 'skipped' needs: - test diff --git a/.github/workflows/test-packages-action-windows.yml b/.github/workflows/test-packages-action-windows.yml index 0855b48606c0..5a9aaae7da31 100644 --- a/.github/workflows/test-packages-action-windows.yml +++ b/.github/workflows/test-packages-action-windows.yml @@ -240,10 +240,7 @@ jobs: report: name: Report - runs-on: - - self-hosted - - linux - - x86_64 + runs-on: ubuntu-latest if: always() && (inputs.skip-code-coverage == false || inputs.skip-junit-reports == false) && needs.test.result != 'cancelled' && needs.test.result != 'skipped' needs: - test From eee638e516a2674f150fa3da596c9ba4c940a0ce Mon Sep 17 00:00:00 2001 From: Shane Lee Date: Mon, 8 Jan 2024 13:00:23 -0700 Subject: [PATCH 59/60] Update bootstrap script in 3006.x branch --- salt/cloud/deploy/bootstrap-salt.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/salt/cloud/deploy/bootstrap-salt.sh b/salt/cloud/deploy/bootstrap-salt.sh index f66aeea3a8a2..c632146e44ae 100644 --- a/salt/cloud/deploy/bootstrap-salt.sh +++ b/salt/cloud/deploy/bootstrap-salt.sh @@ -23,7 +23,7 @@ #====================================================================================================================== set -o nounset # Treat unset variables as an error -__ScriptVersion="2023.11.07" +__ScriptVersion="2024.01.04" __ScriptName="bootstrap-salt.sh" __ScriptFullName="$0" @@ -596,6 +596,7 @@ fi echoinfo "Running version: ${__ScriptVersion}" echoinfo "Executed by: ${CALLER}" echoinfo "Command line: '${__ScriptFullName} ${__ScriptArgs}'" +echowarn "Running the unstable version of ${__ScriptName}" # Define installation type if [ "$#" -gt 0 ];then @@ -1521,9 +1522,9 @@ __check_dpkg_architecture() { if [ "$_CUSTOM_REPO_URL" != "null" ]; then warn_msg="Support for arm64 is experimental, make sure the custom repository used has the expected structure and contents." else - # Saltstack official repository has arm64 metadata beginning with Debian 11, + # Saltstack official repository has arm64 metadata beginning with Debian 10, # use amd64 repositories on arm64 for anything older, since all pkgs are arch-independent - if [ "$DISTRO_NAME_L" = "debian" ] && [ "$DISTRO_MAJOR_VERSION" -lt 11 ]; then + if [ "$DISTRO_NAME_L" = "debian" ] && [ "$DISTRO_MAJOR_VERSION" -lt 10 ]; then __REPO_ARCH="amd64" else __REPO_ARCH="arm64" From ae64971701dce0d1b7ed5cd5d5c046ed3b96e7df Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 9 Jan 2024 14:25:56 +0000 Subject: [PATCH 60/60] Remove unnecessary workflow steps while still showing the information Signed-off-by: Pedro Algarvio --- .github/workflows/ci.yml | 6 -- .github/workflows/nightly.yml | 6 -- .github/workflows/release.yml | 5 -- .github/workflows/scheduled.yml | 6 -- .github/workflows/staging.yml | 6 -- .github/workflows/templates/layout.yml.jinja | 6 -- .github/workflows/templates/release.yml.jinja | 5 -- tools/ci.py | 66 +++++++++---------- 8 files changed, 30 insertions(+), 76 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e364ceeababb..9409808161e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -221,12 +221,6 @@ jobs: run: | tools ci get-testing-releases ${{ join(fromJSON(steps.get-salt-releases.outputs.releases), ' ') }} --salt-version ${{ steps.setup-salt-version.outputs.salt-version }} - - name: Check Salt Releases - run: | - echo '${{ steps.get-salt-releases.outputs.latest-release }}' | jq -C '.' - echo '${{ steps.get-salt-releases.outputs.releases }}' | jq -C '.' - echo '${{ steps.get-testing-releases.outputs.testing-releases }}' | jq -C '.' - - name: Define Testrun id: define-testrun run: | diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 0ee70ea129bf..cddac63041d7 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -265,12 +265,6 @@ jobs: run: | tools ci get-testing-releases ${{ join(fromJSON(steps.get-salt-releases.outputs.releases), ' ') }} --salt-version ${{ steps.setup-salt-version.outputs.salt-version }} - - name: Check Salt Releases - run: | - echo '${{ steps.get-salt-releases.outputs.latest-release }}' | jq -C '.' - echo '${{ steps.get-salt-releases.outputs.releases }}' | jq -C '.' - echo '${{ steps.get-testing-releases.outputs.testing-releases }}' | jq -C '.' - - name: Define Testrun id: define-testrun run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3142598e49fb..9c624505c342 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -107,11 +107,6 @@ jobs: run: | tools ci get-releases - - name: Check Salt Releases - run: | - echo '${{ steps.get-salt-releases.outputs.latest-release }}' | jq -C '.' - echo '${{ steps.get-salt-releases.outputs.releases }}' | jq -C '.' - - name: Set Cache Seed Output id: set-cache-seed run: | diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index a63a121cdb5a..50c3e43ee3cc 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -255,12 +255,6 @@ jobs: run: | tools ci get-testing-releases ${{ join(fromJSON(steps.get-salt-releases.outputs.releases), ' ') }} --salt-version ${{ steps.setup-salt-version.outputs.salt-version }} - - name: Check Salt Releases - run: | - echo '${{ steps.get-salt-releases.outputs.latest-release }}' | jq -C '.' - echo '${{ steps.get-salt-releases.outputs.releases }}' | jq -C '.' - echo '${{ steps.get-testing-releases.outputs.testing-releases }}' | jq -C '.' - - name: Define Testrun id: define-testrun run: | diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 12773d45bcc6..f864c0537cc2 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -260,12 +260,6 @@ jobs: run: | tools ci get-testing-releases ${{ join(fromJSON(steps.get-salt-releases.outputs.releases), ' ') }} --salt-version ${{ steps.setup-salt-version.outputs.salt-version }} - - name: Check Salt Releases - run: | - echo '${{ steps.get-salt-releases.outputs.latest-release }}' | jq -C '.' - echo '${{ steps.get-salt-releases.outputs.releases }}' | jq -C '.' - echo '${{ steps.get-testing-releases.outputs.testing-releases }}' | jq -C '.' - - name: Define Testrun id: define-testrun run: | diff --git a/.github/workflows/templates/layout.yml.jinja b/.github/workflows/templates/layout.yml.jinja index c8010fcded0c..6f2f9b18e997 100644 --- a/.github/workflows/templates/layout.yml.jinja +++ b/.github/workflows/templates/layout.yml.jinja @@ -285,12 +285,6 @@ jobs: run: | tools ci get-testing-releases ${{ join(fromJSON(steps.get-salt-releases.outputs.releases), ' ') }} --salt-version ${{ steps.setup-salt-version.outputs.salt-version }} - - name: Check Salt Releases - run: | - echo '${{ steps.get-salt-releases.outputs.latest-release }}' | jq -C '.' - echo '${{ steps.get-salt-releases.outputs.releases }}' | jq -C '.' - echo '${{ steps.get-testing-releases.outputs.testing-releases }}' | jq -C '.' - - name: Define Testrun id: define-testrun run: | diff --git a/.github/workflows/templates/release.yml.jinja b/.github/workflows/templates/release.yml.jinja index 073a3c806774..704e2ec940b7 100644 --- a/.github/workflows/templates/release.yml.jinja +++ b/.github/workflows/templates/release.yml.jinja @@ -135,11 +135,6 @@ permissions: run: | tools ci get-releases - - name: Check Salt Releases - run: | - echo '${{ steps.get-salt-releases.outputs.latest-release }}' | jq -C '.' - echo '${{ steps.get-salt-releases.outputs.releases }}' | jq -C '.' - - name: Set Cache Seed Output id: set-cache-seed run: | diff --git a/tools/ci.py b/tools/ci.py index e4ef802d9f24..6b3a7e7064e5 100644 --- a/tools/ci.py +++ b/tools/ci.py @@ -891,15 +891,15 @@ def get_releases(ctx: Context, repository: str = "saltstack/salt"): """ Generate the latest salt release. """ - github_output = os.environ.get("GITHUB_OUTPUT") + releases = tools.utils.get_salt_releases(ctx, repository) + str_releases = [str(version) for version in releases] + latest = str_releases[-1] - if github_output is None: - ctx.exit(1, "The 'GITHUB_OUTPUT' variable is not set.") - else: - releases = tools.utils.get_salt_releases(ctx, repository) - str_releases = [str(version) for version in releases] - latest = str_releases[-1] + ctx.info("Releases:", sorted(str_releases)) + ctx.info(f"Latest Release: '{latest}'") + github_output = os.environ.get("GITHUB_OUTPUT") + if github_output is not None: with open(github_output, "a", encoding="utf-8") as wfh: wfh.write(f"latest-release={latest}\n") wfh.write(f"releases={json.dumps(str_releases)}\n") @@ -1035,40 +1035,34 @@ def get_testing_releases( """ Get a list of releases to use for the upgrade and downgrade tests. """ - github_output = os.environ.get("GITHUB_OUTPUT") - if github_output is None: - ctx.exit(1, "The 'GITHUB_OUTPUT' variable is not set.") - else: - # We aren't testing upgrades from anything before 3006.0 except the latest 3005.x - threshold_major = 3005 - parsed_salt_version = tools.utils.Version(salt_version) - # We want the latest 4 major versions, removing the oldest if this version is a new major - num_major_versions = 4 - if parsed_salt_version.minor == 0: - num_major_versions = 3 - majors = sorted( - list( - { - version.major - for version in releases - if version.major >= threshold_major - } - ) - )[-num_major_versions:] - testing_releases = [] - # Append the latest minor for each major - for major in majors: - minors_of_major = [ - version for version in releases if version.major == major - ] - testing_releases.append(minors_of_major[-1]) + # We aren't testing upgrades from anything before 3006.0 except the latest 3005.x + threshold_major = 3005 + parsed_salt_version = tools.utils.Version(salt_version) + # We want the latest 4 major versions, removing the oldest if this version is a new major + num_major_versions = 4 + if parsed_salt_version.minor == 0: + num_major_versions = 3 + majors = sorted( + list( + {version.major for version in releases if version.major >= threshold_major} + ) + )[-num_major_versions:] + testing_releases = [] + # Append the latest minor for each major + for major in majors: + minors_of_major = [version for version in releases if version.major == major] + testing_releases.append(minors_of_major[-1]) - str_releases = [str(version) for version in testing_releases] + str_releases = [str(version) for version in testing_releases] + ctx.info("Testing Releases:", sorted(str_releases)) + + github_output = os.environ.get("GITHUB_OUTPUT") + if github_output is not None: with open(github_output, "a", encoding="utf-8") as wfh: wfh.write(f"testing-releases={json.dumps(str_releases)}\n") - ctx.exit(0) + ctx.exit(0) @ci.command(