Merge pull request #3 from DatasunriseOU/codex/self-hosted-workflows #28
This file contains hidden or 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: CppMega MLX self-hosted CI | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: cppmega-mlx-ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| mac-contracts: | |
| name: macOS MLX data, model, and eval contracts | |
| if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }} | |
| runs-on: [self-hosted, macOS, ARM64, cppmega-mlx-macos] | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: Run focused MLX contract suite | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| python_bin=/Volumes/external/sources/cppmega.mlx/.venv/bin/python | |
| test -x "${python_bin}" | |
| "${python_bin}" scripts/run_self_hosted_ci.py lane \ | |
| --lane macos-mlx \ | |
| --python "${python_bin}" \ | |
| --repo-root "${GITHUB_WORKSPACE}" \ | |
| --receipt-dir "${RUNNER_TEMP}/cppmega-mlx-ci-macos-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}" \ | |
| --timeout-seconds 1500 | |
| - name: Upload macOS runner receipt | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: self-hosted-ci-macos-${{ github.run_id }}-${{ github.run_attempt }} | |
| path: ${{ runner.temp }}/cppmega-mlx-ci-macos-${{ github.run_id }}-${{ github.run_attempt }} | |
| if-no-files-found: error | |
| retention-days: 14 | |
| linux-portable: | |
| name: Linux portable syntax and conveyor contracts | |
| if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }} | |
| runs-on: [self-hosted, Linux, X64, cppmega-mlx] | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: "3.13" | |
| - name: Run portable script contracts | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| python scripts/run_self_hosted_ci.py lane \ | |
| --lane linux-portable \ | |
| --python python \ | |
| --repo-root "${GITHUB_WORKSPACE}" \ | |
| --receipt-dir "${RUNNER_TEMP}/cppmega-mlx-ci-linux-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}" \ | |
| --timeout-seconds 900 \ | |
| --bootstrap-portable | |
| - name: Upload Linux runner receipt | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: self-hosted-ci-linux-${{ github.run_id }}-${{ github.run_attempt }} | |
| path: ${{ runner.temp }}/cppmega-mlx-ci-linux-${{ github.run_id }}-${{ github.run_attempt }} | |
| if-no-files-found: error | |
| retention-days: 14 |