add mac11 build #151
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Mac Artifact | |
on: | |
push: | |
branches: [ main, actionsHub, "bugfix-*" ] | |
pull_request: | |
branches: [] | |
workflow_call: | |
inputs: | |
submodule: | |
description: The directory of the submodule, if this workflow is being called on a submodule | |
required: false | |
type: string | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [macos-11, macos-14] | |
# ev-lib: ["", libev, libuv, libevent] | |
ev-lib: [libuv] | |
include: | |
- os: macos-11 | |
openssl-path: /usr/local/opt/openssl | |
ev-path: /usr/local | |
- os: macos-14 | |
openssl-path: /opt/homebrew/opt/openssl | |
ev-path: /opt/homebrew | |
runs-on: ${{ matrix.os }} | |
env: | |
LIBYAML_VERSION: 0.2.5 | |
steps: | |
- name: Get checkout directory | |
uses: haya14busa/action-cond@v1 | |
id: checkout-dir | |
with: | |
cond: ${{ inputs.submodule != '' }} | |
if_true: aerospike-tools # In this case we are expecting to checkout the tools package. | |
if_false: asbench | |
- name: Get asbench working directory | |
uses: haya14busa/action-cond@v1 | |
id: working-dir | |
with: | |
cond: ${{ inputs.submodule != '' }} | |
if_true: aerospike-tools/${{ inputs.submodule }} # In this case we are expecting to checkout the tools package. | |
if_false: asbench | |
- uses: kenchan0130/[email protected] | |
id: system-info | |
- name: Install dependencies from brew | |
run: | | |
brew install libev openssl@3 automake # libuv and libevent already installed | |
# this will checkout the whole tools repo when run from aerospike-tools, but we will | |
# just cd into the correct directory calculated from working-dir | |
- uses: actions/checkout@v3 | |
with: | |
path: ${{ steps.checkout-dir.outputs.value }} | |
fetch-depth: 0 | |
- name: Checkout ${{ steps.working-dir.outputs.value }} | |
working-directory: ${{ steps.checkout-dir.outputs.value }} | |
run: | | |
git config --global url."https://github.com/".insteadOf "[email protected]:" | |
git submodule update --init --recursive -- ${{ inputs.submodule || '.' }} | |
- name: Print version | |
working-directory: ${{ steps.working-dir.outputs.value }} | |
run: | | |
git describe --tags --always | |
- name: Build asbench | |
run: | | |
make EVENT_LIB=${{ matrix.ev-lib }} LIBUV_STATIC_PATH=${{ matrix.ev-path }}/lib LIBEVENT_STATIC_PATH=${{ matrix.ev-path }}/lib LIBEV_STATIC_PATH=${{ matrix.ev-path }}/lib OPENSSL_STATIC_PATH=${{ matrix.openssl-path }}/lib | |
working-directory: ${{ steps.working-dir.outputs.value }} | |
- name: Sanity test asbench artifact | |
run: | | |
./asbench | grep "ERROR Failed to connect" | |
working-directory: ${{ steps.working-dir.outputs.value }}/target | |
- name: Get artifact name | |
uses: haya14busa/action-cond@v1 | |
id: artifact-name | |
with: | |
cond: ${{ matrix.ev-lib == '' }} | |
if_true: asbench | |
if_false: asbench-${{ matrix.ev-lib }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ steps.system-info.outputs.platform }}-${{ runner.arch }}-${{ runner.os }}-${{ steps.system-info.outputs.release }}-${{ steps.artifact-name.outputs.value }} | |
path: ${{ steps.working-dir.outputs.value }}/target/asbench | |
if-no-files-found: error | |
bundle-binaries: | |
needs: build | |
runs-on: macos-11 | |
if: "${{ inputs.submodule == '' }}" | |
steps: | |
- uses: kenchan0130/[email protected] | |
id: system-info | |
- name: Get artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: target | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: binaries | |
path: target | |
if-no-files-found: error |