Skip to content

mac on arm #5

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

Open
wants to merge 2 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
7 changes: 6 additions & 1 deletion .github/workflows/REUSABLE-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ on:

##### optioanl inputs #####

runs_on:
required: false
type: string
default: ubuntu-latest

# architecture
arch:
required: false
Expand All @@ -34,7 +39,7 @@ on:
jobs:

build:
runs-on: ubuntu-latest
runs-on: ${{ inputs.runs_on }}
container: ${{inputs.docker_image}}

steps:
Expand Down
80 changes: 40 additions & 40 deletions .github/workflows/build-bsd.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
name: Build (bsd) redis
# name: Build (bsd) redis

on:
push:
paths-ignore:
- 'docs/**'
- 'README.md'
branches:
- master
- '[0-9].[0-9]'
- '[0-9].[0-9].[0-9]'
pull_request:
workflow_dispatch:
# on:
# push:
# paths-ignore:
# - 'docs/**'
# - 'README.md'
# branches:
# - master
# - '[0-9].[0-9]'
# - '[0-9].[0-9].[0-9]'
# pull_request:
# workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-bsd
cancel-in-progress: true
# concurrency:
# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-bsd
# cancel-in-progress: true

permissions:
contents: read
packages: write
# permissions:
# contents: read
# packages: write

jobs:
# jobs:

freebsd-13_2-x86-64:
uses: ./.github/workflows/REUSABLE-bsd.yml
secrets: inherit
with:
osversion: 13.2
osname: freebsd
machine_host: ubuntu-latest
osnick: freebsd13.2
outside_deps: sudo apt-get update -qq && sudo apt-get install -qqy jq
deps: sudo pkg install -y bash gmake
# freebsd-13_2-x86-64:
# uses: ./.github/workflows/REUSABLE-bsd.yml
# secrets: inherit
# with:
# osversion: 13.2
# osname: freebsd
# machine_host: ubuntu-latest
# osnick: freebsd13.2
# outside_deps: sudo apt-get update -qq && sudo apt-get install -qqy jq
# deps: sudo pkg install -y bash gmake

freebsd-13_2-arm64:
uses: ./.github/workflows/REUSABLE-bsd.yml
secrets: inherit
with:
osversion: 13.2
osname: freebsd
machine_host: ubuntu-latest
arch: arm64
osnick: freebsd13.2
outside_deps: sudo apt-get update -qq && sudo apt-get install -qqy jq
deps: sudo pkg install -y bash gmake
# freebsd-13_2-arm64:
# uses: ./.github/workflows/REUSABLE-bsd.yml
# secrets: inherit
# with:
# osversion: 13.2
# osname: freebsd
# machine_host: ubuntu-latest
# arch: arm64
# osnick: freebsd13.2
# outside_deps: sudo apt-get update -qq && sudo apt-get install -qqy jq
# deps: sudo pkg install -y bash gmake
30 changes: 18 additions & 12 deletions .github/workflows/build-linux-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,41 +37,47 @@ jobs:
aws-region: ${{ secrets.AWS_REGION_ID }}
- name: Start EC2 runner
id: start-ec2-runner
uses: machulav/ec2-github-runner@v2
uses: machulav/ec2-github-runner@v2.3.3
with:
mode: start
github-token: ${{ secrets.GH_ACCESS_TOKEN }}
ec2-image-id: ${{ secrets.AWS_AMI_ID }}
ec2-instance-type: t4g.small
subnet-id: ${{ secrets.AWS_SUBNET_ID }}
security-group-id: ${{ secrets.AWS_SECGROUP_ID }}
pre-runner-script: |
sudo apt update &&
sudo apt install -y docker git
sudo systemctl enable docker
sudo systemctl start docker

ubuntu-bionic-arm64:
needs: start-arm64-runner
uses: ./.github/workflows/REUSABLE-linux.yml
secrets: inherit
with:
docker_image: ubuntu:18.04
deps: apt-get update -qq && apt-get install -qqy build-essential libssl-dev python3 python3-pip jq wget
osnick: ubuntu18.04
arch: arm64
secrets: inherit
runs_on: ${{needs.start-arm64-runner.outputs.label}}

ubuntu-focal-arm64:
needs: start-arm64-runner
uses: ./.github/workflows/REUSABLE-linux.yml
with:
docker_image: ubuntu:20.04
deps: apt-get update -qq && apt-get install -qqy build-essential libssl-dev python3 python3-pip jq wget
osnick: ubuntu20.04
arch: arm64
secrets: inherit
# ubuntu-focal-arm64:
# needs: start-arm64-runner
# uses: ./.github/workflows/REUSABLE-linux.yml
# with:
# docker_image: ubuntu:20.04
# deps: apt-get update -qq && apt-get install -qqy build-essential libssl-dev python3 python3-pip jq wget
# osnick: ubuntu20.04
# arch: arm64
# secrets: inherit

stop-arm64-runner:
name: Stop self-hosted EC2 runner
needs:
- start-arm64-runner
- ubuntu-bionic-arm64
- ubuntu-focal-arm64
# - ubuntu-focal-arm64
runs-on: ubuntu-latest
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
steps:
Expand Down
88 changes: 44 additions & 44 deletions .github/workflows/build-linux-x86_64.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
name: Build (intel) redis
# name: Build (intel) redis

