Compare commits

...
Author SHA1 Message Date
Image generation service account. 7ee31808c8 Updating readme file for macos-13-arm64 version 20231205.1 2023-12-05 17:31:29 +00:00
github-actions[bot]andImage generation service account e108764509 Updating readme file for macOS-12 version 20231127.1 (#8921)
Co-authored-by: Image generation service account <[email protected]>
2023-12-05 12:54:10 +01:00
Alexey-AyupovandAlexey Ayupov 69db5c6c63 [macOS] Refactor Common.Helpers (#8924)
* [macOS] Refactor Common.Helpers

* Update readme file

* Remove unnecessary double quotes

---------

Co-authored-by: Alexey Ayupov <“[email protected]”>
2023-12-04 12:13:08 +01:00
Shamil Mubarakshin ff1dc02cbc [ubuntu] Refactor test helpers (#8938)
* [ubuntu] Refactor test helpers

* [ubuntu] Adjust help comment
2023-12-04 12:05:25 +01:00
Vasilii Polikarpov 5ed2615017 [Windows] Cleanup various scripts (#8942)
* Use Resolve-GithubReleaseAssetUrl more widely

* Add the Get-ChecksumFromUrl function

* Sort exported functions and add docs

* Remove alias and fix typo

* Fix kind checksum url and syntax

* Fix checksums url for gh cli and msys2

* [Windows] Cleanup various scripts

* Add spaces after type specifications

* Rename the Take-Part function
2023-12-04 10:50:53 +01:00
Shamil Mubarakshin ed911223ab Remove ci-cleanup.yml (#8939) 2023-12-01 14:42:07 +01:00
Mikhail Koliada 3a6122bbaf [Ubuntu] add php-8.3 to 20.04 (#8930) 2023-12-01 11:37:51 +01:00
458529a1c6 Updating readme file for ubuntu20 version 20231126.1.1 (#8896)
Co-authored-by: Image generation service account <[email protected]>
Co-authored-by: Actions service account <[email protected]>
2023-11-30 22:09:32 +00:00
2549aed0ee Windows Server 2022 (20231126) Image Update (#8894)
* Updating readme file for win22 version 20231126.1.1

* Update images/windows/Windows2022-Readme.md

Co-authored-by: Vasilii Polikarpov <[email protected]>

---------

Co-authored-by: Image generation service account <[email protected]>
Co-authored-by: Mikhail Koliada <[email protected]>
Co-authored-by: Vasilii Polikarpov <[email protected]>
Co-authored-by: Actions service account <[email protected]>
2023-11-30 18:12:18 +00:00
Stefano Di Nucci ae6af1b8db Add support to client secret containing hyphens (#8927) 2023-11-30 19:10:31 +01:00
Shamil Mubarakshin d919a375b3 Add PR_HEAD_REF env variable to ci-cleanup.yml (#8916)
* Add PR_HEAD_REF env variable to ci-cleanup.yml

* Fix quotes around env var
2023-11-30 17:37:37 +01:00
Vasilii Polikarpov d86c4900fa [Windows] Update functions that get urls and hashes from Github (#8917)
* [Windows] Update function to get hash from github

* Remove redundant function and add documentation

* Fix aws-sam-cli url
2023-11-30 17:12:17 +01:00
Vasilii Polikarpov eb0e4ff100 [Windows] Move Android and VS helpers to dedicated files (#8903) 2023-11-30 16:53:16 +01:00
45a5b970b8 Windows Server 2019 (20231126) Image Update (#8898)
* Updating readme file for win19 version 20231126.1.1

* Update Windows2019-Readme.md

---------

Co-authored-by: Image generation service account <[email protected]>
Co-authored-by: Mikhail Koliada <[email protected]>
Co-authored-by: Actions service account <[email protected]>
2023-11-30 12:50:54 +00:00
Vasilii Polikarpov 5f5ab19246 [Mac OS] Rewrite function download_with_retry (#8914)
* [Mac OS] Rewrite function download_with_retry

* Update powershell function DownloadWithRetry
2023-11-30 13:39:32 +01:00
bf202afb1e Updating readme file for ubuntu22 version 20231126.1.1 (#8897)
Co-authored-by: Image generation service account <[email protected]>
Co-authored-by: Actions service account <[email protected]>
2023-11-30 10:44:49 +00:00
Shamil Mubarakshin 0c03739e50 [ubuntu] Refactor Common.Helpers (#8910)
* [ubuntu] Refactor Common.Helpers

* Move Get-AndroidPackages function from BeforeAll

* Fix ParameterBinding
2023-11-30 10:23:27 +01:00
Vasilii Polikarpov 92e22bd8c6 [Windows] Refactor helpers that verify hashsum and signature (#8886) 2023-11-30 09:22:14 +01:00
Vasilii Polikarpov abb81511d4 [Ubuntu] Rewrite function download_with_retry (#8912)
* [Ubuntu] Rewrite function download_with_retry

* Fix loop exit condition
2023-11-29 20:25:29 +01:00
Vasilii Polikarpov 7dba8776df [Windows] Rename and refactor downloading function (#8906) 2023-11-29 13:02:29 +01:00
Vasilii Polikarpov bfe32a2b12 [Windows] Refactor PATH helpers (#8885) 2023-11-29 13:00:16 +01:00
Vasilii Polikarpov c73276d3f6 [Windows] Rename the Invoke-SBWithRetry function (#8880) 2023-11-29 12:58:37 +01:00
Shamil Mubarakshin d2cbbb901b [ubuntu] Change echo to printf for escape sequences (#8905) 2023-11-28 15:22:35 +01:00
Shamil Mubarakshin 435ba67550 [ubuntu] Unify approach to /etc/environment (#8904)
* [ubuntu] Unify approach to /etc/environment

* [ubuntu] fix typo in XDG_CONFIG_HOME name
2023-11-28 15:19:44 +01:00
Vasilii Polikarpov da1c04b81a [Windows] Reimplement function resolving GH asset (#8899)
* [Windows] Reimplement function resolving GH asset

* Fix tests and software report

* Fix selenium-server version check
2023-11-28 15:08:03 +01:00
ilia-shipitsin e8f9c10965 [windows] update NSIS to 3.09 (#8901) 2023-11-28 09:38:00 +01:00
Shamil Mubarakshin c0ce57ffc8 Update report generator name in CONTRIBUTING.md (#8893) 2023-11-28 02:26:12 +01:00
Alexey-AyupovandAlexey Ayupov 408bab6939 [macOS] Update PHP version to 8.3 (#8895)
Co-authored-by: Alexey Ayupov <“[email protected]”>
2023-11-28 02:25:42 +01:00
Alexey-AyupovandAlexey Ayupov 5e82420a74 [macOS] Rename build scripts (#8887)
Co-authored-by: Alexey Ayupov <“[email protected]”>
2023-11-28 02:25:03 +01:00
Vasilii Polikarpov e1e621e78c [Windows] Update helper function that returns Windows Update states (#8878) 2023-11-27 12:29:42 +01:00
Vasilii Polikarpov 12066050d0 [Windows] Refactor script installing Android SDK and packages (#8877) 2023-11-27 12:28:21 +01:00
Vasilii Polikarpov 9492109c62 [Windows] Refactor test helpers (#8889) 2023-11-27 11:37:49 +01:00
Vasilii Polikarpov 79c347765a [Windows] Unify services handling (#8871)
* [Windows] Unify services handling

* Fix Set-Service usage
2023-11-23 18:08:20 +01:00
Vasilii Polikarpov 6efbc46fc7 [Windows] Update helper name to Expand-7ZipArchive (#8875)
* [Windows] Update helper name to Expand-7ZipArchive

* Fix typo
2023-11-23 11:59:49 +01:00
Vasilii Polikarpov 64d5d2c1f4 [Windows] Rename ToolCache path helpers (#8874) 2023-11-23 11:59:08 +01:00
Vasilii Polikarpov 1254bc94a5 [Windows] Split VSIX installation helper into two (#8872) 2023-11-23 11:58:34 +01:00
Shamil Mubarakshin 1bd9214f41 [ubuntu] Rename build scripts (#8866)
* [ubuntu] Rename build scripts

* [ubuntu] Change reboot to inline shell

* [ubuntu] Move disk space validation to pester tests

* [ubuntu] Rename helper and tests files

* [ubuntu] Changes to cleanup, post-deployment and r scripts
2023-11-22 21:49:23 +01:00
Jesse Houwing 410fd620be Uses the correct env var on windows (#8800)
Based on the changes made to speed up az on ubuntu, we found that this is the correct env var to use.
2023-11-22 16:44:30 +01:00
Vasilii Polikarpov d3e630f774 [Windows] Implement installation helpers refactoring (#8865)
* [Windows] Refactor base Installer helper functions

* Fix helper name

* Fix name gen logic and improve error handling

* Fix hash checking logic

* Fix Install-VsixExtension invocation

* Fix variable name in Install-OpenSSL.ps1

* Fix type for git downloadUrl
2023-11-22 15:14:08 +01:00
46f21c4413 Updating readme file for macOS-11 version 20231117.2 (#8854)
Co-authored-by: Image generation service account <[email protected]>
Co-authored-by: Actions service account <[email protected]>
2023-11-22 14:11:08 +00:00
sergei-pyshnoi 222b798483 remove node14 from macos (#8860) 2023-11-22 00:56:17 +01:00
sergei-pyshnoi b6046999b6 remove node14 from windows (#8862) 2023-11-22 00:34:40 +01:00
Jesse Houwing a8f17e0207 Cleans telemetry and logs from (#8801)
Running the cleanup post-tests and software inventory, as these generate more logs and more telemetry
2023-11-21 20:16:32 +01:00
sergei-pyshnoi eb6e81b8f2 remove node14 from ubuntu (#8861) 2023-11-21 19:59:14 +01:00
sergei-pyshnoi 092513ca05 [Ubuntu] remove ubuntu 16 and 18 images (#8857) 2023-11-21 19:08:21 +01:00
3875f479ac Updating readme file for macOS-12 version 20231115.2 (#8833)
Co-authored-by: Image generation service account <[email protected]>
Co-authored-by: Actions service account <[email protected]>
2023-11-21 12:07:00 +00:00
Vasilii Polikarpov d7c36f2257 Fix issue where GetPackerTemplatePath fails in PS5 (#8852) 2023-11-21 10:38:18 +01:00
66991d2b2c Windows Server 2022 (20231115) Image Update (#8826)
* Updating readme file for win22 version 20231115.2.1

* Update Windows2022-Readme.md

---------

Co-authored-by: Image generation service account <[email protected]>
Co-authored-by: Mikhail Koliada <[email protected]>
Co-authored-by: Actions service account <[email protected]>
2023-11-21 09:27:15 +00:00
Erik Bershel 50625a842a Fix SBOM workflow logic (#8848)
* Fix SBOM workflow logic

* Revert SYFT pinning for Windows
2023-11-20 18:18:40 +01:00
Vasilii Polikarpov 3977803d81 [Windows] Fix signature for MS Edge webdriver (#8844) 2023-11-20 17:01:34 +01:00
3275edff48 Windows Server 2019 (20231115) Image Update (#8825)
* Updating readme file for win19 version 20231115.10.1

* Update Windows2019-Readme.md

---------

Co-authored-by: Image generation service account <[email protected]>
Co-authored-by: Alexey-Ayupov <[email protected]>
Co-authored-by: Actions service account <[email protected]>
2023-11-20 13:56:28 +00:00
Erik Bershel b3ddd57d49 [macOS] Add xcodes and xcbeautify to macOS images (#8835) 2023-11-20 14:47:33 +01:00
d5c955dfc7 Updating readme file for macos-13-arm64 version 20231115.2 (#8824)
Co-authored-by: Image generation service account <[email protected]>
Co-authored-by: Actions service account <[email protected]>
2023-11-20 13:36:45 +00:00
9c8a4aea90 Updating readme file for ubuntu22 version 20231115.7.1 (#8819)
Co-authored-by: Image generation service account <[email protected]>
Co-authored-by: Actions service account <[email protected]>
2023-11-20 13:07:42 +00:00
8bb825ba13 Updating readme file for ubuntu20 version 20231115.8.1 (#8820)
Co-authored-by: Image generation service account <[email protected]>
Co-authored-by: Actions service account <[email protected]>
2023-11-20 12:48:32 +00:00
Shamil Mubarakshin 436da67f4b [macos] change provisioner script rights (#8840) 2023-11-17 22:21:45 +01:00
sergei-pyshnoi 50ae10289a [Ubuntu] Pin sha256 for docker-compose and Alibaba Cloud CLI (#8790)
* pin sha256 for docker-compose and Alibaba Cloud CLI

* fix syntax in condition
2023-11-17 16:31:49 +01:00
Vasilii Polikarpov 07e8da79f8 [Windows] Use common approach to set machine vars (#8830) 2023-11-17 13:52:52 +01:00
Alexey-AyupovandAlexey Ayupov 045a0de8e2 [macOS] Exclude "Stack" from software report (#8822)
Co-authored-by: Alexey Ayupov <“[email protected]”>
2023-11-17 13:30:03 +01:00
Mikhail Koliada 3bbc0dc753 [packer] fix install-powershell script name (#8834) 2023-11-17 13:26:45 +01:00
Erik Bershel 164eb6cdc2 [Ubuntu] Pin SHA256 for PhantomJS and libssl1.1 (#8799) 2023-11-17 11:36:37 +01:00
sergei-pyshnoi cd2cabc7ab [Ubuntu] Add findutils to images (#8823) 2023-11-16 15:00:56 +01:00
371 changed files with 5740 additions and 5061 deletions
-48
View File
@@ -1,48 +0,0 @@
run-name: Cleanup ${{ github.head_ref }}
on:
pull_request_target:
types: labeled
paths:
- 'images/**'
jobs:
clean_ci:
name: Clean CI runs
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: pwsh
run: |
$startDate = Get-Date -UFormat %s
$workflows = @("macos11", "macos12", "ubuntu2004", "ubuntu2204", "windows2019", "windows2022")
while ($true) {
$continue = $false
foreach ($wf in $workflows) {
$skippedCommand = "gh run list --workflow ${wf}.yml --branch ${{ github.event.pull_request.head.ref }} --repo ${{ github.repository }} --status skipped --json databaseId"
$skippedIds = Invoke-Expression -Command $skippedCommand | ConvertFrom-Json | ForEach-Object { $_.databaseId }
$skippedIds | ForEach-Object {
$deleteCommand = "gh run delete --repo ${{ github.repository }} $_"
Invoke-Expression -Command $deleteCommand
}
$pendingCommand = "gh run list --workflow ${wf}.yml --branch ${{ github.event.pull_request.head.ref }} --repo ${{ github.repository }} --status requested --json databaseId --template '{{ . | len }}'"
$pending = Invoke-Expression -Command $pendingCommand
if ($pending -gt 0) {
Write-Host "Pending for ${wf}.yml: $pending run(s)"
$continue = $true
}
}
if ($continue -eq $false) {
Write-Host "All done, exiting"
break
}
$curDate = Get-Date -UFormat %s
if (($curDate - $startDate) -gt 60) {
Write-Host "Reached timeout, exiting"
break
}
Write-Host "Waiting 5 seconds..."
Start-Sleep -Seconds 5
}
+3 -9
View File
@@ -15,7 +15,7 @@ defaults:
shell: pwsh
jobs:
#Checking image version on available runner
version-check:
building-sbom:
runs-on: ${{ github.event.client_payload.agentSpec }}
steps:
- name: Available image version check for ${{ github.event.client_payload.ReleaseBranchName }}
@@ -26,15 +26,9 @@ jobs:
if ("$imageMajorVersion.$imageMinorVersion" -ne '${{ github.event.client_payload.imageVersion }}') {
throw "Current runner $imageMajorVersion.$imageMinorVersion image version doesn't match ${{ github.event.client_payload.imageVersion }}."
}
#Install and run SYFT, compress SBOM, upload it to release assets
create-sbom:
needs: version-check
runs-on: ${{ github.event.client_payload.agentSpec }}
steps:
#Installation section
- name: Install SYFT tool on Windows
if: ${{ runner.os == 'Windows' }}
run: curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b D:/syft v0.84.1
run: curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b D:/syft
- name: Install SYFT tool on Ubuntu or macOS
if: ${{ runner.os != 'Windows' }}
run: curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
@@ -68,4 +62,4 @@ jobs:
upload_url: "https://uploads.github.com/repos/actions/runner-images/releases/${{ github.event.client_payload.ReleaseID }}/assets{?name,label}"
asset_path: ./sbom.json.zip
asset_name: sbom.${{ github.event.client_payload.agentSpec }}.json.zip
asset_content_type: application/zip
asset_content_type: application/zip
+6 -6
View File
@@ -40,12 +40,12 @@ Here are a few things you can do that will increase the likelihood of your pull
### Windows
- Add a script that will install the tool and put the script in the `scripts/build` folder.
There are a bunch of helper functions that could simplify your code: `Choco-Install`, `Install-Binary`, `Install-VsixExtension`, `Start-DownloadWithRetry`, `Test-IsWin19`, `Test-IsWin22` (find the full list of helpers in [ImageHelpers.psm1](images/windows/scripts/helpers/ImageHelpers.psm1)).
- Add a script that will validate the tool installation and put the script in the `scripts/tests` folder.
We use [Pester v5](https://github.com/pester/pester) for validation scripts. If the tests for the tool are complex enough, create a separate `*.Tests.ps1`. Otherwise, use `Tools.Tests.ps1` for simple tests.
- Add a script that will install the tool and put the script in the `scripts/build` folder.
There are a bunch of helper functions that could simplify your code: `Install-ChocoPackage`, `Install-Binary`, `Install-VSIXFromFile`, `Install-VSIXFromUrl`, `Invoke-DownloadWithRetry`, `Test-IsWin19`, `Test-IsWin22` (find the full list of helpers in [ImageHelpers.psm1](images/windows/scripts/helpers/ImageHelpers.psm1)).
- Add a script that will validate the tool installation and put the script in the `scripts/tests` folder.
We use [Pester v5](https://github.com/pester/pester) for validation scripts. If the tests for the tool are complex enough, create a separate `*.Tests.ps1`. Otherwise, use `Tools.Tests.ps1` for simple tests.
Add `Invoke-PesterTests -TestFile <testFileName> [-TestName <describeName>]` at the end of the installation script to make sure that your tests will be run.
- Add changes to the software report generator `images/windows/scripts/docs-gen/SoftwareReport.Generator.ps1`. The software report generator is used to generate an image's README file, e.g. [Windows2019-Readme.md](images/windows/Windows2019-Readme.md) and uses [MarkdownPS](https://github.com/Sarafian/MarkdownPS).
- Add changes to the software report generator `images/windows/scripts/docs-gen/Generate-SoftwareReport.ps1`. The software report generator is used to generate an image's README file, e.g. [Windows2019-Readme.md](images/windows/Windows2019-Readme.md) and uses [MarkdownPS](https://github.com/Sarafian/MarkdownPS).
### Ubuntu
@@ -53,7 +53,7 @@ Add `Invoke-PesterTests -TestFile <testFileName> [-TestName <describeName>]` at
Use existing scripts such as [github-cli.sh](images/ubuntu/scripts/build/github-cli.sh) as a starting point.
- Use [helpers](images/ubuntu/scripts/helpers/install.sh) to simplify installation process.
- Validation part should `exit 1` if any issue with installation.
- Add changes to the software report generator `images/ubuntu/scripts/docs-gen/SoftwareReport.Generator.ps1`. The software report generator is used to generate an image's README file, e.g. [Ubuntu2004-Readme.md](images/ubuntu/Ubuntu2004-README.md) and it uses [MarkdownPS](https://github.com/Sarafian/MarkdownPS).
- Add changes to the software report generator `images/ubuntu/scripts/docs-gen/Generate-SoftwareReport.ps1`. The software report generator is used to generate an image's README file, e.g. [Ubuntu2004-Readme.md](images/ubuntu/Ubuntu2004-README.md) and it uses [MarkdownPS](https://github.com/Sarafian/MarkdownPS).
### macOS
+7 -6
View File
@@ -17,20 +17,21 @@ Function Get-PackerTemplatePath {
)
switch ($ImageType) {
# Note: Double Join-Path is required to support PowerShell 5.1
([ImageType]::Windows2019) {
$relativeTemplatePath = Join-Path "windows" "templates" "windows-2019.json"
$relativeTemplatePath = Join-Path (Join-Path "windows" "templates") "windows-2019.json"
}
([ImageType]::Windows2022) {
$relativeTemplatePath = Join-Path "windows" "templates" "windows-2022.json"
$relativeTemplatePath = Join-Path (Join-Path "windows" "templates") "windows-2022.json"
}
([ImageType]::Ubuntu2004) {
$relativeTemplatePath = Join-Path "ubuntu" "templates" "ubuntu-20.04.json"
$relativeTemplatePath = Join-Path (Join-Path "ubuntu" "templates") "ubuntu-20.04.json"
}
([ImageType]::Ubuntu2204) {
$relativeTemplatePath = Join-Path "ubuntu" "templates" "ubuntu-22.04.pkr.hcl"
$relativeTemplatePath = Join-Path (Join-Path "ubuntu" "templates") "ubuntu-22.04.pkr.hcl"
}
([ImageType]::UbuntuMinimal) {
$relativeTemplatePath = Join-Path "ubuntu" "templates" "ubuntu-minimal.pkr.hcl"
$relativeTemplatePath = Join-Path (Join-Path "ubuntu" "templates") "ubuntu-minimal.pkr.hcl"
}
default { throw "Unknown type of image" }
}
@@ -248,7 +249,7 @@ Function GenerateResourcesAndImage {
}
else {
Write-Verbose "AzureClientId was provided, will use service principal login."
az login --service-principal --username $AzureClientId --password $AzureClientSecret --tenant $AzureTenantId --output none
az login --service-principal --username $AzureClientId --password=$AzureClientSecret --tenant $AzureTenantId --output none
}
az account set --subscription $SubscriptionId
if ($LastExitCode -ne 0) {
-1
View File
@@ -50,7 +50,6 @@ packer build -var "client_id=$ClientId" `
-var "virtual_network_name=$VirtualNetworkName" `
-var "virtual_network_resource_group_name=$VirtualNetworkRG" `
-var "virtual_network_subnet_name=$VirtualNetworkSubnet" `
-var "run_validation_diskspace=$env:RUN_VALIDATION_FLAG" `
-color=false `
$TemplatePath `
| Where-Object {
+1 -1
View File
@@ -6,7 +6,7 @@ param(
[Parameter (Mandatory=$true)] [string] $TenantId
)
az login --service-principal --username $ClientId --password $ClientSecret --tenant $TenantId | Out-Null
az login --service-principal --username $ClientId --password=$ClientSecret --tenant $TenantId | Out-Null
az account set --subscription $SubscriptionId | Out-Null
$groupExist = az group exists --name $TempResourceGroupName
View File
View File
+58 -53
View File
@@ -1,12 +1,18 @@
| Announcements |
|-|
| [[all OSs] Nodejs 14.x will be removed from the images on November, 26](https://github.com/actions/runner-images/issues/8779) |
| [Major Refactoring of GitHub Actions Runner Images Repository](https://github.com/actions/runner-images/issues/8706) |
| [[All OS] Android NDK r23 will be removed from images on November 13](https://github.com/actions/runner-images/issues/8383) |
***
# macOS 11
- OS Version: macOS 11.7.10 (20G1427)
- Kernel Version: Darwin 20.6.0
- Image Version: 20231030.1
- Image Version: 20231117.2
## Installed Software
### Language and Runtime
- .NET Core SDK: 6.0.416, 7.0.102, 7.0.202, 7.0.306, 7.0.403
- .NET Core SDK: 6.0.417, 7.0.102, 7.0.202, 7.0.306, 7.0.404, 8.0.100
- Bash 3.2.57(1)-release
- Clang/LLVM 13.0.0
- Clang/LLVM (Homebrew) 15.0.7 - available on `$(brew --prefix llvm@15)/bin/clang`
@@ -16,9 +22,9 @@
- GNU Fortran 10 (Homebrew GCC 10.5.0) - available by `gfortran-10` alias
- GNU Fortran 11 (Homebrew GCC 11.4.0) - available by `gfortran-11` alias
- GNU Fortran 12 (Homebrew GCC 12.3.0) - available by `gfortran-12` alias
- Julia 1.9.3
- Kotlin 1.9.10-release-459
- Go 1.20.10
- Julia 1.9.4
- Kotlin 1.9.255-SNAPSHOT
- Go 1.20.11
- Mono 6.12.0.188
- Node.js 18.18.2
- MSBuild 16.10.1.51301 (Mono 6.12.0.188)
@@ -28,23 +34,23 @@
- PHP 8.2.12
- Python 2.7.18
- Python3 3.12.0
- R 4.3.1
- R 4.3.2
- Ruby 2.7.8p225
### Package Management
- Bundler 2.4.21
- Bundler 2.4.22
- Carthage 0.39.1
- CocoaPods 1.14.2
- Composer 2.6.5
- Homebrew 4.1.17
- Miniconda 23.9.0
- Homebrew 4.1.20
- Miniconda 23.10.0
- NPM 9.8.1
- NuGet 6.3.1.1
- Pip 20.3.4 (python 2.7)
- Pip3 23.3.1 (python 3.12)
- Pipx 1.2.1
- RubyGems 3.4.21
- Vcpkg 2023 (build from commit 3715d743a)
- RubyGems 3.4.22
- Vcpkg 2023 (build from commit 0c20b2a97)
- Yarn 1.22.19
#### Environment variables
@@ -61,19 +67,19 @@
### Utilities
- 7-Zip 17.05
- aria2 1.36.0
- azcopy 10.21.1
- aria2 1.37.0
- azcopy 10.21.2
- bazel 6.4.0
- bazelisk 1.18.0
- bazelisk 1.19.0
- bsdtar 3.3.2 - available by 'tar' alias
- Curl 8.4.0
- Git 2.42.0
- Git 2.42.1
- Git LFS 3.4.0
- GitHub CLI 2.37.0
- GitHub CLI 2.39.1
- GNU Tar 1.35 - available by 'gtar' alias
- GNU Wget 1.21.4
- gpg (GnuPG) 2.4.3
- helm v3.13.1+g3547a4b
- helm v3.13.2+g2a2fb3b
- ImageMagick 7.1.1-21
- jq 1.7
- mongo 5.0.21
@@ -82,8 +88,8 @@
- OpenSSL 1.1.1w 11 Sep 2023
- Packer 1.9.4
- pkg-config 0.29.2
- PostgreSQL 14.9 (Homebrew)
- psql (PostgreSQL) 14.9 (Homebrew)
- PostgreSQL 14.10 (Homebrew)
- psql (PostgreSQL) 14.10 (Homebrew)
- Sox 14.4.2
- Subversion (SVN) 1.14.2
- Switchaudio-osx 1.2.2
@@ -91,41 +97,41 @@
- zstd 1.5.5
### Tools
- Aliyun CLI 3.0.184
- Aliyun CLI 3.0.188
- App Center CLI 2.14.0
- AWS CLI 2.13.30
- AWS SAM CLI 1.99.0
- AWS CLI 2.13.37
- AWS SAM CLI 1.103.0
- AWS Session Manager CLI 1.2.497.0
- Azure CLI 2.53.1
- Azure CLI 2.54.0
- Azure CLI (azure-devops) 0.26.0
- Bicep CLI 0.22.6
- Cabal 3.10.1.0
- Cmake 3.27.7
- CodeQL Action Bundle 2.15.1
- Fastlane 2.216.0
- GHC 9.6.2
- GHCup 0.1.19.4
- Bicep CLI 0.23.1
- Cabal 3.6.2.0
- Cmake 3.27.8
- CodeQL Action Bundle 2.15.2
- Fastlane 2.217.0
- GHC 9.8.1
- GHCup 0.1.20.0
- Jazzy 0.14.4
- Stack 2.13.1
- SwiftFormat 0.52.8
- SwiftFormat 0.52.10
- Swig 4.1.1
- Xcode Command Line Tools 13.2.0.0.1.1638488800
### Linters
- SwiftLint 0.48.0
- Yamllint 1.32.0
- Yamllint 1.33.0
### Browsers
- Safari 16.6.1 (16615.3.12.11.5)
- SafariDriver 16.6.1 (16615.3.12.11.5)
- Google Chrome 118.0.5993.117
- Google Chrome for Testing 118.0.5993.70
- ChromeDriver 118.0.5993.70
- Microsoft Edge 118.0.2088.76
- Microsoft Edge WebDriver 118.0.2088.76
- Mozilla Firefox 119.0
- Google Chrome 119.0.6045.159
- Google Chrome for Testing 119.0.6045.105
- ChromeDriver 119.0.6045.105
- Microsoft Edge 119.0.2151.72
- Microsoft Edge WebDriver 119.0.2151.72
- Mozilla Firefox 119.0.1
- geckodriver 0.33.0
- Selenium server 4.14.1
- Selenium server 4.15.0
#### Environment variables
| Name | Value |
@@ -140,7 +146,7 @@
| 8.0.392+8 (default) | JAVA_HOME_8_X64 |
| 11.0.21+9 | JAVA_HOME_11_X64 |
| 17.0.9+9 | JAVA_HOME_17_X64 |
| 21.0.1+12.0.LTS | JAVA_HOME_21_X64 |
| 21.0.1+12.0 | JAVA_HOME_21_X64 |
### Cached Tools
@@ -174,28 +180,28 @@
#### Go
- 1.19.13
- 1.20.10
- 1.21.3
- 1.20.11
- 1.21.4
### Rust Tools
- Cargo 1.73.0
- Rust 1.73.0
- Rustdoc 1.73.0
- Cargo 1.74.0
- Rust 1.74.0
- Rustdoc 1.74.0
- Rustup 1.26.0
#### Packages
- Bindgen 0.68.1
- Bindgen 0.69.1
- Cargo-audit 0.18.3
- Cargo-outdated 0.13.1
- Cargo-outdated 0.14.0
- Cbindgen 0.26.0
- Clippy 0.1.73
- Clippy 0.1.74
- Rustfmt 1.6.0-stable
### PowerShell Tools
- PowerShell 7.2.16
- PowerShell 7.2.17
#### PowerShell Modules
- Az: 10.4.1
- Az: 11.0.0
- MarkdownPS: 1.9
- Pester: 5.5.0
- PSScriptAnalyzer: 1.21.0
@@ -212,7 +218,7 @@
| Version | Build | Path |
| -------------- | ---------- | ------------------------------------ |
| 2019 | 8.10.25.2 | /Applications/Visual Studio 2019.app |
| 2022 (default) | 17.6.6.408 | /Applications/Visual Studio.app |
| 2022 (default) | 17.6.7.417 | /Applications/Visual Studio.app |
##### Notes
```
@@ -336,8 +342,7 @@ mv "/Applications/Visual Studio 2019.app" "/Applications/Visual Studio.app"
| CMake | 3.10.2<br>3.18.1<br>3.22.1 |
| Google Play services | 49 |
| Google Repository | 58 |
| NDK | 23.2.8568313<br>24.0.8215888<br>25.2.9519653 (default)<br>26.1.10909125 |
| SDK Patch Applier v4 | 1 |
| NDK | 24.0.8215888<br>25.2.9519653 (default)<br>26.1.10909125 |
#### Environment variables
| Name | Value |
+67 -62
View File
@@ -1,12 +1,17 @@
| Announcements |
|-|
| [[all OSs] Nodejs 14.x will be removed from the images on November, 26](https://github.com/actions/runner-images/issues/8779) |
| [Major Refactoring of GitHub Actions Runner Images Repository](https://github.com/actions/runner-images/issues/8706) |
***
# macOS 12
- OS Version: macOS 12.7 (21G816)
- OS Version: macOS 12.7.1 (21G920)
- Kernel Version: Darwin 21.6.0
- Image Version: 20231029.1
- Image Version: 20231127.1
## Installed Software
### Language and Runtime
- .NET Core SDK: 6.0.416, 7.0.102, 7.0.202, 7.0.306, 7.0.403
- .NET Core SDK: 6.0.417, 7.0.102, 7.0.202, 7.0.306, 7.0.404, 8.0.100
- Bash 3.2.57(1)-release
- Clang/LLVM 14.0.0
- Clang/LLVM (Homebrew) 15.0.7 - available on `$(brew --prefix llvm@15)/bin/clang`
@@ -16,35 +21,35 @@
- GNU Fortran 11 (Homebrew GCC 11.4.0) - available by `gfortran-11` alias
- GNU Fortran 12 (Homebrew GCC 12.3.0) - available by `gfortran-12` alias
- GNU Fortran 13 (Homebrew GCC 13.2.0) - available by `gfortran-13` alias
- Julia 1.9.3
- Kotlin 1.9.10-release-459
- Go 1.20.10
- Julia 1.9.4
- Kotlin 1.9.21-release-633
- Go 1.20.11
- Mono 6.12.0.188
- Node.js 18.18.2
- MSBuild 16.10.1.51301 (Mono 6.12.0.188)
- NVM 0.39.5
- NVM - Cached node versions: 14.21.3, 16.20.2, 18.18.2, 20.9.0
- Perl 5.38.0
- PHP 8.2.12
- NVM - Cached node versions: 16.20.2, 18.18.2, 20.10.0
- Perl 5.38.1
- PHP 8.3.0
- Python 2.7.18
- Python3 3.12.0
- R 4.3.1
- R 4.3.2
- Ruby 3.0.6p216
### Package Management
- Bundler 2.4.21
- Bundler 2.4.22
- Carthage 0.39.1
- CocoaPods 1.14.2
- CocoaPods 1.14.3
- Composer 2.6.5
- Homebrew 4.1.17
- Miniconda 23.9.0
- Homebrew 4.1.22
- Miniconda 23.10.0
- NPM 9.8.1
- NuGet 6.3.1.1
- Pip 20.3.4 (python 2.7)
- Pip3 23.3.1 (python 3.12)
- Pipx 1.2.1
- RubyGems 3.4.21
- Vcpkg 2023 (build from commit 06c79a9af)
- RubyGems 3.4.22
- Vcpkg 2023 (build from commit 13c3c0fcc)
- Yarn 1.22.19
#### Environment variables
@@ -61,15 +66,15 @@
### Utilities
- 7-Zip 17.05
- aria2 1.36.0
- azcopy 10.21.1
- aria2 1.37.0
- azcopy 10.21.2
- bazel 6.4.0
- bazelisk 1.18.0
- bazelisk 1.19.0
- bsdtar 3.5.1 - available by 'tar' alias
- Curl 8.4.0
- Git 2.42.0
- Git 2.43.0
- Git LFS 3.4.0
- GitHub CLI 2.37.0
- GitHub CLI 2.39.1
- GNU Tar 1.35 - available by 'gtar' alias
- GNU Wget 1.21.4
- gpg (GnuPG) 2.4.3
@@ -80,52 +85,54 @@
- OpenSSL 1.1.1w 11 Sep 2023
- Packer 1.9.4
- pkg-config 0.29.2
- PostgreSQL 14.9 (Homebrew)
- psql (PostgreSQL) 14.9 (Homebrew)
- PostgreSQL 14.10 (Homebrew)
- psql (PostgreSQL) 14.10 (Homebrew)
- Sox 14.4.2
- Subversion (SVN) 1.14.2
- Switchaudio-osx 1.2.2
- Vagrant 2.4.0
- VirtualBox 7.0.12r159484
- yq 4.35.2
- VirtualBox 6.1.38r153438
- yq 4.40.3
- zstd 1.5.5
### Tools
- App Center CLI 2.14.0
- AWS CLI 2.13.30
- AWS SAM CLI 1.99.0
- AWS CLI 2.13.39
- AWS SAM CLI 1.103.0
- AWS Session Manager CLI 1.2.497.0
- Azure CLI 2.53.1
- Azure CLI 2.54.0
- Azure CLI (azure-devops) 0.26.0
- Bicep CLI 0.22.6
- Bicep CLI 0.23.1
- Cabal 3.6.2.0
- Cmake 3.27.7
- CodeQL Action Bundle 2.15.1
- Colima 0.5.6
- Fastlane 2.216.0
- Cmake 3.27.8
- CodeQL Action Bundle 2.15.3
- Colima 0.6.6
- Fastlane 2.217.0
- GHC 9.8.1
- GHCup 0.1.19.4
- GHCup 0.1.20.0
- Jazzy 0.14.4
- Stack 2.13.1
- SwiftFormat 0.52.8
- SwiftFormat 0.52.10
- Swig 4.1.1
- Xcbeautify 1.0.1
- Xcode Command Line Tools 14.2.0.0.1.1668646533
- Xcodes 1.4.1
### Linters
- SwiftLint 0.53.0
- Yamllint 1.32.0
- Yamllint 1.33.0
### Browsers
- Safari 17.0 (17616.1.27.111.22)
- SafariDriver 17.0 (17616.1.27.111.22)
- Google Chrome 118.0.5993.117
- Google Chrome for Testing 118.0.5993.70
- ChromeDriver 118.0.5993.70
- Microsoft Edge 118.0.2088.76
- Microsoft Edge WebDriver 118.0.2088.76
- Mozilla Firefox 119.0
- Safari 17.1 (17616.2.9.11.9)
- SafariDriver 17.1 (17616.2.9.11.9)
- Google Chrome 119.0.6045.159
- Google Chrome for Testing 119.0.6045.105
- ChromeDriver 119.0.6045.105
- Microsoft Edge 119.0.2151.72
- Microsoft Edge WebDriver 119.0.2151.72
- Mozilla Firefox 120.0
- geckodriver 0.33.0
- Selenium server 4.14.1
- Selenium server 4.15.0
#### Environment variables
| Name | Value |
@@ -140,7 +147,7 @@
| 8.0.392+8 (default) | JAVA_HOME_8_X64 |
| 11.0.21+9 | JAVA_HOME_11_X64 |
| 17.0.9+9 | JAVA_HOME_17_X64 |
| 21.0.1+12.0.LTS | JAVA_HOME_21_X64 |
| 21.0.1+12.0 | JAVA_HOME_21_X64 |
### Cached Tools
@@ -165,35 +172,34 @@
- 3.12.0
#### Node.js
- 14.21.3
- 16.20.2
- 18.18.2
- 20.9.0
- 20.10.0
#### Go
- 1.19.13
- 1.20.10
- 1.21.3
- 1.20.11
- 1.21.4
### Rust Tools
- Cargo 1.73.0
- Rust 1.73.0
- Rustdoc 1.73.0
- Cargo 1.74.0
- Rust 1.74.0
- Rustdoc 1.74.0
- Rustup 1.26.0
#### Packages
- Bindgen 0.68.1
- Bindgen 0.69.1
- Cargo-audit 0.18.3
- Cargo-outdated 0.13.1
- Cargo-outdated 0.14.0
- Cbindgen 0.26.0
- Clippy 0.1.73
- Clippy 0.1.74
- Rustfmt 1.6.0-stable
### PowerShell Tools
- PowerShell 7.2.16
- PowerShell 7.2.17
#### PowerShell Modules
- Az: 10.4.1
- Az: 11.0.0
- MarkdownPS: 1.9
- Pester: 5.5.0
- PSScriptAnalyzer: 1.21.0
@@ -210,7 +216,7 @@
| Version | Build | Path |
| -------------- | ---------- | ------------------------------------ |
| 2019 | 8.10.25.2 | /Applications/Visual Studio 2019.app |
| 2022 (default) | 17.6.6.408 | /Applications/Visual Studio.app |
| 2022 (default) | 17.6.7.417 | /Applications/Visual Studio.app |
##### Notes
```
@@ -337,8 +343,7 @@ mv "/Applications/Visual Studio 2019.app" "/Applications/Visual Studio.app"
| CMake | 3.18.1<br>3.22.1 |
| Google Play services | 49 |
| Google Repository | 58 |
| NDK | 23.2.8568313<br>24.0.8215888<br>25.2.9519653 (default)<br>26.1.10909125 |
| SDK Patch Applier v4 | 1 |
| NDK | 24.0.8215888<br>25.2.9519653 (default)<br>26.1.10909125 |
#### Environment variables
| Name | Value |
@@ -359,7 +364,7 @@ mv "/Applications/Visual Studio 2019.app" "/Applications/Visual Studio.app"
#### Environment variables
| Name | Value |
| ----------------- | ----------------------------------------------------------------------------------------- |
| PARALLELS_DMG_URL | https://download.parallels.com/desktop/v19/19.1.0-54729/ParallelsDesktop-19.1.0-54729.dmg |
| PARALLELS_DMG_URL | https://download.parallels.com/desktop/v19/19.1.1-54734/ParallelsDesktop-19.1.1-54734.dmg |
##### Notes
```
+80 -46
View File
@@ -1,12 +1,18 @@
| Announcements |
|-|
| [Old versions of Android SDK & tools will be removed from images on January, 8](https://github.com/actions/runner-images/issues/8952) |
| [[all OSs] Nodejs 14.x will be removed from the images on November, 26](https://github.com/actions/runner-images/issues/8779) |
| [Major Refactoring of GitHub Actions Runner Images Repository](https://github.com/actions/runner-images/issues/8706) |
***
# macOS 13
- OS Version: macOS 13.6 (22G120)
- OS Version: macOS 13.6.1 (22G313)
- Kernel Version: Darwin 22.6.0
- Image Version: 20231024.2
- Image Version: 20231205.1
## Installed Software
### Language and Runtime
- .NET Core SDK: 7.0.102, 7.0.202, 7.0.306, 7.0.403
- .NET Core SDK: 7.0.102, 7.0.202, 7.0.306, 7.0.404, 8.0.100
- Bash 3.2.57(1)-release
- Clang/LLVM 14.0.3
- Clang/LLVM (Homebrew) 15.0.7 - available on `$(brew --prefix llvm@15)/bin/clang`
@@ -16,40 +22,40 @@
- GNU Fortran 11 (Homebrew GCC 11.4.0) - available by `gfortran-11` alias
- GNU Fortran 12 (Homebrew GCC 12.3.0) - available by `gfortran-12` alias
- GNU Fortran 13 (Homebrew GCC 13.2.0) - available by `gfortran-13` alias
- Julia 1.9.3
- Kotlin 1.9.10-release-459
- Julia 1.9.4
- Kotlin 1.9.21-release-633
- Mono 6.12.0.188
- Node.js 18.18.2
- Perl 5.38.0
- R 4.3.1
- Node.js 18.19.0
- Perl 5.38.2
- R 4.3.2
- Ruby 3.0.6p216
### Package Management
- Bundler 2.4.21
- Bundler 2.4.22
- Carthage 0.39.1
- CocoaPods 1.13.0
- Homebrew 4.1.17
- NPM 9.8.1
- CocoaPods 1.14.3
- Homebrew 4.1.23
- NPM 10.2.3
- NuGet 6.3.1.1
- RubyGems 3.4.21
- RubyGems 3.4.22
- Yarn 1.22.19
### Project Management
- Apache Ant 1.10.14
- Apache Maven 3.9.5
- Gradle 8.4
- Apache Maven 3.9.6
- Gradle 8.5
### Utilities
- 7-Zip 17.05
- aria2 1.36.0
- azcopy 10.21.0
- aria2 1.37.0
- azcopy 10.21.2
- bazel 6.4.0
- bazelisk 1.18.0
- bazelisk 1.19.0
- bsdtar 3.5.3 - available by 'tar' alias
- Curl 8.1.2
- Git 2.42.0
- Git 2.43.0
- Git LFS 3.4.0
- GitHub CLI 2.37.0
- GitHub CLI 2.39.2
- GNU Tar 1.35 - available by 'gtar' alias
- GNU Wget 1.21.4
- gpg (GnuPG) 2.4.3
@@ -57,28 +63,33 @@
- OpenSSL 1.1.1w 11 Sep 2023
- Packer 1.9.4
- pkg-config 0.29.2
- yq 4.35.2
- yq 4.40.4
- zstd 1.5.5
### Tools
- Azure CLI 2.53.1
- AWS CLI 2.14.5
- AWS SAM CLI 1.103.0
- AWS Session Manager CLI 1.2.536.0
- Azure CLI 2.55.0
- Azure CLI (azure-devops) 0.26.0
- Bicep CLI 0.22.6
- Cmake 3.27.7
- CodeQL Action Bundle 2.15.1
- Fastlane 2.216.0
- SwiftFormat 0.52.8
- Bicep CLI 0.23.1
- Cmake 3.27.9
- CodeQL Action Bundle 2.15.3
- Fastlane 2.217.0
- SwiftFormat 0.52.10
- Xcbeautify 1.1.0
- Xcode Command Line Tools 15.0.0.0.1.1694021235
- Xcodes 1.4.1
### Linters
### Browsers
- Safari 17.0 (18616.1.27.111.22)
- SafariDriver 17.0 (18616.1.27.111.22)
- Google Chrome 118.0.5993.117
- Google Chrome for Testing 118.0.5993.70
- ChromeDriver 118.0.5993.70
- Selenium server 4.14.1
- Safari 17.1 (18616.2.9.11.10)
- SafariDriver 17.1 (18616.2.9.11.10)
- Google Chrome 119.0.6045.199
- Google Chrome for Testing 119.0.6045.105
- ChromeDriver 119.0.6045.105
- Selenium server 4.15.0
#### Environment variables
| Name | Value |
@@ -92,7 +103,7 @@
| ------------------ | -------------------- |
| 11.0.21+9 | JAVA_HOME_11_arm64 |
| 17.0.9+9 (default) | JAVA_HOME_17_arm64 |
| 21.0.1+12.0.LTS | JAVA_HOME_21_arm64 |
| 21.0.1+12.0 | JAVA_HOME_21_arm64 |
### Cached Tools
@@ -102,31 +113,29 @@
#### Node.js
- 16.20.1
- 18.16.1
- 18.19.0
- 20.10.0
#### Go
- 1.19.13
- 1.20.8
- 1.20.11
- 1.21.4
### Rust Tools
- Cargo 1.73.0
- Rust 1.73.0
- Rustdoc 1.73.0
- Cargo 1.74.0
- Rust 1.74.0
- Rustdoc 1.74.0
- Rustup 1.26.0
#### Packages
- Bindgen 0.68.1
- Cargo-audit 0.18.3
- Cargo-outdated 0.13.1
- Cbindgen 0.26.0
- Clippy 0.1.73
- Clippy 0.1.74
- Rustfmt 1.6.0-stable
### PowerShell Tools
- PowerShell 7.2.15
- PowerShell 7.2.17
#### PowerShell Modules
- Az: 10.4.1
- Az: 11.1.0
- Pester: 5.5.0
- PSScriptAnalyzer: 1.21.0
@@ -189,3 +198,28 @@
| watchOS 9.1 | 14.1<br>14.2<br>14.3.1<br>15.0.1 | Apple Watch SE (40mm) (2nd generation)<br>Apple Watch SE (44mm) (2nd generation)<br>Apple Watch Series 5 (40mm)<br>Apple Watch Series 5 (44mm)<br>Apple Watch Series 6 (40mm)<br>Apple Watch Series 6 (44mm)<br>Apple Watch Series 7 (41mm)<br>Apple Watch Series 7 (45mm)<br>Apple Watch Series 8 (41mm)<br>Apple Watch Series 8 (45mm)<br>Apple Watch Ultra (49mm) |
| watchOS 9.4 | 14.1<br>14.2<br>14.3.1<br>15.0.1 | Apple Watch SE (40mm) (2nd generation)<br>Apple Watch SE (44mm) (2nd generation)<br>Apple Watch Series 5 (40mm)<br>Apple Watch Series 5 (44mm)<br>Apple Watch Series 6 (40mm)<br>Apple Watch Series 6 (44mm)<br>Apple Watch Series 7 (41mm)<br>Apple Watch Series 7 (45mm)<br>Apple Watch Series 8 (41mm)<br>Apple Watch Series 8 (45mm)<br>Apple Watch Ultra (49mm) |
| watchOS 10.0 | 14.1<br>14.2<br>14.3.1<br>15.0.1 | Apple Watch SE (40mm) (2nd generation)<br>Apple Watch SE (44mm) (2nd generation)<br>Apple Watch Series 5 (40mm)<br>Apple Watch Series 5 (44mm)<br>Apple Watch Series 6 (40mm)<br>Apple Watch Series 6 (44mm)<br>Apple Watch Series 7 (41mm)<br>Apple Watch Series 7 (45mm)<br>Apple Watch Series 8 (41mm)<br>Apple Watch Series 8 (45mm)<br>Apple Watch Series 9 (41mm)<br>Apple Watch Series 9 (45mm)<br>Apple Watch Ultra (49mm)<br>Apple Watch Ultra 2 (49mm) |
### Android
| Package Name | Version |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| Android Command Line Tools | 11.0 |
| Android Emulator | 33.1.23 |
| Android SDK Build-tools | 34.0.0<br>33.0.2 |
| Android SDK Platforms | android-34-ext8 (rev 1)<br>android-34 (rev 2)<br>android-33-ext5 (rev 1)<br>android-33-ext4 (rev 1)<br>android-33 (rev 3) |
| Android SDK Platform-Tools | 34.0.5 |
| Android Support Repository | 47.0.0 |
| CMake | 3.22.1 |
| Google Play services | 49 |
| Google Repository | 58 |
| NDK | 24.0.8215888<br>25.2.9519653<br>26.1.10909125 (default) |
#### Environment variables
| Name | Value |
| ----------------------- | --------------------------------------------------- |
| ANDROID_HOME | /Users/runner/Library/Android/sdk |
| ANDROID_NDK | /Users/runner/Library/Android/sdk/ndk/26.1.10909125 |
| ANDROID_NDK_HOME | /Users/runner/Library/Android/sdk/ndk/26.1.10909125 |
| ANDROID_NDK_LATEST_HOME | /Users/runner/Library/Android/sdk/ndk/26.1.10909125 |
| ANDROID_NDK_ROOT | /Users/runner/Library/Android/sdk/ndk/26.1.10909125 |
| ANDROID_SDK_ROOT | /Users/runner/Library/Android/sdk |
@@ -6,8 +6,7 @@
Import-Module "~/image-generation/helpers/Common.Helpers.psm1"
function Get-ToolsetToolFullPath
{
function Get-ToolsetToolFullPath {
param
(
[Parameter(Mandatory)] [string] $ToolName,
@@ -23,25 +22,23 @@ function Get-ToolsetToolFullPath
}
$arch = Get-Architecture
$toolcache = Get-ToolsetValue "toolcache"
$toolcache = (Get-ToolsetContent).toolcache
foreach ($tool in $toolcache)
{
foreach ($tool in $toolcache) {
$toolName = $tool.name
$toolEnvironment = $tool.arch.$arch.variable_template
if (-not $toolEnvironment)
{
if (-not $toolEnvironment) {
continue
}
foreach ($toolVersion in $tool.arch.$arch.versions)
{
foreach ($toolVersion in $tool.arch.$arch.versions) {
Write-Host "Set $toolName $toolVersion environment variable..."
$toolPath = Get-ToolsetToolFullPath -ToolName $toolName -ToolVersion $toolVersion -ToolArchitecture $arch
$envName = $toolEnvironment -f $toolVersion.split(".")
# Add environment variable name=value
Add-EnvironmentVariable -Name $envName -Value $toolPath
$envVar = "export {0}={1}" -f $envName, $toolPath
Add-Content -Path "${env:HOME}/.bashrc" -Value $envVar
}
}
@@ -1,9 +1,10 @@
################################################################################
## File: toolset.ps1
## File: Install-Toolset.ps1
## Team: CI-Build
## Desc: Install toolset
################################################################################
Import-Module "~/image-generation/helpers/Tests.Helpers.psm1"
Import-Module "~/image-generation/tests/Helpers.psm1"
Import-Module "~/image-generation/helpers/Common.Helpers.psm1"
Function Install-Asset {
@@ -12,14 +13,12 @@ Function Install-Asset {
[object] $ReleaseAsset
)
$assetFolderPath = Join-Path "/tmp" "$($ReleaseAsset.filename)-temp-dir"
New-Item -ItemType Directory -Path $assetFolderPath | Out-Null
$assetArchivePath = Join-Path $assetFolderPath $ReleaseAsset.filename
Write-Host "Download $($ReleaseAsset.filename) archive to the $assetFolderPath folder..."
Start-DownloadWithRetry -Url $ReleaseAsset.download_url -DownloadPath $assetFolderPath
Write-Host "Download $($ReleaseAsset.filename) archive..."
$assetArchivePath = Invoke-DownloadWithRetry $ReleaseAsset.download_url
Write-Host "Extract $($ReleaseAsset.filename) content..."
$assetFolderPath = Join-Path "/tmp" "$($ReleaseAsset.filename)-temp-dir"
New-Item -ItemType Directory -Path $assetFolderPath | Out-Null
tar -xzf $assetArchivePath -C $assetFolderPath
Write-Host "Invoke installation script..."
@@ -32,11 +31,11 @@ $arch = Get-Architecture
# Get toolcache content from toolset
$toolsToInstall = @("Python", "Node", "Go")
$tools = Get-ToolsetValue "toolcache" | Where-Object {$toolsToInstall -contains $_.Name}
$tools = (Get-ToolsetContent).toolcache | Where-Object {$toolsToInstall -contains $_.Name}
foreach ($tool in $tools) {
# Get versions manifest for current tool
$assets = Invoke-RestMethodWithRetry -Url $tool.url
$assets = Invoke-RestMethod $tool.url -MaximumRetryCount 10 -RetryIntervalSec 30
# Get github release asset for each version
foreach ($version in $tool.arch.$arch.versions) {
@@ -55,4 +54,4 @@ foreach ($tool in $tools) {
}
}
Invoke-PesterTests "Toolcache"
Invoke-PesterTests "Toolcache"
@@ -1,12 +1,17 @@
################################################################################
## File: Install-Xcode.ps1
## Desc: Install Xcode
################################################################################
$ErrorActionPreference = "Stop"
Import-Module "$env:HOME/image-generation/helpers/Common.Helpers.psm1"
Import-Module "$env:HOME/image-generation/helpers/Xcode.Installer.psm1" -DisableNameChecking
$ARCH = Get-Architecture
[Array]$xcodeVersions = Get-ToolsetValue "xcode.$ARCH.versions"
$arch = Get-Architecture
[Array]$xcodeVersions = (Get-ToolsetContent).xcode.$arch.versions
write-host $xcodeVersions
$defaultXcode = Get-ToolsetValue "xcode.default"
$defaultXcode = (Get-ToolsetContent).xcode.default
[Array]::Reverse($xcodeVersions)
$threadCount = "5"
@@ -56,7 +61,7 @@ $xcodeVersions | ForEach-Object {
Write-Host "Rebuilding Launch Services database ..."
$xcodeVersions | ForEach-Object {
Rebuild-XcodeLaunchServicesDb -Version $_.link
Initialize-XcodeLaunchServicesDb -Version $_.link
}
Write-Host "Setting default Xcode to $defaultXcode"
@@ -1,18 +1,23 @@
################################################################################
## File: Update-XcodeSimulators.ps1
## Desc: Check available Xcode simulators and create missing ones
################################################################################
$ErrorActionPreference = "Stop"
Import-Module "$env:HOME/image-generation/helpers/Xcode.Helpers.psm1" -DisableNameChecking
Import-Module "$env:HOME/image-generation/software-report/SoftwareReport.Xcode.psm1" -DisableNameChecking
function Ensure-SimulatorInstalled {
function Test-SimulatorInstalled {
param(
[Parameter(Mandatory)]
[string]$RuntimeId,
[string] $RuntimeId,
[Parameter(Mandatory)]
[string]$DeviceId,
[string] $DeviceId,
[Parameter(Mandatory)]
[string]$SimulatorName,
[string] $SimulatorName,
[Parameter(Mandatory)]
[string]$XcodeVersion
[string] $XcodeVersion
)
$simctlPath = Get-XcodeToolPath -Version $XcodeVersion -ToolName "simctl"
@@ -47,5 +52,5 @@ Get-XcodeInfoList | Out-Null
Write-Host "Validating and fixing Xcode simulators..."
Get-BrokenXcodeSimulatorsList | ForEach-Object {
Ensure-SimulatorInstalled -RuntimeId $_.RuntimeId -DeviceId $_.DeviceId -SimulatorName $_.SimulatorName -XcodeVersion $_.XcodeVersion
}
Test-SimulatorInstalled -RuntimeId $_.RuntimeId -DeviceId $_.DeviceId -SimulatorName $_.SimulatorName -XcodeVersion $_.XcodeVersion
}
-8
View File
@@ -1,8 +0,0 @@
#!/bin/bash -e -o pipefail
source ~/utils/utils.sh
brew_smart_install httpd
sudo sed -Ei '' 's/Listen .*/Listen 80/' $(brew --prefix)/etc/httpd/httpd.conf
invoke_tests "WebServers" "Apache"
-16
View File
@@ -1,16 +0,0 @@
#!/bin/bash -e -o pipefail
source ~/utils/utils.sh
echo Installing aws...
AWS_CLI_URL="https://awscli.amazonaws.com/AWSCLIV2.pkg"
download_with_retries $AWS_CLI_URL "/tmp"
sudo installer -pkg /tmp/AWSCLIV2.pkg -target /
echo Installing aws sam cli...
brew tap aws/tap
brew_smart_install aws-sam-cli
echo "Install aws cli session manager"
brew install --cask session-manager-plugin
invoke_tests "Common" "AWS"
-21
View File
@@ -1,21 +0,0 @@
#!/bin/bash -e -o pipefail
source ~/utils/utils.sh
arch=$(get_arch)
# Check MacOS architecture and if ARM install using brew
if [ $arch == "arm64" ]; then
brew_smart_install azcopy
else
AZCOPY_DOWNLOAD_URL="https://aka.ms/downloadazcopy-v10-mac"
download_with_retries $AZCOPY_DOWNLOAD_URL "/tmp" "azcopy.zip"
unzip /tmp/azcopy.zip -d azcopy
AZCOPY_EXTRACTED=$(echo azcopy/azcopy*)
cp "$AZCOPY_EXTRACTED/azcopy" "/usr/local/bin/azcopy"
chmod +x "/usr/local/bin/azcopy"
echo "Done, cleaning up"
rm -rf azcopy*
fi
invoke_tests "Common" "AzCopy"
-9
View File
@@ -1,9 +0,0 @@
#!/bin/bash -e -o pipefail
source ~/utils/utils.sh
echo Installing bicep cli...
brew tap azure/bicep
brew_smart_install bicep
invoke_tests "Common" "Bicep"
@@ -1,7 +0,0 @@
#!/bin/bash -e -o pipefail
###########################################################################
# The script removes local Homebrew cache
#
###########################################################################
rm -rf "$(brew --cache)"
@@ -1,8 +1,11 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: configure-auto-updates.sh
## Desc: Disabling automatic updates
################################################################################
# Disabling automatic updates
sudo softwareupdate --schedule off
defaults write com.apple.SoftwareUpdate AutomaticDownload -int 0
defaults write com.apple.SoftwareUpdate CriticalUpdateInstall -int 0
defaults write com.apple.commerce AutoUpdate -bool false
defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool false
defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool false
@@ -1,7 +1,10 @@
#!/bin/bash -e -o pipefail
# This script was taken from https://github.com/timsutton/osx-vm-templates/blob/master/scripts/autologin.sh
# Distributed by MIT license, license can be found at the bottom of this script
################################################################################
## File: configure-autologin.sh
## Desc: add a Daemon to re-detect the attached network interfaces after vm is booted.
## Maintainer: @timsutton
## script was taken from https://github.com/timsutton/osx-vm-templates/blob/master/scripts/autologin.sh
################################################################################
echo "Enabling automatic GUI login for the '$USERNAME' user.."
@@ -15,4 +18,4 @@ Copyright (c) 2013-2017 Timothy Sutton
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
'
'
@@ -1,6 +1,10 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: configure-hostname.sh
## Desc: Change the hostname at startup to prevent duplicates
## Hostname and Computername should contain .local in name to avoid name resolution issues
################################################################################
# Add script for changing hostname to run on startup to prevent duplicate hostnames across the environment. Hostname and Computername should contain .local in name to avoid name resolution issues
tee -a /usr/local/bin/change_hostname.sh > /dev/null <<\EOF
#!/bin/bash -e -o pipefail
@@ -25,4 +29,4 @@ sudo tee -a /Library/LaunchDaemons/change_hostname.plist > /dev/null <<\EOF
<true/>
</dict>
</plist>
EOF
EOF
@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: configure-machine.sh
## Desc: Configure guest OS settings
################################################################################
source ~/utils/utils.sh
@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: configure-max-files-limitation.sh
## Desc: Configure max files limitation
################################################################################
Launch_Daemons="/Library/LaunchDaemons"
@@ -39,4 +43,3 @@ chmod 0644 "${Launch_Daemons}/limit.maxfiles.plist"
echo "Done, limit.maxfiles has been updated"
@@ -1,11 +1,11 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: configure-network-interface-detection.sh
## Desc: add a Daemon to re-detect the attached network interfaces after vm is booted.
## Maintainer: @timsutton
## script was taken from https://github.com/timsutton/osx-vm-templates/blob/master/scripts/add-network-interface-detection.sh
################################################################################
# This script was taken from https://github.com/timsutton/osx-vm-templates/blob/master/scripts/add-network-interface-detection.sh
# Distributed by MIT license, license can be found at the bottom of this script
# This script adds a Mac OS Launch Daemon, which runs every time the
# machine is booted. The daemon will re-detect the attached network
# interfaces. If this is not done, network devices may not work.
PLIST=/Library/LaunchDaemons/sonoma.detectnewhardware.plist
cat <<EOF > "${PLIST}"
<?xml version="1.0" encoding="UTF-8"?>
@@ -37,4 +37,4 @@ Copyright (c) 2013-2017 Timothy Sutton
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
'
'
@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: configure-ntpconf.sh
## Desc: Configure NTP servers and set the timezone to UTC
################################################################################
echo Additional NTP servers adding into /etc/ntp.conf file...
cat > /etc/ntp.conf << EOF
@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: configure-preimagedata.sh
## Desc: Configure data used in the image
################################################################################
source ~/utils/utils.sh
@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: configure-screensaver.sh
## Desc: Configure screensaver
################################################################################
# set screensaver idleTime to 0, to prevent turning screensaver on
macUUID=`ioreg -rd1 -c IOPlatformExpertDevice | grep -i "UUID" | cut -c27-62`
@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: configure-shell.sh
## Desc: Configure shell to use bash
################################################################################
source ~/utils/utils.sh
arch=$(get_arch)
@@ -11,4 +15,4 @@ sudo chsh -s /bin/bash root
if [[ $arch == "arm64" ]]; then
echo "Adding Homebrew environment to bash"
/opt/homebrew/bin/brew shellenv >> ~/.bashrc
fi
fi
@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: configure-ssh.sh
## Desc: Configure ssh
################################################################################
[[ ! -d ~/.ssh ]] && mkdir ~/.ssh 2>/dev/null
chmod 777 ~/.ssh
@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: configure-system.sh
## Desc: Post deployment system configuration actions
################################################################################
source ~/utils/utils.sh
@@ -1,6 +1,8 @@
#!/bin/bash -e -o pipefail
# This script adds permissions, which are required for some installed tools to work properly, to the TCC.db
################################################################################
## File: configure-tccdb-macos.sh
## Desc: Configure permissions to the TCC.db
################################################################################
source ~/utils/utils.sh
@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: configure-windows.sh
## Desc: Close open windows
################################################################################
source ~/utils/utils.sh
@@ -1,51 +1,40 @@
#!/usr/bin/env ruby
# What is this for?
# This script fixes an issue appeared for some Xcode users where it would show long identifiers
# in the list of simulators instead of usual short names. This is caused by duplicate simulators
# being sometimes created after switching between Xcode versions, with the same
# device type + runtime pair occurring more than once in your list of available simulators.
# Instead of showing the same simulator name twice, Xcode defaults to simulator identifiers.
#
# What it does?
# The script queries Xcode's `simctl` utility for all simulators you have, finds duplicate type + runtime pairs,
# and offers you to delete them. After that, Xcode should return to displaying the list of simulators normally.
# When searching for duplicates, the script sorts simulators by their creation time to make sure it deletes
# the copy that was created more recently.
#
# License
# This script was taken from https://gist.github.com/vlas-voloshin/f9982128200345cd3fb7 and some modifications made
# Distributed by MIT license, license can be found at the bottom of this script
################################################################################
## File: configure-xcode-simulators.rb
## Desc: List all simulators, find duplicate type and delete them.
## Maintainer: @vlas-voloshin
## script was taken from https://gist.github.com/vlas-voloshin/f9982128200345cd3fb7
################################################################################
class SimDevice
attr_accessor :runtime
attr_accessor :name
attr_accessor :identifier
attr_accessor :timestamp
def initialize(runtime, name, identifier, timestamp)
@runtime = runtime
@name = name
@identifier = identifier
@timestamp = timestamp
end
def to_s
return "#{@name} - #{@runtime} (#{@identifier}) [#{@timestamp}]"
end
def equivalent_to_device(device)
return @runtime == device.runtime && @name == device.name
end
end
# Executes a shell command and returns the result from stdout
def execute_simctl_command(command)
return %x[xcrun simctl #{command}]
end
# Retrieves the creation date/time of simulator with specified identifier
def simulator_creation_date(identifier)
directory = Dir.home() + "/Library/Developer/CoreSimulator/Devices/" + identifier
@@ -60,14 +49,14 @@ class SimDevice
return Time.now
end
end
# Deletes specified simulator
def delete_device(device)
execute_simctl_command("delete #{device.identifier}")
end
puts("Searching for simulators...")
# Retrieve the list of existing simulators
devices = []
runtime = ""
@@ -87,10 +76,10 @@ class SimDevice
devices.push(device)
end
end
# Sort the simulators by their creation timestamp, ascending
devices = devices.sort { |a, b| a.timestamp <=> b.timestamp }
duplicates = {}
# Enumerate all devices except for the last one
for i in 0..devices.count-2
@@ -106,12 +95,12 @@ class SimDevice
end
end
end
if duplicates.count == 0
puts("You don't have duplicate simulators!")
exit()
end
puts("Looks like you have #{duplicates.count} duplicate simulator#{duplicates.count > 1 ? "s" : ""}:")
duplicates.each_pair do |duplicate, original|
puts
@@ -120,14 +109,14 @@ class SimDevice
puts("#{original}")
end
puts
puts("Each duplicate was determined as the one created later than the 'original'.")
puts("Deleting...")
duplicates.each_key do |duplicate|
delete_device(duplicate)
end
puts("Done!")
=begin
@@ -152,4 +141,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
=end
=end
@@ -1,13 +1,12 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: configure-xcode-symlinks.sh
## Desc: Link the existing Xcodes into the correct location for provisionator.
## This is maintained for backwards compatibility only. Do not add new xcodes here.
################################################################################
source ~/utils/utils.sh
# Link the existing Xcodes into the correct location for provisionator.
# These symlinks are necessary for Xamarin team to make sure that xamarin-provisionator can find them.
# Old style provisionator directories. This is maintained for
# backwards compatibility only. Do not add new xcodes here.
ln -sf /Applications/Xcode_8.app /Applications/Xcode8.app
ln -sf /Applications/Xcode_8.1.app /Applications/Xcode81.app
ln -sf /Applications/Xcode_9.app /Applications/Xcode9.app
@@ -17,4 +16,4 @@ ln -sf /Applications/Xcode_9.3.app /Applications/Xcode93.app
ln -sf /Applications/Xcode_9.3.app /Applications/Xcode_9.3_beta.app
ln -sf /Applications/Xcode_9.4.app /Applications/Xcode_9.4-beta.app
ln -sf /Applications/Xcode_9.4.app /Applications/Xcode_9.4_beta.app
ln -sf /Applications/Xcode_9.4.app /Applications/Xcode_9.4_beta_2.app
ln -sf /Applications/Xcode_9.4.app /Applications/Xcode_9.4_beta_2.app
@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: configure-xcode.sh
## Desc: Configure Xcode after installation
################################################################################
source ~/utils/utils.sh
XCODE_LIST=($(get_toolset_value '.xcode.versions | reverse | .[].link'))
@@ -1,9 +1,7 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: action-archive-cache.sh
## Desc: Download latest release from https://github.com/actions/action-verions
## and un-tar to $HOME/actionarchivecache
## File: install-actions-cache.sh
## Desc: Download latest release from https://github.com/actions/action-versions
## Maintainer: #actions-runtime and @TingluoHuang
################################################################################
@@ -14,9 +12,9 @@ if [ ! -d $ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE ]; then
mkdir -p $ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE
fi
downloadUrl=$(get_github_package_download_url "actions/action-versions" "contains(\"action-versions.tar.gz\")" "latest")
echo "Downloading action-versions $downloadUrl"
download_with_retries "$downloadUrl" "/tmp" action-versions.tar.gz
tar -xzf /tmp/action-versions.tar.gz -C $ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE
download_url=$(get_github_package_download_url "actions/action-versions" "contains(\"action-versions.tar.gz\")" "latest")
echo "Downloading action-versions $download_url"
archive_path=$(download_with_retry "$download_url")
tar -xzf "$archive_path" -C "$ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE"
invoke_tests "ActionArchiveCache"
@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-android-sdk.sh
## Desc: Install Android SDK, NDK and tools
################################################################################
source ~/utils/utils.sh
function filter_components_by_version {
@@ -28,9 +33,9 @@ components=()
ANDROID_PLATFORM=$(get_toolset_value '.android.platform_min_version')
ANDROID_BUILD_TOOL=$(get_toolset_value '.android.build_tools_min_version')
ANDROID_EXTRA_LIST=($(get_toolset_value '.android."extra-list"[]'))
ANDROID_ADDON_LIST=($(get_toolset_value '.android."addon-list"[]'))
ANDROID_ADDITIONAL_TOOLS=($(get_toolset_value '.android."additional-tools"[]'))
ANDROID_EXTRA_LIST=($(get_toolset_value '.android."extras"[]'))
ANDROID_ADDON_LIST=($(get_toolset_value '.android."addons"[]'))
ANDROID_ADDITIONAL_TOOLS=($(get_toolset_value '.android."additional_tools"[]'))
ANDROID_NDK_MAJOR_VERSIONS=($(get_toolset_value '.android.ndk."versions"[]'))
ANDROID_NDK_MAJOR_DEFAULT=$(get_toolset_value '.android.ndk.default')
ANDROID_NDK_MAJOR_LATEST=$(get_toolset_value '.android.ndk."versions"[-1]')
@@ -38,19 +43,18 @@ ANDROID_NDK_MAJOR_LATEST=$(get_toolset_value '.android.ndk."versions"[-1]')
# Newer version(s) require Java 11 by default
# See https://github.com/actions/runner-images/issues/6960
ANDROID_HOME=$HOME/Library/Android/sdk
ANDROID_OSX_SDK_FILE=tools-macosx.zip
# Download the latest command line tools so that we can accept all of the licenses.
# See https://developer.android.com/studio/#command-tools
cmdlineToolsVersion=$(get_toolset_value '.android."cmdline-tools"')
if [[ $cmdlineToolsVersion == "latest" ]]; then
repositoryXmlUrl="https://dl.google.com/android/repository/repository2-1.xml"
download_with_retries $repositoryXmlUrl "/tmp" "repository2-1.xml"
repository_xml_url="https://dl.google.com/android/repository/repository2-1.xml"
repository_xml_path=$(download_with_retry $repository_xml_url)
cmdlineToolsVersion=$(
yq -p=xml \
'.sdk-repository.remotePackage[] | select(."+@path" == "cmdline-tools;latest" and .channelRef."+@ref" == "channel-0").archives.archive[].complete.url | select(contains("commandlinetools-mac"))' \
/tmp/repository2-1.xml
"$repository_xml_path"
)
if [[ -z $cmdlineToolsVersion ]]; then
@@ -60,16 +64,15 @@ if [[ $cmdlineToolsVersion == "latest" ]]; then
fi
echo "Downloading android command line tools..."
download_with_retries "https://dl.google.com/android/repository/${cmdlineToolsVersion}" /tmp $ANDROID_OSX_SDK_FILE
archive_path=$(download_with_retry "https://dl.google.com/android/repository/${cmdlineToolsVersion}")
echo "Uncompressing android command line tools..."
mkdir -p $HOME/Library/Android/sdk
unzip -q /tmp/$ANDROID_OSX_SDK_FILE -d $HOME/Library/Android/sdk/cmdline-tools
# Command line tools need to be placed in $HOME/Library/Android/sdk/cmdline-tools/latest to function properly
mv $HOME/Library/Android/sdk/cmdline-tools/cmdline-tools $HOME/Library/Android/sdk/cmdline-tools/latest
rm -f /tmp/$ANDROID_OSX_SDK_FILE
mkdir -p "$ANDROID_HOME"
unzip -q "$archive_path" -d "$ANDROID_HOME/cmdline-tools"
# Command line tools need to be placed in $ANDROID_HOME/cmdline-tools/latest to function properly
mv "$ANDROID_HOME/cmdline-tools/cmdline-tools" "$ANDROID_HOME/cmdline-tools/latest"
echo ANDROID_HOME is $ANDROID_HOME
echo ANDROID_HOME is "$ANDROID_HOME"
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest:$ANDROID_HOME/cmdline-tools/latest/bin
SDKMANAGER=$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager
@@ -122,12 +125,10 @@ do
done
# Download SDK tools to preserve backward compatibility
sdkTools="android-sdk-tools.zip"
sdkToolsVersion=$(get_toolset_value '.android."sdk-tools"')
if [ "$sdkToolsVersion" != "null" ]; then
download_with_retries "https://dl.google.com/android/repository/${sdkToolsVersion}" "." $sdkTools
unzip -o -qq $sdkTools -d ${ANDROID_SDK_ROOT}
rm -f $sdkTools
sdk_tools_version=$(get_toolset_value '.android."sdk-tools"')
if [ "$sdk_tools_version" != "null" ]; then
sdk_tools_archive_path=$(download_with_retry "https://dl.google.com/android/repository/${sdk_tools_version}")
unzip -o -qq "$sdk_tools_archive_path" -d "${ANDROID_SDK_ROOT}"
fi
invoke_tests "Android"
@@ -0,0 +1,12 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-apache.sh
## Desc: Install Apache HTTP Server
################################################################################
source ~/utils/utils.sh
brew_smart_install httpd
sudo sed -Ei '' 's/Listen .*/Listen 80/' $(brew --prefix)/etc/httpd/httpd.conf
invoke_tests "WebServers" "Apache"
@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-audiodevice.sh
## Desc: Install audio device
################################################################################
source ~/utils/utils.sh
echo "install switchaudio-osx"
@@ -0,0 +1,20 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-aws-tools.sh
## Desc: Install the AWS CLI, Session Manager plugin for the AWS CLI, and AWS SAM CLI
################################################################################
source ~/utils/utils.sh
echo Installing aws...
awscliv2_pkg_path=$(download_with_retry "https://awscli.amazonaws.com/AWSCLIV2.pkg")
sudo installer -pkg "$awscliv2_pkg_path" -target /
echo Installing aws sam cli...
brew tap aws/tap
brew_smart_install aws-sam-cli
echo "Install aws cli session manager"
brew install --cask session-manager-plugin
invoke_tests "Common" "AWS"
@@ -0,0 +1,21 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-azcopy.sh
## Desc: Install AzCopy
################################################################################
source ~/utils/utils.sh
arch=$(get_arch)
# Check MacOS architecture and if ARM install using brew
if [ "$arch" == "arm64" ]; then
brew_smart_install azcopy
else
archive_path=$(download_with_retry "https://aka.ms/downloadazcopy-v10-mac")
unzip -qq "$archive_path" -d /tmp/azcopy
extract_path=$(echo /tmp/azcopy/azcopy*)
cp "$extract_path/azcopy" "/usr/local/bin/azcopy"
chmod +x "/usr/local/bin/azcopy"
fi
invoke_tests "Common" "AzCopy"
@@ -0,0 +1,13 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-bicep.sh
## Desc: Install bicep cli
################################################################################
source ~/utils/utils.sh
echo Installing bicep cli...
brew tap azure/bicep
brew_smart_install bicep
invoke_tests "Common" "Bicep"
@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-chrome.sh
## Desc: Install chrome and chrome for testing browsers
################################################################################
source ~/utils/utils.sh
arch=$(get_arch)
@@ -14,20 +19,18 @@ echo "Google Chrome version is $FULL_CHROME_VERSION"
# Get Google Chrome versions information
CHROME_PLATFORM="mac-$arch"
CHROME_VERSIONS_URL="https://googlechromelabs.github.io/chrome-for-testing/latest-patch-versions-per-build-with-downloads.json"
download_with_retries "$CHROME_VERSIONS_URL" "/tmp" "latest-patch-versions-per-build-with-downloads.json"
CHROME_VERSIONS_JSON=$(cat /tmp/latest-patch-versions-per-build-with-downloads.json)
CHROME_VERSIONS_JSON="$(cat "$(download_with_retry "$CHROME_VERSIONS_URL")")"
# Download and unpack the latest release of Chrome Driver
CHROMEDRIVER_VERSION=$(echo "${CHROME_VERSIONS_JSON}" | jq -r '.builds["'"$CHROME_VERSION"'"].version')
echo "Installing Chrome Driver version $CHROMEDRIVER_VERSION"
CHROMEDRIVER_URL=$(echo "${CHROME_VERSIONS_JSON}" | jq -r '.builds["'"$CHROME_VERSION"'"].downloads.chromedriver[] | select(.platform=="'"${CHROME_PLATFORM}"'").url')
CHROMEDRIVER_ARCHIVE="chromedriver-${CHROME_PLATFORM}.zip"
CHROMEDRIVER_DIR="/usr/local/share/chromedriver-${CHROME_PLATFORM}"
CHROMEDRIVER_BIN="$CHROMEDRIVER_DIR/chromedriver"
download_with_retries "$CHROMEDRIVER_URL" "/tmp" "$CHROMEDRIVER_ARCHIVE"
unzip -qq /tmp/$CHROMEDRIVER_ARCHIVE -d /tmp/
CHROMEDRIVER_ARCHIVE_PATH=$(download_with_retry "$CHROMEDRIVER_URL")
unzip -qq "$CHROMEDRIVER_ARCHIVE_PATH" -d /tmp/
sudo mv "/tmp/chromedriver-${CHROME_PLATFORM}" "$CHROMEDRIVER_DIR"
ln -s "$CHROMEDRIVER_BIN" /usr/local/bin/chromedriver
echo "export CHROMEWEBDRIVER=$CHROMEDRIVER_DIR" >> "${HOME}/.bashrc"
@@ -37,11 +40,10 @@ CHROME_FOR_TESTING_VERSION=$(echo "${CHROME_VERSIONS_JSON}" | jq -r '.builds["'"
echo "Installing Google Chrome for Testing version $CHROME_FOR_TESTING_VERSION"
CHROME_FOR_TESTING_URL=$(echo "${CHROME_VERSIONS_JSON}" | jq -r '.builds["'"$CHROME_VERSION"'"].downloads.chrome[] | select(.platform=="'"${CHROME_PLATFORM}"'").url')
CHROME_FOR_TESTING_ARCHIVE="chrome-${CHROME_PLATFORM}.zip"
CHROME_FOR_TESTING_APP="Google Chrome for Testing.app"
download_with_retries $CHROME_FOR_TESTING_URL "/tmp" $CHROME_FOR_TESTING_ARCHIVE
unzip -qq /tmp/$CHROME_FOR_TESTING_ARCHIVE -d /tmp/
CHROME_FOR_TESTING_ARCHIVE_PATH=$(download_with_retry "$CHROME_FOR_TESTING_URL")
unzip -qq "$CHROME_FOR_TESTING_ARCHIVE_PATH" -d /tmp/
mv "/tmp/chrome-${CHROME_PLATFORM}/${CHROME_FOR_TESTING_APP}" "/Applications/${CHROME_FOR_TESTING_APP}"
echo "Installing Selenium"
@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-cocoapods.sh
## Desc: Install Cocoapods
################################################################################
# Setup the Cocoapods
echo "Installing Cocoapods..."
@@ -1,22 +1,26 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-codeql-bundle.sh
## Desc: Install CodeQL bundle
################################################################################
source ~/utils/utils.sh
# Retrieve the CLI version of the latest CodeQL bundle.
download_with_retries https://raw.githubusercontent.com/github/codeql-action/v2/src/defaults.json "/tmp" "codeql-defaults.json"
bundle_version="$(jq -r '.cliVersion' /tmp/codeql-defaults.json)"
defaults_json_path=$(download_with_retry https://raw.githubusercontent.com/github/codeql-action/v2/src/defaults.json)
bundle_version="$(jq -r '.cliVersion' "$defaults_json_path")"
bundle_tag_name="codeql-bundle-v$bundle_version"
echo "Downloading CodeQL bundle $bundle_version..."
# Note that this is the all-platforms CodeQL bundle, to support scenarios where customers run
# different operating systems within containers.
download_with_retries "https://github.com/github/codeql-action/releases/download/$bundle_tag_name/codeql-bundle.tar.gz" "/tmp" "codeql-bundle.tar.gz"
codeql_archive="/tmp/codeql-bundle.tar.gz"
archive_path=$(download_with_retry "https://github.com/github/codeql-action/releases/download/$bundle_tag_name/codeql-bundle.tar.gz")
codeql_toolcache_path="$AGENT_TOOLSDIRECTORY/CodeQL/$bundle_version/x64"
mkdir -p "$codeql_toolcache_path"
echo "Unpacking the downloaded CodeQL bundle archive..."
tar -xzf "$codeql_archive" -C "$codeql_toolcache_path"
tar -xzf "$archive_path" -C "$codeql_toolcache_path"
# Touch a file to indicate to the CodeQL Action that this bundle shipped with the toolcache. This is
# to support overriding the CodeQL version specified in defaults.json on GitHub Enterprise.
@@ -1,10 +1,15 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-common-utils.sh
## Desc: Install utils listed in toolset file
################################################################################
source ~/utils/utils.sh
# Download and install YQ in cases when it is not available in the formulae as for macOS 11: https://formulae.brew.sh/formula/yq
if is_BigSur; then
download_with_retries "https://github.com/mikefarah/yq/releases/latest/download/yq_darwin_amd64" "/tmp" "yq"
sudo install /tmp/yq /usr/local/bin/yq
binary_path=$(download_with_retry "https://github.com/mikefarah/yq/releases/latest/download/yq_darwin_amd64")
sudo install "$binary_path" /usr/local/bin/yq
fi
# Monterey needs future review:
@@ -22,12 +27,10 @@ for package in $cask_packages; do
if is_Monterey && [[ $package == "virtualbox" ]]; then
# Do not update VirtualBox on macOS 12 due to the issue with VMs in gurumediation state which blocks Vagrant on macOS: https://github.com/actions/runner-images/issues/8730
# macOS host: Dropped all kernel extensions. VirtualBox relies fully on the hypervisor and vmnet frameworks provided by Apple now.
vbcask_url="https://raw.githubusercontent.com/Homebrew/homebrew-cask/aa3c55951fc9d687acce43e5c0338f42c1ddff7b/Casks/virtualbox.rb"
download_with_retries $vbcask_url
brew install ./virtualbox.rb
rm ./virtualbox.rb
virtualbox_cask_path=$(download_with_retry "https://raw.githubusercontent.com/Homebrew/homebrew-cask/aa3c55951fc9d687acce43e5c0338f42c1ddff7b/Casks/virtualbox.rb")
brew install "$virtualbox_cask_path"
else
brew install --cask $package
brew install --cask "$package"
fi
done
@@ -1,11 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-dotnet.sh
## Desc: Install dotnet
################################################################################
###########################################################################
# The main idea of this script is to automate dotnet installs
# Based on:
# https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script
#
###########################################################################
source ~/utils/utils.sh
export DOTNET_CLI_TELEMETRY_OPTOUT=1
@@ -14,8 +12,8 @@ arch=$(get_arch)
# Download installer from dot.net and keep it locally
DOTNET_INSTALL_SCRIPT="https://dot.net/v1/dotnet-install.sh"
download_with_retries $DOTNET_INSTALL_SCRIPT .
chmod +x ./dotnet-install.sh
install_script_path=$(download_with_retry $DOTNET_INSTALL_SCRIPT)
chmod +x "$install_script_path"
ARGS_LIST=()
echo "Parsing dotnet SDK (except rc and preview versions) from .json..."
@@ -24,15 +22,15 @@ DOTNET_VERSIONS=($(get_toolset_value ".dotnet.arch[\"$arch\"].versions | .[]"))
for DOTNET_VERSION in "${DOTNET_VERSIONS[@]}"; do
RELEASE_URL="https://raw.githubusercontent.com/dotnet/core/main/release-notes/${DOTNET_VERSION}/releases.json"
download_with_retries "$RELEASE_URL" "/tmp" "dotnet_${DOTNET_VERSION}.json"
releases_json_file=$(download_with_retry "$RELEASE_URL")
if [[ $DOTNET_VERSION == "6.0" ]]; then
ARGS_LIST+=(
$(cat /tmp/dotnet_${DOTNET_VERSION}.json | jq -r 'first(.releases[].sdks[]?.version | select(contains("preview") or contains("rc") | not))')
$(cat "$releases_json_file" | jq -r 'first(.releases[].sdks[]?.version | select(contains("preview") or contains("rc") | not))')
)
else
ARGS_LIST+=(
$(cat /tmp/dotnet_${DOTNET_VERSION}.json | \
$(cat "$releases_json_file" | \
jq -r '.releases[].sdk."version"' | grep -v -E '\-(preview|rc)\d*' | \
sort -r | rev | uniq -s 2 | rev)
)
@@ -40,11 +38,9 @@ for DOTNET_VERSION in "${DOTNET_VERSIONS[@]}"; do
done
for ARGS in "${ARGS_LIST[@]}"; do
./dotnet-install.sh --version $ARGS -NoPath --arch $arch
"$install_script_path" --version $ARGS -NoPath --arch $arch
done
rm ./dotnet-install.sh
# dotnet installer doesn't create symlink to executable in /user/local/bin
# Moreover at that moment /user/local/bin doesn't exist (though already added to $PATH)
ln -s ~/.dotnet/dotnet /usr/local/bin/dotnet
@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-edge.sh
## Desc: Install edge browser
################################################################################
source ~/utils/utils.sh
echo "Installing Microsoft Edge..."
@@ -12,29 +17,23 @@ echo "Version of Microsoft Edge: ${EDGE_VERSION}"
echo "Installing Microsoft Edge WebDriver..."
EDGE_DRIVER_VERSION_URL="https://msedgedriver.azureedge.net/LATEST_RELEASE_${EDGE_VERSION_MAJOR}_MACOS"
download_with_retries "$EDGE_DRIVER_VERSION_URL" "/tmp" "edge-version"
EDGE_DRIVER_LATEST_VERSION=$(cat /tmp/edge-version | iconv -f utf-16 -t utf-8 | tr -d '\r')
EDGE_DRIVER_VERSION_FILE_PATH=$(download_with_retry "https://msedgedriver.azureedge.net/LATEST_RELEASE_${EDGE_VERSION_MAJOR}_MACOS")
EDGE_DRIVER_LATEST_VERSION=$(iconv -f utf-16 -t utf-8 "$EDGE_DRIVER_VERSION_FILE_PATH" | tr -d '\r')
EDGE_DRIVER_URL="https://msedgedriver.azureedge.net/${EDGE_DRIVER_LATEST_VERSION}/edgedriver_mac64.zip"
echo "Compatible version of WebDriver: ${EDGE_DRIVER_LATEST_VERSION}"
pushd "/tmp" > /dev/null
download_with_retries $EDGE_DRIVER_URL "." "edgedriver.zip"
EDGE_DRIVER_ARCHIVE_PATH=$(download_with_retry "$EDGE_DRIVER_URL")
# Move webdriver to the separate directory to be consistent with the docs
# https://docs.microsoft.com/en-us/azure/devops/pipelines/test/continuous-test-selenium?view=azure-devops#decide-how-you-will-deploy-and-test-your-app
APPLICATION="/usr/local/bin/msedgedriver"
EDGEDRIVER_DIR="/usr/local/share/edge_driver"
EDGEDRIVER_BIN="$EDGEDRIVER_DIR/msedgedriver"
EDGE_DRIVER_DIR="/usr/local/share/edge_driver"
mkdir -p $EDGE_DRIVER_DIR
unzip -qq "$EDGE_DRIVER_ARCHIVE_PATH" -d "$EDGE_DRIVER_DIR"
ln -s "$EDGE_DRIVER_DIR/msedgedriver" "/usr/local/bin/msedgedriver"
mkdir -p $EDGEDRIVER_DIR
unzip "edgedriver.zip" -d $EDGEDRIVER_DIR
ln -s "$EDGEDRIVER_BIN" $APPLICATION
echo "export EDGEWEBDRIVER=${EDGEDRIVER_DIR}" >> "${HOME}/.bashrc"
popd > /dev/null
echo "export EDGEWEBDRIVER=${EDGE_DRIVER_DIR}" >> "${HOME}/.bashrc"
# Configure Edge Updater to prevent auto update
# https://learn.microsoft.com/en-us/deployedge/edge-learnmore-edgeupdater-for-macos
@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-firefox.sh
## Desc: Install firefox browser
################################################################################
source ~/utils/utils.sh
echo "Installing Firefox..."
@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-gcc.sh
## Desc: Install GCC
################################################################################
source ~/utils/utils.sh
gccVersions=$(get_toolset_value '.gcc.versions | .[]')
@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-git.sh
## Desc: Install Git and Git LFS
################################################################################
source ~/utils/utils.sh
echo Installing Git...
@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-golang.sh
## Desc: Install Go
################################################################################
source ~/utils/utils.sh
DEFAULT_GO_VERSION=$(get_toolset_value '.go.default')
@@ -8,4 +13,4 @@ brew_smart_install "go@${DEFAULT_GO_VERSION}"
# Create symlinks to preserve backward compatibility. Symlinks are not created when non-latest go is being installed
ln -sf $(brew --prefix go@${DEFAULT_GO_VERSION})/bin/* /usr/local/bin/
invoke_tests "Common" "Go"
invoke_tests "Common" "Go"
@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-haskell.sh
## Desc: Install Haskell
################################################################################
source ~/utils/utils.sh
@@ -1,12 +1,16 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-homebrew.sh
## Desc: Install Homebrew
################################################################################
source ~/utils/utils.sh
arch=$(get_arch)
echo "Installing Homebrew..."
download_with_retries "https://raw.githubusercontent.com/Homebrew/install/master/install.sh" "/tmp" "homebrew-install.sh"
/bin/bash /tmp/homebrew-install.sh
homebrew_installer_path=$(download_with_retry "https://raw.githubusercontent.com/Homebrew/install/master/install.sh")
/bin/bash "$homebrew_installer_path"
if [[ $arch == "arm64" ]]; then
/opt/homebrew/bin/brew update
@@ -36,4 +40,4 @@ echo "Installing wget..."
brew_smart_install "wget"
# init brew bundle feature
brew tap Homebrew/bundle
brew tap Homebrew/bundle
@@ -0,0 +1,13 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-llvm.sh
## Desc: Install LLVM
################################################################################
source ~/utils/utils.sh
llvmVersion=$(get_toolset_value '.llvm.version')
brew_smart_install "llvm@${llvmVersion}"
invoke_tests "LLVM"
@@ -0,0 +1,24 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-miniconda.sh
## Desc: Install Miniconda
################################################################################
source ~/utils/utils.sh
miniconda_installer_path=$(download_with_retry "https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh")
chmod +x "$miniconda_installer_path"
sudo "$miniconda_installer_path" -b -p /usr/local/miniconda
# Chmod with full permissions recursively to avoid permissions restrictions
sudo chmod -R 777 /usr/local/miniconda
sudo ln -s /usr/local/miniconda/bin/conda /usr/local/bin/conda
if [ -d "$HOME/.conda" ]; then
sudo chown -R $USER "$HOME/.conda"
fi
echo "export CONDA=/usr/local/miniconda" >> $HOME/.bashrc
invoke_tests "Common" "Miniconda"
@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-mongodb.sh
## Desc: Install MongoDB
################################################################################
source ~/utils/utils.sh
# MongoDB object-value database
@@ -1,50 +1,44 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: mono.sh
## Desc: Installs Mono Framework
## File: install-mono.sh
## Desc: Install Mono Framework
################################################################################
# Source utility functions
source ~/utils/utils.sh
# Create a temporary directory to store downloaded files
TMP_DIR=$(mktemp -d /tmp/visualstudio.XXXX)
# Install Mono Framework
MONO_VERSION_FULL=$(get_toolset_value '.mono.framework.version')
MONO_VERSION=$(echo "$MONO_VERSION_FULL" | cut -d. -f 1,2,3)
MONO_VERSION_SHORT=$(echo $MONO_VERSION_FULL | cut -d. -f 1,2)
MONO_PKG_URL="https://download.mono-project.com/archive/${MONO_VERSION}/macos-10-universal/MonoFramework-MDK-${MONO_VERSION_FULL}.macos10.xamarin.universal.pkg"
MONO_PKG_NAME=${MONO_PKG_URL##*/}
MONO_VERSIONS_PATH='/Library/Frameworks/Mono.framework/Versions'
download_with_retries "$MONO_PKG_URL" "$TMP_DIR"
echo "Installing $MONO_PKG_NAME..."
sudo installer -pkg "$TMP_DIR/$MONO_PKG_NAME" -target /
MONO_PKG_PATH=$(download_with_retry "$MONO_PKG_URL")
echo "Installing Mono Framework ${MONO_VERSION_FULL}..."
sudo installer -pkg "$MONO_PKG_PATH" -target /
# Download and install NUnit console
NUNIT_VERSION=$(get_toolset_value '.mono.nunit.version')
NUNIT_ARCHIVE_URL="https://github.com/nunit/nunit-console/releases/download/${NUNIT_VERSION}/NUnit.Console-${NUNIT_VERSION}.zip"
NUNIT_ARCHIVE_NAME=${NUNIT_ARCHIVE_URL##*/}
NUNIT_PATH="/Library/Developer/nunit"
NUNIT_VERSION_PATH="$NUNIT_PATH/$NUNIT_VERSION"
download_with_retries "$NUNIT_ARCHIVE_URL" "$TMP_DIR"
echo "Installing $NUNIT_ARCHIVE_NAME..."
NUNIT_ARCHIVE_PATH=$(download_with_retry "$NUNIT_ARCHIVE_URL")
echo "Installing NUnit ${NUNIT_VERSION}..."
sudo mkdir -p "$NUNIT_VERSION_PATH"
sudo unzip -q "$TMP_DIR/$NUNIT_ARCHIVE_NAME" -d "$NUNIT_VERSION_PATH"
sudo unzip -q "$NUNIT_ARCHIVE_PATH" -d "$NUNIT_VERSION_PATH"
# Create a wrapper script for nunit3-console
echo "Creating nunit3-console wrapper..."
NUNIT3_CONSOLE_WRAPPER=nunit3-console
cat <<EOF > "${TMP_DIR}/${NUNIT3_CONSOLE_WRAPPER}"
NUNIT3_CONSOLE_WRAPPER=$(mktemp)
cat <<EOF > "$NUNIT3_CONSOLE_WRAPPER"
#!/bin/bash -e -o pipefail
exec ${MONO_VERSIONS_PATH}/${MONO_VERSION}/bin/mono --debug \$MONO_OPTIONS $NUNIT_VERSION_PATH/nunit3-console.exe "\$@"
EOF
cat "${TMP_DIR}/${NUNIT3_CONSOLE_WRAPPER}"
sudo chmod +x "${TMP_DIR}/${NUNIT3_CONSOLE_WRAPPER}"
sudo mv "${TMP_DIR}/${NUNIT3_CONSOLE_WRAPPER}" "${MONO_VERSIONS_PATH}/${MONO_VERSION}/Commands/${NUNIT3_CONSOLE_WRAPPER}"
cat "$NUNIT3_CONSOLE_WRAPPER"
sudo chmod +x "$NUNIT3_CONSOLE_WRAPPER"
sudo mv "$NUNIT3_CONSOLE_WRAPPER" "${MONO_VERSIONS_PATH}/${MONO_VERSION}/Commands/nunit3-console"
# Create a symlink for the short version of Mono (e.g., 6.12)
echo "Creating short symlink '${MONO_VERSION_SHORT}'..."
@@ -0,0 +1,12 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-nginx.sh
## Desc: Install Nginx
################################################################################
source ~/utils/utils.sh
brew_smart_install nginx
sudo sed -Ei '' 's/listen.*/listen 80;/' $(brew --prefix)/etc/nginx/nginx.conf
invoke_tests "WebServers" "Nginx"
@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-node.sh
## Desc: Install Node.js
################################################################################
source ~/utils/utils.sh
defaultVersion=$(get_toolset_value '.node.default')
@@ -8,8 +13,8 @@ brew_smart_install "node@$defaultVersion"
brew link node@$defaultVersion --force --overwrite
echo Installing yarn...
download_with_retries "https://yarnpkg.com/install.sh" "/tmp" "yarn-install.sh"
bash /tmp/yarn-install.sh
yarn_installer_path=$(download_with_retry "https://yarnpkg.com/install.sh")
bash "$yarn_installer_path"
if is_BigSur || is_Monterey; then
npm_global_packages=$(get_toolset_value '.npm.global_packages[].name')
+28
View File
@@ -0,0 +1,28 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-nvm.sh
## Desc: Install node version manager
################################################################################
source ~/utils/utils.sh
[ -n "$API_PAT" ] && authString=(-H "Authorization: token ${API_PAT}")
nvm_version=$(curl "${authString[@]}" -fsSL https://api.github.com/repos/nvm-sh/nvm/releases/latest | jq -r '.tag_name')
nvm_installer_path=$(download_with_retry "https://raw.githubusercontent.com/nvm-sh/nvm/$nvm_version/install.sh")
if bash "$nvm_installer_path"; then
. ~/.bashrc
nvm --version
for version in $(get_toolset_value '.node.nvm_versions[]'); do
nvm install "v${version}"
done
# set system node as default
nvm alias default system
echo "Node version manager has been installed successfully"
else
echo "Node version manager installation failed"
fi
invoke_tests "Node" "nvm"
@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-openjdk.sh
## Desc: Install openjdk
################################################################################
source ~/utils/utils.sh
createEnvironmentVariable() {
@@ -29,16 +34,16 @@ installOpenJDK() {
local JAVA_VERSION=$1
# Get link for Java binaries and Java version
download_with_retries "https://api.adoptium.net/v3/assets/latest/${JAVA_VERSION}/hotspot" "/tmp" "openjdk-hotspot.json"
hotspot_json_path=$(download_with_retry "https://api.adoptium.net/v3/assets/latest/${JAVA_VERSION}/hotspot")
if [[ $arch == "arm64" ]]; then
asset=$(jq -r '.[] | select(.binary.os=="mac" and .binary.image_type=="jdk" and .binary.architecture=="aarch64")' /tmp/openjdk-hotspot.json)
asset=$(jq -r '.[] | select(.binary.os=="mac" and .binary.image_type=="jdk" and .binary.architecture=="aarch64")' "$hotspot_json_path")
else
asset=$(jq -r '.[] | select(.binary.os=="mac" and .binary.image_type=="jdk" and .binary.architecture=="x64")' /tmp/openjdk-hotspot.json)
asset=$(jq -r '.[] | select(.binary.os=="mac" and .binary.image_type=="jdk" and .binary.architecture=="x64")' "$hotspot_json_path")
fi
archivePath=$(echo ${asset} | jq -r '.binary.package.link')
fullVersion=$(echo ${asset} | jq -r '.version.semver' | tr '+' '-')
archive_url=$(echo "$asset" | jq -r '.binary.package.link')
fullVersion=$(echo "$asset" | jq -r '.version.semver' | tr '+' '-')
# Remove 'LTS' suffix from the version if present
fullVersion="${fullVersion//.LTS/}"
@@ -53,12 +58,12 @@ installOpenJDK() {
fi
# Download and extract Java binaries
download_with_retries ${archivePath} /tmp OpenJDK-${fullVersion}.tar.gz
archive_path=$(download_with_retry "$archive_url")
echo "Creating ${javaToolcacheVersionArchPath} directory"
mkdir -p ${javaToolcacheVersionArchPath}
tar -xf /tmp/OpenJDK-${fullVersion}.tar.gz -C ${javaToolcacheVersionArchPath} --strip-components=1
tar -xf "$archive_path" -C ${javaToolcacheVersionArchPath} --strip-components=1
# Create complete file
if [[ $arch == "arm64" ]]; then
@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-openssl.sh
## Desc: Install openssl
################################################################################
source ~/utils/utils.sh
echo "Install [email protected]"
@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-php.sh
## Desc: Install PHP
################################################################################
source ~/utils/utils.sh
echo Installing PHP
@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-pipx-packages.sh
## Desc: Install Pipx Packages
################################################################################
source ~/utils/utils.sh
export PATH="$PATH:/opt/pipx_bin"
@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-postgresql.sh
## Desc: Install PostgreSQL
################################################################################
source ~/utils/utils.sh
# Fetch PostgreSQL version to install from the toolset
@@ -1,19 +1,23 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-powershell.sh
## Desc: Install PowerShell
################################################################################
source ~/utils/utils.sh
echo Installing PowerShell...
arch=$(get_arch)
download_with_retries "https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/metadata.json" "/tmp" "powershell-metadata.json"
psver=$(cat /tmp/powershell-metadata.json | jq -r '.LTSReleaseTag[0]')
psDownloadUrl=$(get_github_package_download_url "PowerShell/PowerShell" "contains(\"osx-$arch.pkg\")" "$psver" "$API_PAT")
download_with_retries $psDownloadUrl "/tmp" "powershell.pkg"
metadata_json_path=$(download_with_retry "https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/metadata.json")
version=$(jq -r '.LTSReleaseTag[0]' "$metadata_json_path")
download_url=$(get_github_package_download_url "PowerShell/PowerShell" "contains(\"osx-$arch.pkg\")" "$version" "$API_PAT")
pkg_path=$(download_with_retry "$download_url")
# Work around the issue on macOS Big Sur 11.5 or higher for possible error message ("can't be opened because Apple cannot check it for malicious software") when installing the package
sudo xattr -rd com.apple.quarantine /tmp/powershell.pkg
sudo xattr -rd com.apple.quarantine "$pkg_path"
sudo installer -pkg /tmp/powershell.pkg -target /
sudo installer -pkg "$pkg_path" -target /
# Install PowerShell modules
psModules=$(get_toolset_value '.powershellModules[].name')
@@ -1,7 +1,7 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: pypy.sh
## Desc: Installs PyPy
## File: install-pypy.sh
## Desc: Install PyPy
################################################################################
source ~/utils/utils.sh
@@ -10,13 +10,12 @@ function InstallPyPy
{
PACKAGE_URL=$1
PACKAGE_TAR_NAME=$(echo $PACKAGE_URL | awk -F/ '{print $NF}')
PACKAGE_TAR_NAME=$(basename "$PACKAGE_URL")
echo "Downloading tar archive '$PACKAGE_TAR_NAME'"
PACKAGE_TAR_TEMP_PATH="/tmp/$PACKAGE_TAR_NAME"
download_with_retries $PACKAGE_URL "/tmp" "$PACKAGE_TAR_NAME"
archive_path=$(download_with_retry "$PACKAGE_URL")
echo "Expand '$PACKAGE_TAR_NAME' to the /tmp folder"
tar xf $PACKAGE_TAR_TEMP_PATH -C /tmp
tar xf "$archive_path" -C /tmp
# Get Python version
PACKAGE_NAME=${PACKAGE_TAR_NAME/.tar.bz2/}
@@ -70,17 +69,14 @@ function InstallPyPy
echo "Create complete file"
touch $PYPY_TOOLCACHE_VERSION_PATH/x64.complete
echo "Remove '$PACKAGE_TAR_TEMP_PATH'"
rm -f $PACKAGE_TAR_TEMP_PATH
}
arch=$(get_arch)
download_with_retries "https://downloads.python.org/pypy/versions.json" "/tmp" "pypy-versions.json"
versions_json_path=$(download_with_retry "https://downloads.python.org/pypy/versions.json")
toolsetVersions=$(get_toolset_value '.toolcache[] | select(.name | contains("PyPy")) | .arch.'$arch'.versions[]')
for toolsetVersion in $toolsetVersions; do
latestMajorPyPyVersion=$(cat /tmp/pypy-versions.json |
latestMajorPyPyVersion=$(cat "$versions_json_path" |
jq -r --arg toolsetVersion $toolsetVersion '.[]
| select((.python_version | startswith($toolsetVersion)) and .stable == true).files[]
| select(.platform == "darwin").download_url' | head -1)
@@ -1,23 +1,28 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-python.sh
## Desc: Install Python
################################################################################
source ~/utils/utils.sh
echo "Installing Python Tooling"
if is_Monterey || is_BigSur; then
echo "Install latest Python 2"
Python2Url="https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg"
download_with_retries $Python2Url "/tmp" "python2.pkg"
python2_pkg=$(download_with_retry "https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg")
sudo installer -showChoiceChangesXML -pkg /tmp/python2.pkg -target / > /tmp/python2_choices.xml
choice_changes_xml=$(mktemp /tmp/python2_choice_changes.xml.XXXXXX)
sudo installer -showChoiceChangesXML -pkg "$python2_pkg" -target / | tee "$choice_changes_xml" > /dev/null
# To avoid symlink conflicts, remove tools installation in /usr/local/bin using installer choices
xmllint --shell /tmp/python2_choices.xml <<EOF
xmllint --shell "$choice_changes_xml" <<EOF
cd //array/dict[string[text()='org.python.Python.PythonUnixTools-2.7']]/integer
set 0
save
EOF
sudo installer -applyChoiceChangesXML /tmp/python2_choices.xml -pkg /tmp/python2.pkg -target /
sudo installer -applyChoiceChangesXML "$choice_changes_xml" -pkg "$python2_pkg" -target /
pip install --upgrade pip
@@ -0,0 +1,8 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-rosetta.sh
## Desc: Install Rosetta
################################################################################
echo 'Installing Rosetta'
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-ruby.sh
## Desc: Install Ruby
################################################################################
source ~/utils/utils.sh
arch=$(get_arch)
@@ -40,11 +45,10 @@ if ! is_Arm64; then
mkdir -p $RUBY_VERSION_PATH
echo "Downloading tar archive $PACKAGE_TAR_NAME"
DOWNLOAD_URL="https://github.com/ruby/ruby-builder/releases/download/toolcache/${PACKAGE_TAR_NAME}"
download_with_retries $DOWNLOAD_URL "/tmp" $PACKAGE_TAR_NAME
ARCHIVE_PATH=$(download_with_retry "https://github.com/ruby/ruby-builder/releases/download/toolcache/${PACKAGE_TAR_NAME}")
echo "Expand '$PACKAGE_TAR_NAME' to the '$RUBY_VERSION_PATH' folder"
tar xf "/tmp/$PACKAGE_TAR_NAME" -C $RUBY_VERSION_PATH
tar xf "$ARCHIVE_PATH" -C $RUBY_VERSION_PATH
COMPLETE_FILE_PATH="$RUBY_VERSION_PATH/x64.complete"
if [ ! -f $COMPLETE_FILE_PATH ]; then
echo "Create complete file"
@@ -52,4 +56,5 @@ if ! is_Arm64; then
fi
done
fi
invoke_tests "Ruby.$arch"
@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-rubygems.sh
## Desc: Install RubyGems
################################################################################
source ~/utils/utils.sh
echo Updating RubyGems...
@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-rust.sh
## Desc: Install Rust
################################################################################
source ~/utils/utils.sh
echo Installing Rustup...
@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-safari.sh
## Desc: Install Safari browser
################################################################################
echo "Enabling safari driver..."
# https://developer.apple.com/documentation/webkit/testing_with_webdriver_in_safari
@@ -13,4 +17,4 @@ safari_plist="$HOME/Library/WebDriver/com.apple.Safari.plist"
/usr/libexec/PlistBuddy -c 'delete AllowRemoteAutomation' $safari_plist || true
/usr/libexec/PlistBuddy -c 'add AllowRemoteAutomation bool true' $safari_plist
invoke_tests "Browsers" "Safari"
invoke_tests "Browsers" "Safari"
@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-swiftlint.sh
## Desc: Install SwiftLint
################################################################################
source ~/utils/utils.sh
echo Installing Swiftlint...
@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-vcpkg.sh
## Desc: Install vcpkg
################################################################################
source ~/utils/utils.sh
# Set env variable for vcpkg
@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-visualstudio.sh
## Desc: Install Visual Studio
################################################################################
source ~/utils/utils.sh
source ~/utils/xamarin-utils.sh
@@ -16,18 +21,16 @@ install_vsmac() {
fi
echo "Installing Visual Studio ${VSMAC_VERSION} for Mac"
TMPMOUNT=`/usr/bin/mktemp -d /tmp/visualstudio.XXXX`
TMPMOUNT_DOWNLOADS="$TMPMOUNT/downloads"
mkdir $TMPMOUNT_DOWNLOADS
TMPMOUNT=$(/usr/bin/mktemp -d /tmp/visualstudio.XXXX)
mkdir -p "$TMPMOUNT/downloads"
download_with_retries $VSMAC_DOWNLOAD_URL $TMPMOUNT_DOWNLOADS
VSMAC_INSTALLER=$(download_with_retry "$VSMAC_DOWNLOAD_URL" "$TMPMOUNT/downloads/${VSMAC_DOWNLOAD_URL##*/}")
echo "Mounting Visual Studio..."
VISUAL_STUDIO_NAME=${VSMAC_DOWNLOAD_URL##*/}
hdiutil attach "$TMPMOUNT_DOWNLOADS/$VISUAL_STUDIO_NAME" -mountpoint "$TMPMOUNT"
hdiutil attach "$VSMAC_INSTALLER" -mountpoint "$TMPMOUNT"
echo "Moving Visual Studio to /Applications/..."
pushd $TMPMOUNT
pushd "$TMPMOUNT"
tar cf - "./Visual Studio.app" | tar xf - -C /Applications/
if [ $VSMAC_VERSION != $VSMAC_DEFAULT ]; then
@@ -1,13 +1,18 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-xamarin.sh
## Desc: Install Xamarin
################################################################################
source ~/utils/utils.sh
source ~/utils/xamarin-utils.sh
MONO_VERSIONS=($(get_toolset_value '.xamarin."mono-versions" | reverse | .[]'))
XAMARIN_IOS_VERSIONS=($(get_toolset_value '.xamarin."ios-versions" | reverse | .[]'))
XAMARIN_MAC_VERSIONS=($(get_toolset_value '.xamarin."mac-versions" | reverse | .[]'))
XAMARIN_ANDROID_VERSIONS=($(get_toolset_value '.xamarin."android-versions" | reverse | .[]'))
MONO_VERSIONS=($(get_toolset_value '.xamarin."mono_versions" | reverse | .[]'))
XAMARIN_IOS_VERSIONS=($(get_toolset_value '.xamarin."ios_versions" | reverse | .[]'))
XAMARIN_MAC_VERSIONS=($(get_toolset_value '.xamarin."mac_versions" | reverse | .[]'))
XAMARIN_ANDROID_VERSIONS=($(get_toolset_value '.xamarin."android_versions" | reverse | .[]'))
LATEST_SDK_SYMLINK=$(get_toolset_value '.xamarin.bundles[0].symlink')
CURRENT_SDK_SYMLINK=$(get_toolset_value '.xamarin."bundle-default"')
CURRENT_SDK_SYMLINK=$(get_toolset_value '.xamarin."bundle_default"')
DEFAULT_XCODE_VERSION=$(get_toolset_value '.xcode.default')
if [ "$CURRENT_SDK_SYMLINK" == "latest" ]; then
@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-xcode-clt.sh
## Desc: Install Xcode Command Line Tools
################################################################################
source ~/utils/utils.sh
is_clt_installed() {
@@ -43,4 +48,4 @@ while ! is_clt_installed; do
((retries--))
echo "Wait $sleepInterval seconds before the next check for installed Command Line Tools"
sleep $sleepInterval
done
done
@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-xcode-simulators.sh
## Desc: Install Xcode simulators
################################################################################
source ~/utils/utils.sh
-8
View File
@@ -1,8 +0,0 @@
#!/bin/bash -e -o pipefail
source ~/utils/utils.sh
llvmVersion=$(get_toolset_value '.llvm.version')
brew_smart_install "llvm@${llvmVersion}"
invoke_tests "LLVM"
-21
View File
@@ -1,21 +0,0 @@
#!/bin/bash -e -o pipefail
source ~/utils/utils.sh
download_with_retries "https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh" "/tmp" "miniconda.sh"
chmod +x /tmp/miniconda.sh
sudo /tmp/miniconda.sh -b -p /usr/local/miniconda
# Chmod with full permissions recursively to avoid permissions restrictions
sudo chmod -R 777 /usr/local/miniconda
sudo ln -s /usr/local/miniconda/bin/conda /usr/local/bin/conda
if [ -d "$HOME/.conda" ]; then
sudo chown -R $USER "$HOME/.conda"
fi
echo "export CONDA=/usr/local/miniconda" >> $HOME/.bashrc
invoke_tests "Common" "Miniconda"
-8
View File
@@ -1,8 +0,0 @@
#!/bin/bash -e -o pipefail
source ~/utils/utils.sh
brew_smart_install nginx
sudo sed -Ei '' 's/listen.*/listen 80;/' $(brew --prefix)/etc/nginx/nginx.conf
invoke_tests "WebServers" "Nginx"
-30
View File
@@ -1,30 +0,0 @@
#!/bin/bash -e -o pipefail
###########################################################################
# The script installs node version manager with node versions 10,12 and 14
#
###########################################################################
source ~/utils/utils.sh
[ -n "$API_PAT" ] && authString=(-H "Authorization: token ${API_PAT}")
VERSION=$(curl "${authString[@]}" -fsSL https://api.github.com/repos/nvm-sh/nvm/releases/latest | jq -r '.tag_name')
download_with_retries "https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION/install.sh" "/tmp" "nvm-install.sh"
bash /tmp/nvm-install.sh
if [ $? -eq 0 ]; then
. ~/.bashrc
nvm --version
nodeVersions=$(get_toolset_value '.node.nvm_versions[]')
for version in ${nodeVersions[@]}
do
nvm install v${version}
done
# set system node as default
nvm alias default system
else
echo error
fi
echo "Node version manager has been installed successfully"
invoke_tests "Node" "nvm"
-3
View File
@@ -1,3 +0,0 @@
#!/bin/bash -e -o pipefail
shutdown -r now
-4
View File
@@ -1,4 +0,0 @@
#!/bin/bash -e -o pipefail
echo 'Installing Rosetta'
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
@@ -17,7 +17,7 @@ Import-Module "$PSScriptRoot/SoftwareReport.Xamarin.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/SoftwareReport.Toolcache.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/SoftwareReport.Browsers.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/SoftwareReport.WebServers.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/../helpers/SoftwareReport.Helpers.psm1"
Import-Module "$PSScriptRoot/SoftwareReport.Helpers.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
Import-Module "$PSScriptRoot/../helpers/Xcode.Helpers.psm1"
@@ -179,15 +179,19 @@ if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
$tools.AddToolVersion("GHC", $(Get-GHCVersion))
$tools.AddToolVersion("GHCup", $(Get-GHCupVersion))
$tools.AddToolVersion("Jazzy", $(Get-JazzyVersion))
}
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) {
$tools.AddToolVersion("Stack", $(Get-StackVersion))
}
$tools.AddToolVersion("SwiftFormat", $(Get-SwiftFormatVersion))
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
$tools.AddToolVersion("Swig", $(Get-SwigVersion))
}
if (-not $os.IsBigSur) {
$tools.AddToolVersion("Xcbeautify", $(Get-XcbeautifyVersion))
}
$tools.AddToolVersion("Xcode Command Line Tools", $(Get-XcodeCommandLineToolsVersion))
if (-not $os.IsBigSur) {
$tools.AddToolVersion("Xcodes", $(Get-XcodesVersion))
}
# Linters
$linters = $installedSoftware.AddHeader("Linters")
@@ -1,10 +1,11 @@
Import-Module "$PSScriptRoot/../helpers/SoftwareReport.Helpers.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/SoftwareReport.Helpers.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
function Split-TableRowByColumns {
param(
param (
[string] $Row
)
return $Row.Split("|") | ForEach-Object { $_.trim() }
}
@@ -46,6 +47,7 @@ function Get-AndroidPackages {
function Build-AndroidTable {
Write-Host "Build-AndroidTable"
$packageInfo = Get-AndroidInstalledPackages
return @(
@{
"Package" = "Android Command Line Tools"
@@ -62,7 +64,7 @@ function Build-AndroidTable {
@{
"Package" = "Android SDK Platforms"
"Version" = Get-AndroidPlatformVersions -PackageInfo $packageInfo
},
},
@{
"Package" = "Android SDK Platform-Tools"
"Version" = Get-AndroidPackageVersions -PackageInfo $packageInfo -MatchedString "Android SDK Platform-Tools"
@@ -111,6 +113,7 @@ function Build-AndroidEnvironmentTable {
$androidVersions = Get-Item env:ANDROID_*
$shoulddResolveLink = 'ANDROID_NDK', 'ANDROID_NDK_HOME', 'ANDROID_NDK_ROOT', 'ANDROID_NDK_LATEST_HOME'
return $androidVersions | Sort-Object -Property Name | ForEach-Object {
[PSCustomObject] @{
"Name" = $_.Name
@@ -191,7 +194,7 @@ function Get-AndroidGoogleAPIsVersions {
function Get-AndroidNDKVersions {
$ndkFolderPath = Join-Path (Get-AndroidSDKRoot) "ndk"
$versions += Get-ChildItem -Path $ndkFolderPath -Name
$ndkDefaultVersion = Get-ToolsetValue "android.ndk.default"
$ndkDefaultVersion = (Get-ToolsetContent).android.ndk.default
$ndkDefaultFullVersion = Get-ChildItem "$env:ANDROID_HOME/ndk/$ndkDefaultVersion.*" -Name | Select-Object -Last 1
return ($versions | ForEach-Object {
@@ -10,7 +10,7 @@ function Build-BrowserSection {
[ToolVersionNode]::new("Google Chrome for Testing", $(Get-ChromeForTestingVersion))
[ToolVersionNode]::new("ChromeDriver", $(Get-ChromeDriverVersion))
)
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) {
$nodes += @(
[ToolVersionNode]::new("Microsoft Edge", $(Get-EdgeVersion))
@@ -19,7 +19,7 @@ function Build-BrowserSection {
[ToolVersionNode]::new("geckodriver", $(Get-GeckodriverVersion))
)
}
$nodes += @(
[ToolVersionNode]::new("Selenium server", $(Get-SeleniumVersion))
)
@@ -1,7 +1,5 @@
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
$os = Get-OSVersion
function Get-BashVersion {
$version = bash -c 'echo ${BASH_VERSION}'
return $version
@@ -83,7 +81,7 @@ function Get-VcpkgVersion {
}
function Get-GccVersions {
$versionList = Get-ToolsetValue -KeyPath gcc.versions
$versionList = (Get-ToolsetContent).gcc.versions
$versionList | Foreach-Object {
$nameVersion = Run-Command "gcc-${_} --version" | Select-Object -First 1
$version = ($nameVersion -replace "^gcc-${_}").Trim() -replace '\).*$', ')'
@@ -92,7 +90,7 @@ function Get-GccVersions {
}
function Get-FortranVersions {
$versionList = Get-ToolsetValue -KeyPath gcc.versions
$versionList = (Get-ToolsetContent).gcc.versions
$versionList | Foreach-Object {
$nameVersion = Run-Command "gfortran-${_} --version" | Select-Object -First 1
$version = ($nameVersion -replace "^GNU Fortran").Trim() -replace '\).*$', ')'
@@ -106,7 +104,7 @@ function Get-ClangLLVMVersions {
$defaultClangOutput = Run-Command "clang --version" | Out-String
$defaultClangVersion = $clangVersionRegex.Match($defaultClangOutput).Groups['version'].Value
$homebrewClangPath = '$(brew --prefix llvm@{0})/bin/clang' -f (Get-ToolsetValue 'llvm.version')
$homebrewClangPath = '$(brew --prefix llvm@{0})/bin/clang' -f ((Get-ToolsetContent).llvm.version)
$homebrewClangOutput = Run-Command "$homebrewClangPath --version" | Out-String
$homebrewClangVersion = $clangVersionRegex.Match($homebrewClangOutput).Groups['version'].Value
@@ -626,3 +624,13 @@ function Get-PKGConfigVersion {
$pkgconfigVersion = Run-Command "pkg-config --version"
return $pkgconfigVersion
}
function Get-XcbeautifyVersion {
$XcbeautifyVersion = Run-Command "xcbeautify --version"
return $XcbeautifyVersion
}
function Get-XcodesVersion {
$XcodesVersion = Run-Command "xcodes version"
return $XcodesVersion
}
@@ -47,7 +47,7 @@ function Get-BrewPackageVersion {
[string] $CommandName
)
(Get-LinkTarget (Get-Command $CommandName).Source | Out-String) -match "(?<version>(\d+.){2}\d+)" | Out-Null
(Get-LinkTarget (Get-Command $CommandName).Source | Out-String) -match "(?<version>(\d+.){2}\d+)" | Out-Null
$packageVersion = $Matches.Version
return $packageVersion
@@ -1,14 +1,15 @@
function Get-JavaVersions {
$defaultJavaPath = (Get-Item env:JAVA_HOME).value
$os = Get-OSVersion
if ($os.IsVenturaArm64 -or $os.IsSonomaArm64) {
$javaVersions = Get-Item env:JAVA_HOME_*_arm64
} else {
$javaVersions = Get-Item env:JAVA_HOME_*_X64
}
$sortRules = @{
Expression = { [Int32]$_.Name.Split("_")[2] }
Expression = { [Int32]$_.Name.Split("_")[2] }
Descending = $false
}
@@ -54,7 +54,7 @@ function Build-ToolcacheSection {
}
function Get-PowerShellModules {
$modules = (Get-ToolsetValue powershellModules).name
$modules = ((Get-ToolsetContent).powershellModules).name
$modules | ForEach-Object {
$moduleName = $_
$moduleVersions = Get-Module -Name $moduleName -ListAvailable | Select-Object -ExpandProperty Version | Sort-Object -Unique
@@ -1,8 +1,8 @@
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
function Build-VSMacTable {
$vsMacVersions = Get-ToolsetValue "xamarin.vsmac.versions"
$defaultVSMacVersion = Get-ToolsetValue "xamarin.vsmac.default"
$vsMacVersions = (Get-ToolsetContent).xamarin.vsmac.versions
$defaultVSMacVersion = (Get-ToolsetContent).xamarin.vsmac.default
return $vsMacVersions | ForEach-Object {
$isDefault = $_ -eq $defaultVSMacVersion
@@ -29,8 +29,8 @@ function Get-NUnitVersion {
}
function Build-XamarinTable {
$xamarinBundles = Get-ToolsetValue "xamarin.bundles"
$defaultSymlink = Get-ToolsetValue "xamarin.bundle-default"
$xamarinBundles = (Get-ToolsetContent).xamarin.bundles
$defaultSymlink = (Get-ToolsetContent).xamarin.bundle_default
if ($defaultSymlink -eq "latest") {
$defaultSymlink = $xamarinBundles[0].symlink
}
@@ -38,7 +38,7 @@ function Build-XamarinTable {
return $xamarinBundles | ForEach-Object {
$defaultPostfix = ($_.symlink -eq $defaultSymlink ) ? " (default)" : ""
[PSCustomObject] @{
"symlink" = $_.symlink + $defaultPostfix
"symlink" = $_.symlink + $defaultPostfix
"Xamarin.Mono" = $_.mono
"Xamarin.iOS" = $_.ios
"Xamarin.Mac" = $_.mac
@@ -4,7 +4,7 @@ Import-Module "$PSScriptRoot/../helpers/Xcode.Helpers.psm1"
$os = Get-OSVersion
function Get-XcodePaths {
$xcodePaths = Get-ChildItemWithoutSymlinks "/Applications" -Filter "Xcode_*.app"
$xcodePaths = Get-ChildItem -Path "/Applications" -Filter "Xcode_*.app" | Where-Object { !$_.LinkType }
return $xcodePaths | Select-Object -ExpandProperty Fullname
}
+40 -136
View File
@@ -7,6 +7,7 @@ function Get-CommandResult {
# Bash trick to suppress and show error output because some commands write to stderr (for example, "python --version")
$stdout = & bash -c "$Command 2>&1"
$exitCode = $LASTEXITCODE
return @{
Output = If ($Multiline -eq $true) { $stdout } else { [string]$stdout }
ExitCode = $exitCode
@@ -14,21 +15,16 @@ function Get-CommandResult {
}
# Gets path to the tool, analogue of 'which tool'
function Get-WhichTool($tool) {
function Get-ToolPath($tool) {
return (Get-Command $tool).Path
}
# Gets value of environment variable by the name
function Get-EnvironmentVariable($variable) {
return [System.Environment]::GetEnvironmentVariable($variable)
}
# Returns the object with information about current OS
# It can be used for OS-specific tests
function Get-OSVersion {
$osVersion = [Environment]::OSVersion
$osVersionMajorMinor = $osVersion.Version.ToString(2)
$processorArchitecture = arch
return [PSCustomObject]@{
Version = $osVersion.Version
Platform = $osVersion.Platform
@@ -44,142 +40,60 @@ function Get-OSVersion {
}
}
function Get-ChildItemWithoutSymlinks {
param (
[Parameter(Mandatory)]
[string] $Path,
[string] $Filter
)
$files = Get-ChildItem -Path $Path -Filter $Filter
$files = $files | Where-Object { !$_.LinkType } # cut symlinks
return $files
}
# Get the value of specific toolset node
# Example, invoke `Get-ToolsetValue "xamarin.bundles"` to get value of `$toolsetJson.xamarin.bundles`
function Get-ToolsetValue {
param (
[Parameter(Mandatory = $true)]
[string] $KeyPath
)
# Get the value of the toolset
function Get-ToolsetContent {
$toolsetPath = Join-Path $env:HOME "image-generation" "toolset.json"
$jsonNode = Get-Content -Raw $toolsetPath | ConvertFrom-Json
$pathParts = $KeyPath.Split(".")
# try to walk through all arguments consequentially to resolve specific json node
$pathParts | ForEach-Object {
$jsonNode = $jsonNode.$_
}
return $jsonNode
$toolsetJson = Get-Content -Path $toolsetPath -Raw
ConvertFrom-Json -InputObject $toolsetJson
}
function Get-ToolcachePackages {
$toolcachePath = Join-Path $env:HOME "image-generation" "toolcache.json"
return Get-Content -Raw $toolcachePath | ConvertFrom-Json
}
function Invoke-RestMethodWithRetry {
param (
[Parameter()]
[string]
$Url
)
Invoke-RestMethod $Url -MaximumRetryCount 10 -RetryIntervalSec 30
}
function Invoke-ValidateCommand {
param(
[Parameter(Mandatory)]
[string]$Command,
[Uint] $Timeout = 0
)
if ($Timeout -eq 0)
{
$output = Invoke-Expression -Command $Command
if ($LASTEXITCODE -ne 0) {
throw "Command '$Command' has finished with exit code $LASTEXITCODE"
}
return $output
}
else
{
$job = $command | Start-Job -ScriptBlock {
$output = Invoke-Expression -Command $input
if ($LASTEXITCODE -ne 0) {
throw 'Command failed'
}
return $output
}
$waitObject = $job | Wait-Job -Timeout $Timeout
if(-not $waitObject)
{
throw "Command '$Command' has timed out"
}
if($waitObject.State -eq 'Failed')
{
throw "Command '$Command' has failed"
}
Receive-Job -Job $job
}
}
function Start-DownloadWithRetry {
function Invoke-DownloadWithRetry {
Param
(
[Parameter(Mandatory)]
[string] $Url,
[string] $Name,
[string] $DownloadPath = "${env:Temp}",
[int] $Retries = 20,
[int] $Interval = 30
[Alias("Destination")]
[string] $Path
)
if ([String]::IsNullOrEmpty($Name)) {
$Name = [IO.Path]::GetFileName($Url)
if (-not $Path) {
$invalidChars = [IO.Path]::GetInvalidFileNameChars() -join ''
$re = "[{0}]" -f [RegEx]::Escape($invalidChars)
$fileName = [IO.Path]::GetFileName($Url) -replace $re
if ([String]::IsNullOrEmpty($fileName)) {
$fileName = [System.IO.Path]::GetRandomFileName()
}
$Path = Join-Path -Path "/tmp" -ChildPath $fileName
}
$filePath = Join-Path -Path $DownloadPath -ChildPath $Name
Write-Host "Downloading package from $Url to $Path..."
#Default retry logic for the package.
while ($Retries -gt 0)
{
try
{
Write-Host "Downloading package from: $Url to path $filePath ."
(New-Object System.Net.WebClient).DownloadFile($Url, $filePath)
$interval = 30
$downloadStartTime = Get-Date
for ($retries = 20; $retries -gt 0; $retries--) {
try {
$attemptStartTime = Get-Date
(New-Object System.Net.WebClient).DownloadFile($Url, $Path)
$attemptSeconds = [math]::Round(($(Get-Date) - $attemptStartTime).TotalSeconds, 2)
Write-Host "Package downloaded in $attemptSeconds seconds"
break
} catch {
$attemptSeconds = [math]::Round(($(Get-Date) - $attemptStartTime).TotalSeconds, 2)
Write-Warning "Package download failed in $attemptSeconds seconds"
Write-Warning $_.Exception.Message
}
catch
{
Write-Host "There is an error during package downloading:`n $_"
$Retries--
if ($Retries -eq 0)
{
Write-Host "File can't be downloaded. Please try later or check that file exists by url: $Url"
exit 1
}
Write-Host "Waiting $Interval seconds before retrying. Retries left: $Retries"
Start-Sleep -Seconds $Interval
if ($retries -eq 0) {
$totalSeconds = [math]::Round(($(Get-Date) - $downloadStartTime).TotalSeconds, 2)
throw "Package download failed after $totalSeconds seconds"
}
Write-Warning "Waiting $interval seconds before retrying (retries left: $retries)..."
Start-Sleep -Seconds $interval
}
return $filePath
}
function Add-EnvironmentVariable {
param
(
[Parameter(Mandatory)] [string] $Name,
[Parameter(Mandatory)] [string] $Value,
[string] $FilePath = "${env:HOME}/.bashrc"
)
$envVar = "export {0}={1}" -f $Name, $Value
Add-Content -Path $FilePath -Value $envVar
return $Path
}
function isVeertu {
@@ -188,19 +102,9 @@ function isVeertu {
function Get-Architecture {
$arch = arch
if ($arch -ne "arm64")
{
if ($arch -ne "arm64") {
$arch = "x64"
}
return $arch
}
function Test-CommandExists {
param
(
[Parameter(Mandatory)] [string] $Command
)
[boolean] (Get-Command $Command -ErrorAction 'SilentlyContinue')
}
@@ -28,14 +28,15 @@ function Get-XcodeToolPath {
}
function Get-XcodeVersionInfo {
param(
param (
[Parameter(Mandatory)]
[string]$XcodeRootPath
[string] $XcodeRootPath
)
$xcodebuildPath = Get-XcodeToolPath -XcodeRootPath $XcodeRootPath -ToolName "xcodebuild"
[string]$output = Invoke-Expression "$xcodebuildPath -version"
$versionOutputParts = $output.Split(" ")
return @{
Version = [System.Version]::Parse($versionOutputParts[1])
Build = $versionOutputParts[4]
@@ -72,11 +73,12 @@ function Test-XcodeStableRelease {
$licenseInfoPlistPath = Join-Path $XcodeRootPath "Contents" "Resources" "LicenseInfo.plist"
$releaseType = & defaults read $licenseInfoPlistPath "licenseType"
return -not ($releaseType -match "beta")
}
function Get-XcodeSimulatorsInfo {
param(
param (
[string] $Filter
)
@@ -106,6 +108,7 @@ function Get-XcodeDevicesList {
$result += "$runtimeName $deviceName"
}
}
return $result
}
@@ -120,12 +123,13 @@ function Get-XcodePairsList {
$phoneName = $_.Value.phone.name
$result += "$watchName $phoneName"
}
return $result
}
#Helper function for execution of xcversion due to: https://github.com/fastlane/fastlane/issues/18161
function Invoke-XCVersion {
param(
param (
[Parameter(Mandatory)]
[string] $Arguments,
[Parameter()]
@@ -133,7 +137,7 @@ function Invoke-XCVersion {
[Parameter()]
[int] $PauseDurationSecs = 1
)
$Command = "xcversion $Arguments"
Write-Host "Execute [$Command]"
for ($Attempt=1; $Attempt -le $RetryAttempts; $Attempt++) {
@@ -150,7 +154,7 @@ function Invoke-XCVersion {
}
if ($result.ExitCode -ne 0) {
throw "Command [$Command] has finished with non-zero exit code."
}
}
}
function Get-BrokenXcodeSimulatorsList {
@@ -305,4 +309,4 @@ function Get-BrokenXcodeSimulatorsList {
XcodeVersion = "14.2"
}
)
}
}
@@ -2,45 +2,41 @@ Import-Module "$PSScriptRoot/Common.Helpers.psm1"
Import-Module "$PSScriptRoot/Xcode.Helpers.psm1"
function Install-XcodeVersion {
param(
param (
[Parameter(Mandatory)]
[string]$Version,
[string] $Version,
[Parameter(Mandatory)]
[string]$LinkTo
[string] $LinkTo
)
$xcodeDownloadDirectory = "$env:HOME/Library/Caches/XcodeInstall"
$xcodeTargetPath = Get-XcodeRootPath -Version $LinkTo
$xcodeXipDirectory = Invoke-DownloadXcodeArchive -DownloadDirectory $xcodeDownloadDirectory -Version $Version
Expand-XcodeXipArchive -DownloadDirectory $xcodeXipDirectory.FullName -TargetPath $xcodeTargetPath
Remove-Item -Path $xcodeXipDirectory -Force -Recurse
}
function Invoke-DownloadXcodeArchive {
param(
param (
[Parameter(Mandatory)]
[string]$DownloadDirectory,
[string] $DownloadDirectory,
[Parameter(Mandatory)]
[string]$Version
[string] $Version
)
Write-Host "Downloading Xcode $Version"
$tempXipDirectory = New-Item -Path $DownloadDirectory -Name "Xcode$Version" -ItemType "Directory"
$xcodeFileName = 'Xcode-{0}.xip' -f $Version
$xcodeUri = '{0}{1}?{2}'-f ${env:XCODE_INSTALL_STORAGE_URL}, $xcodeFileName, ${env:XCODE_INSTALL_SAS}
Invoke-DownloadWithRetry -Url $xcodeUri -Path (Join-Path $tempXipDirectory.FullName $xcodeFileName) | Out-Null
Start-DownloadWithRetry -Url $xcodeUri -DownloadPath $tempXipDirectory.FullName -Name $xcodeFileName
return $tempXipDirectory
}
function Resolve-ExactXcodeVersion {
param(
param (
[Parameter(Mandatory)]
[string]$Version
[string] $Version
)
# if toolset string contains spaces, consider it as a full name of Xcode
@@ -51,6 +47,7 @@ function Resolve-ExactXcodeVersion {
$semverVersion = [SemVer]::Parse($Version)
$availableVersions = Get-AvailableXcodeVersions
$satisfiedVersions = $availableVersions | Where-Object { $semverVersion -eq $_.stableSemver }
return $satisfiedVersions | Select-Object -Last 1 -ExpandProperty rawVersion
}
@@ -76,18 +73,18 @@ function Get-AvailableXcodeVersions {
}
function Expand-XcodeXipArchive {
param(
param (
[Parameter(Mandatory)]
[string]$DownloadDirectory,
[string] $DownloadDirectory,
[Parameter(Mandatory)]
[string]$TargetPath
[string] $TargetPath
)
$xcodeXipPath = Get-ChildItem -Path $DownloadDirectory -Filter "Xcode-*.xip" | Select-Object -First 1
Write-Host "Extracting Xcode from '$xcodeXipPath'"
Push-Location $DownloadDirectory
if(Test-CommandExists 'unxip') {
if ([boolean] (Get-Command 'unxip' -ErrorAction 'SilentlyContinue')) {
Invoke-ValidateCommand "unxip $xcodeXipPath"
} else {
Invoke-ValidateCommand "xip -x $xcodeXipPath"
@@ -108,9 +105,9 @@ function Expand-XcodeXipArchive {
}
function Confirm-XcodeIntegrity {
param(
param (
[Parameter(Mandatory)]
[string]$Version
[string] $Version
)
$XcodeRootPath = Get-XcodeRootPath -Version $Version
@@ -121,13 +118,12 @@ function Confirm-XcodeIntegrity {
}
function Approve-XcodeLicense {
param(
param (
[Parameter(Mandatory)]
[string]$Version
[string] $Version
)
$os = Get-OSVersion
$XcodeRootPath = Get-XcodeRootPath -Version $Version
Write-Host "Approving Xcode license for '$XcodeRootPath'..."
$xcodeBuildPath = Get-XcodeToolPath -XcodeRootPath $XcodeRootPath -ToolName "xcodebuild"
@@ -140,9 +136,9 @@ function Approve-XcodeLicense {
}
function Install-XcodeAdditionalPackages {
param(
param (
[Parameter(Mandatory)]
[string]$Version
[string] $Version
)
Write-Host "Installing additional packages for Xcode $Version..."
@@ -154,9 +150,9 @@ function Install-XcodeAdditionalPackages {
}
function Invoke-XcodeRunFirstLaunch {
param(
param (
[Parameter(Mandatory)]
[string]$Version
[string] $Version
)
if ($Version.StartsWith("8") -or $Version.StartsWith("9")) {
@@ -169,9 +165,9 @@ function Invoke-XcodeRunFirstLaunch {
}
function Install-AdditionalSimulatorRuntimes {
param(
param (
[Parameter(Mandatory)]
[string]$Version
[string] $Version
)
Write-Host "Installing Simulator Runtimes for Xcode $Version ..."
@@ -180,10 +176,10 @@ function Install-AdditionalSimulatorRuntimes {
}
function Build-XcodeSymlinks {
param(
param (
[Parameter(Mandatory)]
[string]$Version,
[string[]]$Symlinks
[string] $Version,
[string[]] $Symlinks
)
$sourcePath = Get-XcodeRootPath -Version $Version
@@ -194,10 +190,10 @@ function Build-XcodeSymlinks {
}
}
function Rebuild-XcodeLaunchServicesDb {
param(
function Initialize-XcodeLaunchServicesDb {
param (
[Parameter(Mandatory)]
[string]$Version
[string] $Version
)
$xcodePath = Get-XcodeRootPath -Version $Version
@@ -206,9 +202,9 @@ function Rebuild-XcodeLaunchServicesDb {
}
function Build-ProvisionatorSymlink {
param(
param (
[Parameter(Mandatory)]
[string]$Version
[string] $Version
)
$sourcePath = Get-XcodeRootPath -Version $Version
@@ -223,9 +219,9 @@ function Build-ProvisionatorSymlink {
}
function Set-XcodeDeveloperDirEnvironmentVariables {
param(
param (
[Parameter(Mandatory)]
[string[]]$XcodeList
[string[]] $XcodeList
)
$exactVersionsList = $XcodeList | Where-Object { Test-XcodeStableRelease -Version $_ } | ForEach-Object {
@@ -247,3 +243,37 @@ function Set-XcodeDeveloperDirEnvironmentVariables {
"export ${variableName}=${variableValue}" | Out-File "$env:HOME/.bashrc" -Append
}
}
function Invoke-ValidateCommand {
param (
[Parameter(Mandatory)]
[string] $Command,
[Uint] $Timeout = 0
)
if ($Timeout -eq 0) {
$output = Invoke-Expression -Command $Command
if ($LASTEXITCODE -ne 0) {
throw "Command '$Command' has finished with exit code $LASTEXITCODE"
}
return $output
} else {
$job = $command | Start-Job -ScriptBlock {
$output = Invoke-Expression -Command $input
if ($LASTEXITCODE -ne 0) {
throw 'Command failed'
}
return $output
}
$waitObject = $job | Wait-Job -Timeout $Timeout
if (-not $waitObject) {
throw "Command '$Command' has timed out"
}
if ($waitObject.State -eq 'Failed') {
throw "Command '$Command' has failed"
}
Receive-Job -Job $job
}
}

Some files were not shown because too many files have changed in this diff Show More