Skip to content

Commit

Permalink
[kvm] arm64 base image
Browse files Browse the repository at this point in the history
  • Loading branch information
fffonion authored and Water-Melon committed Jul 17, 2024
1 parent 66524eb commit 7db819f
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 63 deletions.
4 changes: 0 additions & 4 deletions images/macos/scripts/tests/Rust.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,5 @@ Describe "Rust" -Skip:($os.IsBigSur) {
It "Cargo audit" {
"cargo audit --version" | Should -ReturnZeroExitCode
}

It "Cargo outdated" {
"cargo outdated --version" | Should -ReturnZeroExitCode
}
}
}
6 changes: 3 additions & 3 deletions images/ubuntu/scripts/build/golang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ for TOOLSET_VERSION in ${TOOLSET_VERSIONS[@]}; do

echo "Downloading tar archive $PACKAGE_TAR_NAME"
DOWNLOAD_URL="https://go.dev/dl/${PACKAGE_TAR_NAME}"
download_with_retries $DOWNLOAD_URL "/tmp" $PACKAGE_TAR_NAME
archive_path=$(download_with_retry $DOWNLOAD_URL)

echo "Expand '$PACKAGE_TAR_NAME' to the '$GOLANG_VERSION_PATH' folder"
tar xf "/tmp/$PACKAGE_TAR_NAME" -C $GOLANG_VERSION_PATH --strip-components=1
echo "Expand '$archive_path' to the '$GOLANG_VERSION_PATH' folder"
tar xf "$archive_path" -C $GOLANG_VERSION_PATH --strip-components=1

COMPLETE_FILE_PATH="$GOLANG_VERSION_PATH/../$arch.complete"
if [ ! -f $COMPLETE_FILE_PATH ]; then
Expand Down
2 changes: 1 addition & 1 deletion images/ubuntu/scripts/build/install-rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ source $CARGO_HOME/env
rustup component add rustfmt clippy

if is_ubuntu22; then
cargo install bindgen-cli cbindgen cargo-audit cargo-outdated
cargo install bindgen-cli cbindgen cargo-audit
fi

if is_ubuntu20; then
Expand Down
6 changes: 3 additions & 3 deletions images/ubuntu/scripts/build/nodejs-hostedtoolscache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ for TOOLSET_VERSION in ${TOOLSET_VERSIONS[@]}; do

echo "Downloading tar archive $PACKAGE_TAR_NAME"
DOWNLOAD_URL="https://nodejs.org/dist/v$NODEJS_VERSION/$PACKAGE_TAR_NAME"
download_with_retries $DOWNLOAD_URL "/tmp" $PACKAGE_TAR_NAME
archive_path=$(download_with_retry $DOWNLOAD_URL)

echo "Expand '$PACKAGE_TAR_NAME' to the '$NODEJS_VERSION_PATH' folder"
tar xf "/tmp/$PACKAGE_TAR_NAME" -C $NODEJS_VERSION_PATH --strip-components=1
echo "Expand '$archive_path' to the '$NODEJS_VERSION_PATH' folder"
tar xf "$archive_path" -C $NODEJS_VERSION_PATH --strip-components=1

COMPLETE_FILE_PATH="$NODEJS_VERSION_PATH/../$arch.complete"
if [ ! -f $COMPLETE_FILE_PATH ]; then
Expand Down
4 changes: 0 additions & 4 deletions images/ubuntu/scripts/tests/Tools.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ Describe "Rust" {
It "Cargo audit" {
"cargo audit --version" | Should -ReturnZeroExitCode
}

It "Cargo outdated" {
"cargo outdated --version" | Should -ReturnZeroExitCode
}
}
}

Expand Down
92 changes: 51 additions & 41 deletions images/ubuntu/templates/ubuntu-22.04.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -190,17 +190,23 @@ source "qemu" "custom_image" {
http_directory = "cloud-init"
#iso_url = "https://releases.ubuntu.com/22.04.1/${var.ubuntu_iso_file}"
#iso_checksum = "file:https://releases.ubuntu.com/22.04.1/SHA256SUMS"
iso_url = "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img"
iso_url = "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-arm64.img"
iso_checksum = "file:https://cloud-images.ubuntu.com/jammy/current/SHA256SUMS"
disk_image = true

qemu_binary = "qemu-system-aarch64"

qemuargs = [
["-pflash", "/usr/share/AAVMF/AAVMF_CODE.fd"],
["-pflash", "flash1.img"],
["-cpu", "host"],
["-smbios",
"type=1,serial=ds=nocloud-net;instance-id=packer;seedfrom=http://{{ .HTTPIP }}:{{ .HTTPPort }}/",
]
],
]

