build: TOOLS-2933 use github actions to build m-series macos #46
Workflow file for this run
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
# For most projects, this workflow file will not need changing; you simply need | |
# to commit it to your repository. | |
# | |
# You may wish to alter this file to override the set of languages analyzed, | |
# or to provide custom queries or build logic. | |
# | |
# ******** NOTE ******** | |
# We have attempted to detect the languages in your repository. Please check | |
# the `language` matrix defined below to confirm you have the correct set of | |
# supported CodeQL languages. | |
# | |
name: "CodeQL" | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [ "main" ] | |
jobs: | |
analyze: | |
name: Analyze | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
strategy: | |
fail-fast: false | |
matrix: | |
language: [ 'cpp' ] | |
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] | |
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Initializes the CodeQL tools for scanning. | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: ${{ matrix.language }} | |
- 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: aql | |
- name: Get aql 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: aql | |
- uses: actions/checkout@v2 | |
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 | |
- uses: kenchan0130/[email protected] | |
id: system-info | |
- name: Download C Client Deps | |
run: | | |
sudo apt-get install libc6-dev libssl-dev autoconf automake libtool g++ zlib1g-dev ncurses-dev liblua5.1-dev | |
- name: Cache C Client | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-c-client | |
with: | |
path: | | |
${{ steps.working-dir.outputs.value }}/modules/c-client/target | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('modules/c-client') }} | |
- name: Cache Jansson | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-jansson | |
with: | |
path: | | |
${{ steps.working-dir.outputs.value }}/modules/jansson/src | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('modules/jansson') }} | |
- name: Build aql | |
working-directory: ${{ steps.working-dir.outputs.value }} | |
run: | | |
make | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 | |
with: | |
category: "/language:${{matrix.language}}" |