This repository has been archived by the owner on Apr 29, 2024. It is now read-only.
forked from bazel-ios/rules_ios
-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (106 loc) · 4.17 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Tests
on:
pull_request:
push:
branches:
- master
jobs:
integration_tests:
name: Build and Test
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Select Xcode
run: .github/workflows/xcode_select.sh
- name: Build and Test
run: |
# Host config
bazelisk test --local_test_jobs=1 -- //... -//tests/ios/...
# `deleted_packages` is needed below in order to override the value of the .bazelrc file
bazelisk test --local_test_jobs=1 --apple_platform_type=ios --deleted_packages='' -- //tests/ios/...
- uses: actions/upload-artifact@v2
if: failure()
with:
name: bazel-testlogs
path: bazel-testlogs
build_virtual_frameworks:
# Build the entire tree with this feature enabled. Longer term, we'll likely
# consider merging this feature into the default behavior and can re-align
# the CI job
name: Build and Test ( Virtual Frameworks )
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Select Xcode
run: .github/workflows/xcode_select.sh
- name: Build and Test
run: |
# Host config
bazelisk test --features apple.virtualize_frameworks --local_test_jobs=1 -- //... -//tests/ios/...
# `deleted_packages` is needed below in order to override the value of the .bazelrc file
bazelisk test --features apple.virtualize_frameworks \
--local_test_jobs=1 \
--apple_platform_type=ios \
--deleted_packages='' \
-- //tests/ios/... \
-//tests/ios/frameworks/sources-with-prebuilt-binaries/... # Needs more work for pre-built binaries
- uses: actions/upload-artifact@v2
if: failure()
with:
name: bazel-testlogs
path: bazel-testlogs
build_bazel4_arm64_simulator:
name: Build arm64 Simulator
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Select Xcode
run: .github/workflows/xcode_select.sh
- name: Build and Test
run: |
bazelisk clean # Note: there is a problem with some reuse in rules_swift
bazelisk build --config bazel4_arm64_simulator_x86_64_host --features apple.virtualize_frameworks -- //... -//tests/ios/...
# Misc issues:
# Carthage is busted for -//tests/ios/frameworks/sources-with-prebuilt-binaries/...
# Fails on a non fat framework for //tests/ios/unit-test/test-imports-app/
bazelisk build --config bazel4_arm64_simulator_x86_64_host --features apple.virtualize_frameworks \
--apple_platform_type=ios \
--deleted_packages='' \
-- //tests/ios/... \
-//tests/ios/frameworks/sources-with-prebuilt-binaries/... \
-//tests/ios/unit-test/test-imports-app/...
- uses: actions/upload-artifact@v2
if: failure()
with:
name: bazel-testlogs
path: bazel-testlogs
buildifier:
name: Check Starlark and Docs
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Select Xcode
run: .github/workflows/xcode_select.sh
# Note: we need to pass the absolute to the Bazel run
- name: buildifier
run: find $PWD -type f \( -name 'WORKSPACE' -o -name '*.bzl' -o -name '*.bazel' \) | xargs bazel run buildifier -- -lint=fix && git diff --exit-code
- name: Check docs
run: bazelisk run docs && git diff --exit-code docs
xcodeproj_tests_xcode_12_5_1:
name: .xcodeproj Tests on Xcode 12.5.1
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Select Xcode 12.5.1
run: .github/workflows/xcode_select.sh
- name: Run tests
run: ./tests/xcodeproj-tests.sh --clean
multi_arch_support:
name: Build iOS App for Multiple Architecture
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Select Xcode
run: .github/workflows/xcode_select.sh
- name: Build App
run: bazelisk build -s tests/ios/app/App --apple_platform_type=ios --ios_minimum_os=10.2 --ios_multi_cpus=i386,x86_64