From 29a4fc9d89c918bd49c8ef3e46986a874f879cf4 Mon Sep 17 00:00:00 2001 From: jkito Date: Sun, 20 Nov 2022 16:09:56 +0530 Subject: [build] Add ansible playbook to setup build env on macos this playbook installs homebrew, and QtIFW on the target macos host and other build dependencies like go, make, etc. from brew --- scripts/ansible/macos/inventory.yaml | 5 +++ scripts/ansible/macos/requirements.yaml | 6 ++++ scripts/ansible/macos/site.yaml | 57 +++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 scripts/ansible/macos/inventory.yaml create mode 100644 scripts/ansible/macos/requirements.yaml create mode 100644 scripts/ansible/macos/site.yaml diff --git a/scripts/ansible/macos/inventory.yaml b/scripts/ansible/macos/inventory.yaml new file mode 100644 index 0000000..bbf2136 --- /dev/null +++ b/scripts/ansible/macos/inventory.yaml @@ -0,0 +1,5 @@ +all: + hosts: + localhost: + ansible_user: testmac + ansible_port: 22220 diff --git a/scripts/ansible/macos/requirements.yaml b/scripts/ansible/macos/requirements.yaml new file mode 100644 index 0000000..fad092e --- /dev/null +++ b/scripts/ansible/macos/requirements.yaml @@ -0,0 +1,6 @@ +--- +roles: + - name: elliotweiser.osx-command-line-tools + +collections: + - name: geerlingguy.mac diff --git a/scripts/ansible/macos/site.yaml b/scripts/ansible/macos/site.yaml new file mode 100644 index 0000000..2fb8578 --- /dev/null +++ b/scripts/ansible/macos/site.yaml @@ -0,0 +1,57 @@ +# vi: ft=yaml.ansible +--- +- name: Setup go and Qt development environment in macOS + hosts: + - all + vars: + qtifw_path: "/Volumes/{{qtifw_exec_name}}" + qtifw_installer_exec_path: "{{ qtifw_path }}/{{ qtifw_exec_name }}.app/Contents/MacOS/{{ qtifw_exec_name }}" + qtifw_installer_name: "QtInstallerFramework-macOS-x64-{{ qtifw_version }}.dmg" + qtifw_exec_name: "{{ qtifw_installer_name | splitext | first }}" + qtifw_version: "4.4.2" + xcode_source_path: ~/Downloads/Xcode_11.7.xip + xcode_dest_path: ~/Downloads/Xcode_11.7.xip + homebrew_installed_packages: + - go@1.17 + - make + - gpg + - qt5 + - wget + - create-dmg + + roles: + - geerlingguy.mac.homebrew + + tasks: + - name: Download Qt installer framework + get_url: + url: "https://download.qt.io/official_releases/qt-installer-framework/{{ qtifw_version }}/{{ qtifw_installer_name }}" + checksum: sha256:a635013bcaa7e518400ea1acfc07f7467f60a6e3bb3e3774c9889ccc73a28c13 + dest: "/tmp/{{ qtifw_installer_name }}" + mode: 0644 + + - name: Mount the Qt installer dmg image + command: + argv: + - hdiutil + - attach + - "/tmp/{{ qtifw_installer_name }}" + creates: "{{ qtifw_path }}" + + - name: Install Qt installer framework + command: + argv: + - "{{ qtifw_installer_exec_path }}" + - "in" + - "--da" + - "-c" + - "--al" + creates: "{{ ansible_user_dir }}/Qt/QtIFW-{{ qtifw_version }}" + + - name: Unmount the Qt installer dmg image + command: + argv: + - hdiutil + - detach + - "{{ qtifw_path }}" + ignore_errors: true -- cgit v1.2.3