Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds macos to CI #12

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on: # yamllint disable-line rule:truthy
workflow_dispatch: ~

jobs:
build:
build-linux:
runs-on: ubuntu-latest

env:
Expand Down Expand Up @@ -59,3 +59,35 @@ jobs:
CUSTOM_MOLECULE_CONTAINER_IMAGE: ${{ matrix.distro.image }}
CUSTOM_MOLECULE_INSTANCE_NAME: ${{ env.role_name}}-${{ matrix.distro.instance_name }}
CUSTOM_MOLECULE_DRIVER: ${{ env.driver }}

build-mac:
runs-on: macos-12

env:
role_name: nkakouros.easyrsa

steps:
- uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v2.2.1

- run: umask
- name: Install molecule
run: pip3 install ansible molecule ${{ env.driver }} flake8

- name: Get linter-config repo
uses: actions/checkout@v3
with:
repository: nkakouros-original/linter-configs
path: linter-configs

- name: Copy linter configs in place
run: >-
cp -r
${{ github.workspace }}/linter-configs/configs/.
${{ github.workspace }}/;
rm -rf linter-configs;

- name: Run molecule
run: molecule -c molecule.yml -c molecule.delegated.yml test
25 changes: 23 additions & 2 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,39 @@
- openssl
- git

- name: Install dependencies (MacOS)
community.general.homebrew:
name: "{{ packages }}"
when: ansible_os_family == 'Darwin'
vars:
packages:
- git
- openssl

- name: Download easy-rsa
git:
repo: "{{ easyrsa_repo }}"
dest: /tmp/easy-rsa/
version: "{{ easyrsa_version }}"
umask: 0o022


- command: ls -al /tmp/easy-rsa/easyrsa3
register: q
- debug: var=q
- name: Install library files
copy:
src: /tmp/easy-rsa/easyrsa3/
dest: /usr/local/lib/easyrsa
remote_src: true
mode: 0o755
owner: root
group: root
become: true

- command: ls -al /usr/local/lib/easyrsa/
register: q
- debug: var=q

- name: Set permissions
file:
path: /usr/local/lib/easyrsa/
Expand All @@ -46,6 +63,11 @@
mode: o+rX
become: true

- command: ls -al /usr/local/lib/easyrsa/
register: q
- debug: var=q


- name: Install binary
copy:
content: |
Expand All @@ -54,5 +76,4 @@
dest: /usr/local/bin/easyrsa
mode: 0o755
owner: root
group: root
become: true