Pārlūkot izejas kodu

Adjusting ORAS cache location, runners (#5129)

* Move packages to new location
* Adjust build runners
* Switch to OS

Signed-off-by: Igor <igor@armbian.com>
---------

Signed-off-by: Igor <igor@armbian.com>
Co-authored-by: Ricardo Pardini <ricardo@pardini.net>
igorpecovnik 2 gadi atpakaļ
vecāks
revīzija
ba1a84a5e8

+ 1 - 0
.gitignore

@@ -22,6 +22,7 @@ ubuntu-*-cloudimg-console.log
 .DS_Store
 *~
 *.swp
+/__pycache__/*
 
 # Mainly generated by merge tools like 'meld'
 *.orig

+ 0 - 0
config/boards/bananapir2.csc → config/boards/bananapir2.eos


+ 0 - 0
config/boards/macchiatobin-doubleshot.csc → config/boards/macchiatobin-doubleshot.eos


+ 1 - 1
lib/functions/artifacts/artifact-armbian-bsp-cli.sh

@@ -125,7 +125,7 @@ function artifact_armbian-bsp-cli_cli_adapter_config_prep() {
 }
 
 function artifact_armbian-bsp-cli_get_default_oci_target() {
-	artifact_oci_target_base="${GHCR_SOURCE}/armbian/cache-packages/"
+	artifact_oci_target_base="${GHCR_SOURCE}/armbian/os/"
 }
 
 function artifact_armbian-bsp-cli_is_available_in_local_cache() {

+ 1 - 1
lib/functions/artifacts/artifact-armbian-bsp-desktop.sh

@@ -93,7 +93,7 @@ function artifact_armbian-bsp-desktop_cli_adapter_config_prep() {
 }
 
 function artifact_armbian-bsp-desktop_get_default_oci_target() {
-	artifact_oci_target_base="${GHCR_SOURCE}/armbian/cache-packages/"
+	artifact_oci_target_base="${GHCR_SOURCE}/armbian/os/"
 }
 
 function artifact_armbian-bsp-desktop_is_available_in_local_cache() {

+ 1 - 1
lib/functions/artifacts/artifact-armbian-config.sh

@@ -82,7 +82,7 @@ function artifact_armbian-config_cli_adapter_config_prep() {
 }
 
 function artifact_armbian-config_get_default_oci_target() {
-	artifact_oci_target_base="${GHCR_SOURCE}/armbian/cache-packages/"
+	artifact_oci_target_base="${GHCR_SOURCE}/armbian/os/"
 }
 
 function artifact_armbian-config_is_available_in_local_cache() {

+ 1 - 1
lib/functions/artifacts/artifact-armbian-desktop.sh

@@ -92,7 +92,7 @@ function artifact_armbian-desktop_cli_adapter_config_prep() {
 }
 
 function artifact_armbian-desktop_get_default_oci_target() {
-	artifact_oci_target_base="${GHCR_SOURCE}/armbian/cache-packages/"
+	artifact_oci_target_base="${GHCR_SOURCE}/armbian/os/"
 }
 
 function artifact_armbian-desktop_is_available_in_local_cache() {

+ 1 - 1
lib/functions/artifacts/artifact-armbian-plymouth-theme.sh

@@ -68,7 +68,7 @@ function artifact_armbian-plymouth-theme_cli_adapter_config_prep() {
 }
 
 function artifact_armbian-plymouth-theme_get_default_oci_target() {
-	artifact_oci_target_base="${GHCR_SOURCE}/armbian/cache-packages/"
+	artifact_oci_target_base="${GHCR_SOURCE}/armbian/os/"
 }
 
 function artifact_armbian-plymouth-theme_is_available_in_local_cache() {

+ 1 - 1
lib/functions/artifacts/artifact-armbian-zsh.sh

@@ -83,7 +83,7 @@ function artifact_armbian-zsh_cli_adapter_config_prep() {
 }
 
 function artifact_armbian-zsh_get_default_oci_target() {
-	artifact_oci_target_base="${GHCR_SOURCE}/armbian/cache-packages/"
+	artifact_oci_target_base="${GHCR_SOURCE}/armbian/os/"
 }
 
 function artifact_armbian-zsh_is_available_in_local_cache() {

+ 1 - 1
lib/functions/artifacts/artifact-fake-ubuntu-advantage-tools.sh

@@ -68,7 +68,7 @@ function artifact_fake_ubuntu_advantage_tools_cli_adapter_config_prep() {
 }
 
 function artifact_fake_ubuntu_advantage_tools_get_default_oci_target() {
-	artifact_oci_target_base="${GHCR_SOURCE}/armbian/cache-packages/"
+	artifact_oci_target_base="${GHCR_SOURCE}/armbian/os/"
 }
 
 function artifact_fake_ubuntu_advantage_tools_is_available_in_local_cache() {

+ 1 - 1
lib/functions/artifacts/artifact-firmware.sh

@@ -83,7 +83,7 @@ function artifact_firmware_cli_adapter_config_prep() {
 }
 
 function artifact_firmware_get_default_oci_target() {
-	artifact_oci_target_base="${GHCR_SOURCE}/armbian/cache-firmware/"
+	artifact_oci_target_base="${GHCR_SOURCE}/armbian/os/"
 }
 
 function artifact_firmware_is_available_in_local_cache() {

+ 1 - 1
lib/functions/artifacts/artifact-full_firmware.sh

@@ -94,7 +94,7 @@ function artifact_full_firmware_cli_adapter_config_prep() {
 }
 
 function artifact_full_firmware_get_default_oci_target() {
-	artifact_oci_target_base="${GHCR_SOURCE}/armbian/cache-firmware/"
+	artifact_oci_target_base="${GHCR_SOURCE}/armbian/os/"
 }
 
 function artifact_full_firmware_is_available_in_local_cache() {

+ 1 - 1
lib/functions/artifacts/artifact-kernel.sh

@@ -236,7 +236,7 @@ function artifact_kernel_cli_adapter_config_prep() {
 }
 
 function artifact_kernel_get_default_oci_target() {
-	artifact_oci_target_base="${GHCR_SOURCE}/armbian/cache-kernel/"
+	artifact_oci_target_base="${GHCR_SOURCE}/armbian/os/"
 }
 
 function artifact_kernel_is_available_in_local_cache() {

+ 1 - 1
lib/functions/artifacts/artifact-rootfs.sh

@@ -143,7 +143,7 @@ function artifact_rootfs_cli_adapter_config_prep() {
 }
 
 function artifact_rootfs_get_default_oci_target() {
-	artifact_oci_target_base="${GHCR_SOURCE}/armbian/cache-root/"
+	artifact_oci_target_base="${GHCR_SOURCE}/armbian/os/"
 }
 
 function artifact_rootfs_is_available_in_local_cache() {

+ 1 - 1
lib/functions/artifacts/artifact-uboot.sh

@@ -173,7 +173,7 @@ function artifact_uboot_cli_adapter_config_prep() {
 }
 
 function artifact_uboot_get_default_oci_target() {
-	artifact_oci_target_base="${GHCR_SOURCE}/armbian/cache-uboot/"
+	artifact_oci_target_base="${GHCR_SOURCE}/armbian/os/"
 }
 
 function artifact_uboot_is_available_in_local_cache() {

+ 4 - 4
lib/tools/info/output-gha-matrix.py

@@ -41,7 +41,7 @@ def generate_matrix_images(info) -> list[dict]:
 		runs_on = "ubuntu-latest"
 		image_arch = image['out']['ARCH']
 		if image_arch in ["arm64"]:  # , "armhf"
-			runs_on = ["self-hosted", "Linux", 'armbian', f"image-{image_arch}"]
+			runs_on = ["self-hosted", "Linux", f"image-{image_arch}"]
 
 		inputs = image['in']
 		cmds = (armbian_utils.map_to_armbian_params(inputs["vars"]) + inputs["configs"])  # image build is "build" command, omitted here
@@ -66,7 +66,7 @@ def generate_matrix_artifacts(info):
 		desc = f"{artifact['out']['artifact_final_file_basename']}"
 
 		# runs_in = ["self-hosted", "Linux", 'armbian', f"artifact-{artifact_name}"]
-		runs_on = "ubuntu-latest"
+		runs_on = "fast"
 
 		# @TODO: externalize this logic.
 
@@ -74,11 +74,11 @@ def generate_matrix_artifacts(info):
 		if artifact_name in ["rootfs"]:
 			rootfs_arch = artifact['in']['inputs']['ARCH']  # @TODO we should resolve arch _much_ ealier in the pipeline and make it standard
 			if rootfs_arch in ["arm64"]:  # (future: add armhf)
-				runs_on = ["self-hosted", "Linux", 'armbian', f"rootfs-{rootfs_arch}"]
+				runs_on = ["self-hosted", "Linux", f"rootfs-{rootfs_arch}"]
 
 		# all kernels are built on self-hosted runners.
 		if artifact_name in ["kernel"]:
-			runs_on = ["self-hosted", "Linux", 'armbian', f"artifact-{artifact_name}"]
+			runs_on = ["self-hosted", "Linux", 'alfa']
 
 		inputs = artifact['in']['original_inputs']
 		cmds = (["artifact"] + armbian_utils.map_to_armbian_params(inputs["vars"]) + inputs["configs"])

+ 6 - 7
lib/tools/info/output-gha-workflow.py

@@ -110,7 +110,7 @@ wfFactory: gha.WorkflowFactory = gha.WorkflowFactory()
 
 # Create prepare job
 pJob: PrepareJob = PrepareJob(f"prepare", f"prepare all")
-pJob.set_runs_on(["self-hosted", "Linux", 'armbian', "matrix-prepare"])  # @TODO: de-hardcode?
+pJob.set_runs_on(["self-hosted", "Linux", "matrix-prepare"])  # @TODO: de-hardcode?
 pJob.add_initial_checkout()
 pJob.add_cache_restore_step()
 
@@ -139,7 +139,7 @@ for artifact_id in info["artifacts"]:
 	desc = f"{artifact['out']['artifact_name']}"
 
 	# runs_in = ["self-hosted", "Linux", 'armbian', f"artifact-{artifact_name}"]
-	runs_on = "ubuntu-latest"
+	runs_on = "fast"
 
 	# @TODO: externalize this logic.
 
@@ -147,11 +147,11 @@ for artifact_id in info["artifacts"]:
 	if artifact_name in ["rootfs"]:
 		rootfs_arch = artifact['in']['inputs']['ARCH']  # @TODO we should resolve arch _much_ ealier in the pipeline and make it standard
 		if rootfs_arch in ["arm64"]:  # (future: add armhf)
-			runs_on = ["self-hosted", "Linux", 'armbian', f"rootfs-{rootfs_arch}"]
+			runs_on = ["self-hosted", "Linux", f"rootfs-{rootfs_arch}"]
 
 	# all kernels are built on self-hosted runners.
 	if artifact_name in ["kernel"]:
-		runs_on = ["self-hosted", "Linux", 'armbian', f"artifact-{artifact_name}"]
+		runs_on = ["self-hosted", "Linux", "alfa"]
 
 	inputs = artifact['in']['original_inputs']
 	cmds = (["artifact"] + armbian_utils.map_to_armbian_params(inputs["vars"]) + inputs["configs"])
@@ -189,11 +189,10 @@ for image_id in info["images"]:
 	#	continue
 
 	desc = f"{image['image_file_id']} {image_id}"
-
-	runs_on = "ubuntu-latest"
+	runs_on = "fast"
 	image_arch = image['out']['ARCH']
 	if image_arch in ["arm64"]:  # , "armhf"
-		runs_on = ["self-hosted", "Linux", 'armbian', f"image-{image_arch}"]
+		runs_on = ["self-hosted", "Linux", f"image-{image_arch}"]
 
 	inputs = image['in']
 	cmds = (armbian_utils.map_to_armbian_params(inputs["vars"]) + inputs["configs"])  # image build is "build" command, omitted here