on:
push:
paths-ignore:
- 'docs/**'
- 'README.md'
branches:
- master
- '[0-9].[0-9]'
- '[0-9].[0-9].[0-9]'
pull_request:
workflow_dispatch:
# on:
# push:
# paths-ignore:
# - 'docs/**'
# - 'README.md'
# branches:
# - master
# - '[0-9].[0-9]'
# - '[0-9].[0-9].[0-9]'
# pull_request:
# workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-linuxx64
cancel-in-progress: true
# concurrency:
# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-linuxx64
# cancel-in-progress: true

permissions:
contents: read
packages: write
# permissions:
# contents: read
# packages: write

jobs:
# jobs:

ubuntu-bionic-x86-64:
uses: ./.github/workflows/REUSABLE-linux.yml
secrets: inherit
with:
docker_image: ubuntu:18.04
deps: apt-get update -qq && apt-get install -qqy build-essential libssl-dev python3 python3-pip jq wget
osnick: ubuntu18.04
# ubuntu-bionic-x86-64:
# uses: ./.github/workflows/REUSABLE-linux.yml
# secrets: inherit
# with:
# docker_image: ubuntu:18.04
# deps: apt-get update -qq && apt-get install -qqy build-essential libssl-dev python3 python3-pip jq wget
# osnick: ubuntu18.04

rhel7-x86-64:
uses: ./.github/workflows/REUSABLE-linux.yml
secrets: inherit
with:
docker_image: centos:7
deps: |
yum install -y epel-release
yum install -y gcc make jemalloc-devel openssl-devel python3 python3-pip jq wget
osnick: rhel7
# rhel7-x86-64:
# uses: ./.github/workflows/REUSABLE-linux.yml
# secrets: inherit
# with:
# docker_image: centos:7
# deps: |
# yum install -y epel-release
# yum install -y gcc make jemalloc-devel openssl-devel python3 python3-pip jq wget
# osnick: rhel7

rhel8-x86-64:
uses: ./.github/workflows/REUSABLE-linux.yml
secrets: inherit
with:
docker_image: oraclelinux:8
deps: |
dnf install -y oracle-epel-release-el8
dnf install -y gcc make jemalloc-devel openssl-devel tar git python3 python3-pip jq wget
osnick: rhel8
# rhel8-x86-64:
# uses: ./.github/workflows/REUSABLE-linux.yml
# secrets: inherit
# with:
# docker_image: oraclelinux:8
# deps: |
# dnf install -y oracle-epel-release-el8
# dnf install -y gcc make jemalloc-devel openssl-devel tar git python3 python3-pip jq wget
# osnick: rhel8
89 changes: 72 additions & 17 deletions .github/workflows/build-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
paths-ignore:
- 'docs/**'
- 'README.md'
branches:
- master
- '[0-9].[0-9]'
- '[0-9].[0-9].[0-9]'
pull_request:
workflow_dispatch:

Expand All @@ -19,21 +23,72 @@ permissions:

jobs:

# macos-arm64:
# uses: ./.github/workflows/REUSABLE-osx.yml
# secrets: inherit
# with:
# macos_type: macos-latest-large
# deps: brew install openssl@3 coreutils
# arch: arm64
# build_script: scripts/build-osx-arm.sh
# osnick: monterey

macos-x86_64:
uses: ./.github/workflows/REUSABLE-osx.yml
secrets: inherit
start-osxarm-runner:
name: Start self-hosted EC2 runner
runs-on: ubuntu-latest
outputs:
label: ${{ steps.start-ec2-runner.outputs.label }}
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
macos_type: macos-latest
deps: brew install openssl@3 coreutils
build_script: scripts/build-osx.sh
osnick: monterey
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION_ID }}
- name: Start EC2 runner
id: start-ec2-runner
uses: arielly-parussulo/[email protected]
with:
mode: start
github-token: ${{ secrets.GH_ACCESS_TOKEN }}
ec2-image-id: ami-046ba9681dc60fa68
ec2-instance-type: mac2.metal
subnet-id: ${{ secrets.AWS_SUBNET_ID }}
security-group-id: ${{ secrets.AWS_SECGROUP_ID }}
scope: repository
host-id: ${{ secrets.AWS_M1_HOSTID }}


macos-arm64:
needs: start-osxarm-runner
uses: ./.github/workflows/REUSABLE-osx.yml
secrets: inherit
with:
macos_type: ${{needs.start-osxarm-runner.outputs.label}}
deps: brew install openssl@3 coreutils
arch: arm64
build_script: scripts/build-osx-arm.sh
osnick: monterey

stop-osxarm-runner:
name: Stop self-hosted EC2 runner
needs:
- start-osxarm-runner
- macos-arm64
runs-on: ubuntu-latest
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION_ID }}
- name: Stop EC2 runner
uses: machulav/ec2-github-runner@v2
with:
mode: stop
github-token: ${{ secrets.GH_ACCESS_TOKEN }}
label: ${{ needs.start-osxarm-runner.outputs.label }}
ec2-instance-id: ${{ needs.start-osxarm-runner.outputs.ec2-instance-id }}

macos-x86_64:
uses: ./.github/workflows/REUSABLE-osx.yml
secrets: inherit
with:
macos_type: macos-latest
deps: brew install openssl@3 coreutils
arch: arm64
build_script: scripts/build-osx.sh
osnick: monterey