Skip to content

fix/macos-build-deps CI-build-macos-macos-13 520bd1be4ec9116691b8f443806140ca962e1f83 #7

fix/macos-build-deps CI-build-macos-macos-13 520bd1be4ec9116691b8f443806140ca962e1f83

fix/macos-build-deps CI-build-macos-macos-13 520bd1be4ec9116691b8f443806140ca962e1f83 #7

name: CI-build-macos-macos-13
run-name: '${{ github.ref_name }} ${{ github.workflow }} ${{ github.sha }}'
on:
workflow_dispatch:
permissions:
contents: write
checks: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
build:
runs-on: macos-13
env:
ARCH: x86_64
MATRIX: '(macos-x86_64)'
BRANCH: ${{ github.ref_name }}
PKG_CONFIG_PATH: "/usr/local/opt/openssl@3/lib/pkgconfig"
OPENSSL_ROOT_DIR: "/usr/local/opt/openssl@3"
steps:
- uses: LouisBrunner/checks-action@v2.0.0
id: checks
if: always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: '${{ github.workflow }} / ${{ github.job }} ${{ env.MATRIX }}'
repo: ${{ github.repository }}
sha: ${{ github.sha }}
status: 'in_progress'
details_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
- name: Install dependencies
run: |
brew install automake bzip2 cmake gpatch gnutls libtool openssl@3 icu4c pkg-config libiconv zlib
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
ref: ${{ github.sha }}
fetch-depth: 0
- name: Build ProxySQL
run: |
export PATH="/usr/local/bin:$PATH"
make -j$(sysctl -n hw.ncpu)
- name: Package binary
run: |
GIT_VERSION=$(git describe --long --abbrev=7 --tags 2>/dev/null || echo "unknown")
tar -C src -czf proxysql-${GIT_VERSION}-macos-x86_64.tar.gz proxysql
shasum -a 256 proxysql-${GIT_VERSION}-macos-x86_64.tar.gz > proxysql-${GIT_VERSION}-macos-x86_64.tar.gz.sha256
- name: Upload to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ env.BRANCH }}-head --repo ${{ github.repository }} --title "${{ env.BRANCH }}-head" --target ${{ github.sha }} --draft --prerelease 2>/dev/null || true
gh release upload ${{ env.BRANCH }}-head --repo ${{ github.repository }} --clobber proxysql-*-macos-x86_64.tar.gz proxysql-*-macos-x86_64.tar.gz.sha256
- uses: LouisBrunner/checks-action@v2.0.0
if: always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
check_id: ${{ steps.checks.outputs.check_id }}
repo: ${{ github.repository }}
sha: ${{ github.sha }}
conclusion: ${{ job.status }}
details_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'