machine_type = "virt"

ssh_password = "ubuntu"
ssh_username = "ubuntu"
ssh_timeout = "10m" # can be slow on CI
Expand Down Expand Up @@ -324,61 +330,63 @@ build {
"${path.root}/../scripts/build/install-actions-cache.sh",
"${path.root}/../scripts/build/install-runner-package.sh",
"${path.root}/../scripts/build/install-apt-common.sh",
"${path.root}/../scripts/build/install-azcopy.sh",
"${path.root}/../scripts/build/install-azure-cli.sh",
"${path.root}/../scripts/build/install-azure-devops-cli.sh",
"${path.root}/../scripts/build/install-bicep.sh",
"${path.root}/../scripts/build/install-aliyun-cli.sh",
"${path.root}/../scripts/build/install-apache.sh",
"${path.root}/../scripts/build/install-aws-tools.sh",
// "${path.root}/../scripts/build/install-azcopy.sh",
// "${path.root}/../scripts/build/install-azure-cli.sh",
// "${path.root}/../scripts/build/install-azure-devops-cli.sh",
// "${path.root}/../scripts/build/install-bicep.sh",
// "${path.root}/../scripts/build/install-aliyun-cli.sh",
// "${path.root}/../scripts/build/install-apache.sh",
// "${path.root}/../scripts/build/install-aws-tools.sh",
"${path.root}/../scripts/build/install-clang.sh",
"${path.root}/../scripts/build/install-swift.sh",
// "${path.root}/../scripts/build/install-swift.sh",
"${path.root}/../scripts/build/install-cmake.sh",
"${path.root}/../scripts/build/install-codeql-bundle.sh",
// "${path.root}/../scripts/build/install-codeql-bundle.sh",
"${path.root}/../scripts/build/install-container-tools.sh",
"${path.root}/../scripts/build/install-dotnetcore-sdk.sh",
"${path.root}/../scripts/build/install-firefox.sh",
"${path.root}/../scripts/build/install-microsoft-edge.sh",
// UNSUPPORTED "${path.root}/../scripts/build/install-microsoft-edge.sh",
"${path.root}/../scripts/build/install-gcc-compilers.sh",
"${path.root}/../scripts/build/install-gfortran.sh",
"${path.root}/../scripts/build/install-git.sh",
"${path.root}/../scripts/build/install-git-lfs.sh",
"${path.root}/../scripts/build/install-github-cli.sh",
"${path.root}/../scripts/build/install-google-chrome.sh",
"${path.root}/../scripts/build/install-google-cloud-cli.sh",
"${path.root}/../scripts/build/install-haskell.sh",
"${path.root}/../scripts/build/install-heroku.sh",
"${path.root}/../scripts/build/golang.sh",
// UNSUPPORTED "${path.root}/../scripts/build/install-google-chrome.sh",
// "${path.root}/../scripts/build/install-google-cloud-cli.sh",
// "${path.root}/../scripts/build/install-haskell.sh",
// "${path.root}/../scripts/build/install-heroku.sh",
"${path.root}/../scripts/build/install-java-tools.sh",
"${path.root}/../scripts/build/install-kubernetes-tools.sh",
"${path.root}/../scripts/build/install-oc-cli.sh",
"${path.root}/../scripts/build/install-leiningen.sh",
"${path.root}/../scripts/build/install-miniconda.sh",
// "${path.root}/../scripts/build/install-oc-cli.sh",
// "${path.root}/../scripts/build/install-leiningen.sh",
// "${path.root}/../scripts/build/install-miniconda.sh",
"${path.root}/../scripts/build/install-mono.sh",
"${path.root}/../scripts/build/install-kotlin.sh",
// "${path.root}/../scripts/build/install-kotlin.sh",
"${path.root}/../scripts/build/install-mysql.sh",
"${path.root}/../scripts/build/install-mssql-tools.sh",
"${path.root}/../scripts/build/install-sqlpackage.sh",
// "${path.root}/../scripts/build/install-mssql-tools.sh",
// "${path.root}/../scripts/build/install-sqlpackage.sh",
"${path.root}/../scripts/build/install-nginx.sh",
"${path.root}/../scripts/build/install-nvm.sh",
"${path.root}/../scripts/build/install-nodejs.sh",
"${path.root}/../scripts/build/nodejs-hostedtoolscache.sh",
"${path.root}/../scripts/build/install-bazel.sh",
"${path.root}/../scripts/build/install-oras-cli.sh",
// "${path.root}/../scripts/build/install-oras-cli.sh",
"${path.root}/../scripts/build/install-php.sh",
"${path.root}/../scripts/build/install-postgresql.sh",
"${path.root}/../scripts/build/install-pulumi.sh",
// "${path.root}/../scripts/build/install-pulumi.sh",
"${path.root}/../scripts/build/install-ruby.sh",
"${path.root}/../scripts/build/install-rlang.sh",
// "${path.root}/../scripts/build/install-rlang.sh",
"${path.root}/../scripts/build/install-rust.sh",
"${path.root}/../scripts/build/install-julia.sh",
"${path.root}/../scripts/build/install-sbt.sh",
// APT DEPENDENCY BROKEN "${path.root}/../scripts/build/install-julia.sh",
// "${path.root}/../scripts/build/install-sbt.sh",
"${path.root}/../scripts/build/install-selenium.sh",
"${path.root}/../scripts/build/install-terraform.sh",
"${path.root}/../scripts/build/install-packer.sh",
"${path.root}/../scripts/build/install-vcpkg.sh",
"${path.root}/../scripts/build/configure-dpkg.sh",
// "${path.root}/../scripts/build/install-vcpkg.sh",
// path.root}/../scripts/build/configure-dpkg.sh",
"${path.root}/../scripts/build/install-yq.sh",
"${path.root}/../scripts/build/install-android-sdk.sh",
"${path.root}/../scripts/build/install-pypy.sh",
// "${path.root}/../scripts/build/install-android-sdk.sh",
// "${path.root}/../scripts/build/install-pypy.sh",
"${path.root}/../scripts/build/install-python.sh",
"${path.root}/../scripts/build/install-zstd.sh"
]
Expand All @@ -390,23 +398,25 @@ build {
scripts = ["${path.root}/../scripts/build/install-docker-compose.sh", "${path.root}/../scripts/build/install-docker.sh"]
}

