|
| 1 | +name: CI-build-macos-macos-14-genai |
| 2 | +run-name: '${{ github.ref_name }} ${{ github.workflow }} ${{ github.sha }}' |
| 3 | + |
| 4 | +on: |
| 5 | + workflow_dispatch: |
| 6 | + |
| 7 | +permissions: |
| 8 | + contents: write |
| 9 | + checks: write |
| 10 | + |
| 11 | +concurrency: |
| 12 | + group: ${{ github.workflow }}-${{ github.ref_name }} |
| 13 | + cancel-in-progress: true |
| 14 | + |
| 15 | +jobs: |
| 16 | + build: |
| 17 | + runs-on: macos-14 |
| 18 | + env: |
| 19 | + ARCH: arm64 |
| 20 | + MATRIX: '(macos-arm64-genai)' |
| 21 | + BRANCH: ${{ github.ref_name }} |
| 22 | + PATH: "/opt/homebrew/bin:${{ github.path }}" |
| 23 | + PKG_CONFIG_PATH: "/opt/homebrew/opt/openssl@3/lib/pkgconfig" |
| 24 | + OPENSSL_ROOT_DIR: "/opt/homebrew/opt/openssl@3" |
| 25 | + |
| 26 | + steps: |
| 27 | + - uses: LouisBrunner/checks-action@v2.0.0 |
| 28 | + id: checks |
| 29 | + if: always() |
| 30 | + with: |
| 31 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 32 | + name: '${{ github.workflow }} / ${{ github.job }} ${{ env.MATRIX }}' |
| 33 | + repo: ${{ github.repository }} |
| 34 | + sha: ${{ github.sha }} |
| 35 | + status: 'in_progress' |
| 36 | + details_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' |
| 37 | + |
| 38 | + - name: Install dependencies |
| 39 | + run: | |
| 40 | + brew install automake bzip2 cmake make git gpatch gnutls openssl@3 icu4c pkg-config libiconv zlib |
| 41 | +
|
| 42 | + - name: Checkout repository |
| 43 | + uses: actions/checkout@v4 |
| 44 | + with: |
| 45 | + repository: ${{ github.repository }} |
| 46 | + ref: ${{ github.sha }} |
| 47 | + fetch-depth: 0 |
| 48 | + |
| 49 | + - name: Build ProxySQL |
| 50 | + run: | |
| 51 | + PROXYSQLGENAI=1 make -j$(sysctl -n hw.ncpu) |
| 52 | +
|
| 53 | + - name: Package binary |
| 54 | + run: | |
| 55 | + GIT_VERSION=$(git describe --long --abbrev=7 --tags 2>/dev/null || echo "unknown") |
| 56 | + tar -C src -czf proxysql-${GIT_VERSION}-macos-arm64.tar.gz proxysql |
| 57 | + shasum -a 256 proxysql-${GIT_VERSION}-macos-arm64.tar.gz > proxysql-${GIT_VERSION}-macos-arm64.tar.gz.sha256 |
| 58 | +
|
| 59 | + - name: Upload to release |
| 60 | + env: |
| 61 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 62 | + run: | |
| 63 | + gh release create ${{ env.BRANCH }}-head --repo ${{ github.repository }} --title "${{ env.BRANCH }}-head" --target ${{ github.sha }} --draft --prerelease 2>/dev/null || true |
| 64 | + gh release upload ${{ env.BRANCH }}-head --repo ${{ github.repository }} --clobber proxysql-*-macos-arm64.tar.gz proxysql-*-macos-arm64.tar.gz.sha256 |
| 65 | +
|
| 66 | + - uses: LouisBrunner/checks-action@v2.0.0 |
| 67 | + if: always() |
| 68 | + with: |
| 69 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 70 | + check_id: ${{ steps.checks.outputs.check_id }} |
| 71 | + repo: ${{ github.repository }} |
| 72 | + sha: ${{ github.sha }} |
| 73 | + conclusion: ${{ job.status }} |
| 74 | + details_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' |
0 commit comments