Compare commits

..
8 Commits
Author SHA1 Message Date
fedor 19ff55570e Install yarn 2023-04-09 18:51:52 -04:00
fedor 4d038de343 Install node through brew 2023-04-09 16:25:45 -04:00
fedor 8faf32710b Install NVM via official script 2023-04-09 14:18:53 -04:00
fedor be1be002c4 Fixed NVM installation 2023-04-08 20:22:11 -04:00
fedor 920aa01e4f Bump Xcode version 2023-04-08 19:45:25 -04:00
fedor b24d5c0ffb Better NVM installation 2023-04-08 19:45:07 -04:00
Fedor Korotkov 1629c949a6 Install Ruby 2.x.x and Node.JS LTS (#79)
* Install Ruby 2.x.x and Node.JS LTS

* Install Yarn as well

* Pre-install graphicsmagick and applesimutils

* Tweak maxfiles

* macOS 13.3.1
2023-04-08 11:25:32 -04:00
Fedor Korotkov 5828bf5b7c Preinstall gitlab-runner 2023-04-04 17:37:28 -04:00
5 changed files with 57 additions and 6 deletions
+21
View File
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>limit.maxfiles</string>
<key>ProgramArguments</key>
<array>
<string>launchctl</string>
<string>limit</string>
<string>maxfiles</string>
<string>65536</string>
<string>524288</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceIPC</key>
<false/>
</dict>
</plist>
+24 -4
View File
@@ -16,7 +16,7 @@ variable "gha_version" {
}
source "tart-cli" "tart" {
vm_base_name = "ghcr.io/cirruslabs/macos-${var.macos_version}-vanilla:13.3"
vm_base_name = "ghcr.io/cirruslabs/macos-${var.macos_version}-vanilla:13.3.1"
vm_name = "${var.macos_version}-base"
cpu_count = 4
memory_gb = 8
@@ -29,8 +29,17 @@ source "tart-cli" "tart" {
build {
sources = ["source.tart-cli.tart"]
provisioner "file" {
source = "data/limit.maxfiles.plist"
destination = "~/limit.maxfiles.plist"
}
provisioner "shell" {
inline = [
"echo 'Configuring maxfiles...'",
"sudo mv ~/limit.maxfiles.plist /Library/LaunchDaemons/limit.maxfiles.plist",
"sudo chown root:wheel /Library/LaunchDaemons/limit.maxfiles.plist",
"sudo chmod 0644 /Library/LaunchDaemons/limit.maxfiles.plist",
"echo 'Disabling spotlight...'",
"sudo mdutil -a -i off",
]
@@ -70,21 +79,32 @@ build {
"source ~/.zprofile",
"brew --version",
"brew update",
"brew install wget cmake gcc git-lfs jq gh",
"brew install wget cmake gcc git-lfs jq gh gitlab-runner",
"git lfs install",
]
}
provisioner "shell" {
inline = [
"source ~/.zprofile",
"brew install libyaml", # https://github.com/rbenv/ruby-build/discussions/2118
"brew install rbenv",
"echo 'if which rbenv > /dev/null; then eval \"$(rbenv init -)\"; fi' >> ~/.zprofile",
"source ~/.zprofile",
"rbenv install 3.0.5",
"rbenv global 3.0.5",
"rbenv install 2.7.8", // latest 2.x.x before EOL
"rbenv install $(rbenv install -l | grep -v - | tail -1)",
"rbenv global $(rbenv install -l | grep -v - | tail -1)",
"gem install bundler",
]
}
provisioner "shell" {
inline = [
"source ~/.zprofile",
"brew install node",
"node --version",
"npm install --global yarn",
"yarn --version",
]
}
provisioner "shell" {
inline = [
"sudo safaridriver --enable",
+1 -1
View File
@@ -10,7 +10,7 @@ packer {
source "tart-cli" "tart" {
# You can find macOS IPSW URLs on various websites like https://ipsw.me/
# and https://www.theiphonewiki.com/wiki/Beta_Firmware/Mac/13.x
from_ipsw = "https://updates.cdn-apple.com/2023WinterSeed/fullrestores/002-75537/8250FA0E-0962-46D6-8A90-57A390B9FFD7/UniversalMac_13.3_22E252_Restore.ipsw"
from_ipsw = "https://updates.cdn-apple.com/2023WinterFCS/fullrestores/032-66602/418BC37A-FCD9-400A-B4FA-022A19576CD4/UniversalMac_13.3.1_22E261_Restore.ipsw"
vm_name = "ventura-vanilla"
cpu_count = 4
memory_gb = 8
+10
View File
@@ -121,6 +121,16 @@ build {
"sudo gem uninstall --ignore-dependencies ffi && sudo gem install ffi -- --enable-libffi-alloc"
]
}
# useful utils for mobile development
provisioner "shell" {
inline = [
"source ~/.zprofile",
"brew install graphicsmagick",
"brew install wix/brew/applesimutils",
]
}
# inspired by https://github.com/actions/runner-images/blob/fb3b6fd69957772c1596848e2daaec69eabca1bb/images/macos/provision/configuration/configure-machine.sh#L33-L61
provisioner "shell" {
inline = [
+1 -1
View File
@@ -1,3 +1,3 @@
macos_version = "ventura"
gha_version = "2.303.0"
xcode_version = "14.2"
xcode_version = "14.3"