provisioner "shell" {
environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}"]
execute_command = "sudo sh -c '{{ .Vars }} pwsh -f {{ .Path }}'"
scripts = ["${path.root}/../scripts/build/Install-Toolset.ps1", "${path.root}/../scripts/build/Configure-Toolset.ps1"]
}
// UNSUPPORTED
// provisioner "shell" {
// environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}"]
// execute_command = "sudo sh -c '{{ .Vars }} pwsh -f {{ .Path }}'"
// scripts = ["${path.root}/../scripts/build/Install-Toolset.ps1", "${path.root}/../scripts/build/Configure-Toolset.ps1"]
// }

provisioner "shell" {
environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}"]
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
scripts = ["${path.root}/../scripts/build/install-pipx-packages.sh"]
}

provisioner "shell" {
environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "DEBIAN_FRONTEND=noninteractive", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}"]
execute_command = "/bin/sh -c '{{ .Vars }} {{ .Path }}'"
scripts = ["${path.root}/../scripts/build/install-homebrew.sh"]
}
// UNSUPPORTED
// provisioner "shell" {
// environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "DEBIAN_FRONTEND=noninteractive", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}"]
// execute_command = "/bin/sh -c '{{ .Vars }} {{ .Path }}'"
// scripts = ["${path.root}/../scripts/build/install-homebrew.sh"]
// }

provisioner "shell" {
environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}"]
Expand Down
12 changes: 5 additions & 7 deletions images/ubuntu/toolsets/toolset-2204.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,12 @@
{
"plugin": "buildx",
"version": "latest",
"asset": "linux-amd64"
},
"asset": "linux-arm64"
},
{
"plugin": "compose",
"version": "2.27.1",
"asset": "linux-x86_64"
"asset": "linux-aarch64"
}
]
},
Expand All @@ -274,13 +274,11 @@
"dotnet": {
"aptPackages": [
"dotnet-sdk-6.0",
"dotnet-sdk-7.0",
"dotnet-sdk-8.0"
"dotnet-sdk-7.0"
],
"versions": [
"6.0",
"7.0",
"8.0"
"7.0"
],
"tools": [
{ "name": "nbgv", "test": "nbgv --version", "getversion" : "nbgv --version" }
Expand Down

0 comments on commit 7db819f

Please sign in to comment.