Skip to content

Enable iOS tests on CI #2896

Enable iOS tests on CI

Enable iOS tests on CI #2896

Workflow file for this run

name: CI
on:
push:
branches:
- "main"
pull_request:
schedule:
- cron: '0 12 * * *' # daily at 12:00 UTC
# Cancel pending jobs on push.
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-concurrency-to-cancel-any-in-progress-job-or-run
concurrency:
group: ${{ github.workflow }}.${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# Recommended here: https://github.com/bazelbuild/bazelisk/issues/88#issuecomment-625178467
env:
BAZELISK_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPAL_RPC_CREDENTIALS: ${{ secrets.OPAL_RPC_CREDENTIALS }}
jobs:
macos-test-matrix:
runs-on:
- self-hosted
- "os=macos"
- "arch=arm64"
- "os_distribution=tahoe"
- "os_version=26"
- "revision=05f66c20d1c4f89119e612355c71ba44ae5d19a9"
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
test_package:
- cpp
- csharp
- docker
- genrules
- go
- ios
- java
- kotlin
- perl
- scala
- swift
- typescript
execution_type: [remote, local]
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd"
- name: Set up authentication
shell: bash
run: cp infra/bazelrc .bazelrc.user
- name: Generate python requirements lock
shell: bash
run: bazel run //python:requirements.update
- name: Build and test
env:
ARCH: arm64
OS: macos
EXECUTION_TYPE: ${{ matrix.execution_type }}
APPLE_SDK_VERSION_OVERRIDE: 26.5
run: python3 infra/test-all.py --package=${{ matrix.test_package }}
linux-test-matrix:
runs-on:
- self-hosted
- "os=linux"
- "arch=x64"
- "engflow-bento-name=example-gh-x64"
- "engflow-cluster=glass"
- "engflow-job-name=linux-test-matrix-${{matrix.execution_type}}"
- "engflow-job-type=${{github.event_name}}-${{github.ref_name}}"
- "engflow-run-id=${{ github.run_id }}"
- "engflow-bento-allow-save=false"
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
test_package:
- cpp
- csharp
- docker
- genrules
- go
- ios
- java
- kotlin
- perl
- scala
- swift
- typescript
execution_type: [remote, local]
include:
- test_package: ios
execution_type: local
enabled: false # Local ios tests are not supported on linux
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd"
- name: Set up authentication
shell: bash
run: cp infra/bazelrc .bazelrc.user
- name: Generate python requirements lock
shell: bash
run: bazel run //python:requirements.update
- name: Build and test
if: matrix.enabled != 'false'
env:
ARCH: x64
OS: linux
EXECUTION_TYPE: ${{ matrix.execution_type }}
run: python3 infra/test-all.py --package=${{ matrix.test_package }}
bento-snapshot:
runs-on:
- self-hosted
- "os=linux"
- "arch=x64"
- "remote_execution=true"
- "engflow-bento-name=example-gh-x64"
- "engflow-cluster=glass"
- "engflow-job-name=bento-snapshot"
- "engflow-job-type=${{github.event_name}}-${{github.ref_name}}"
- "engflow-run-id=${{ github.run_id }}"
# To avoid a race condition, among all the jobs that use the same Bento in the same repo, only
# one should specify "engflow-bento-allow-save=true".
- "engflow-bento-allow-save=true"
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
test_package: [cpp]
execution_type: [remote]
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd"
- name: Set up authentication
shell: bash
run: cp infra/bazelrc .bazelrc.user
- name: Generate python requirements lock
shell: bash
run: bazel run //python:requirements.update
- name: Build and test
env:
ARCH: x64
OS: linux
EXECUTION_TYPE: ${{ matrix.execution_type }}
run: python3 infra/test-all.py --package=${{ matrix.test_package }}
buck2-test:
runs-on:
- self-hosted
- "os=linux"
- "arch=x64"
- "engflow-bento-name=example-gh-buck2-x64"
- "engflow-cluster=glass"
- "engflow-job-name=ci-runners-test-matrix"
- "engflow-job-type=${{github.event_name}}-${{github.ref_name}}"
- "engflow-run-id=${{ github.run_id }}"
timeout-minutes: 10
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd"
- name: Set up Buck2 binary
shell: bash
run: infra/setup-buck2.sh
- name: Set up authentication
shell: bash
run: infra/auth-buck2.sh
- name: Build and test
shell: bash
run: infra/test-buck2.sh